blob: d15b47dc087293978af6ee0becfff0b9d8530c39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
OS = $(shell uname -s)
CC ?= cc
CXX ?= c++
DESTDIR ?= /usr
FLAGS += -std=c++11
ifdef DEBUG
FLAGS += -ggdb -O0
else
FLAGS += -O3
endif
LIBS =
CFLAGS += -I. $(FLAGS) -c -MMD
LDFLAGS += $(FLAGS)
ifneq ($(OS), Darwin)
LDFLAGS += -lGL
endif
SOURCES = test.cxx
OBJECTS = $(SOURCES:.cxx=.o)
DEPENDENCIES= $(SOURCES:.cxx=.d)
EXECUTABLE = test
.PHONY: all clean pages runtests
all: $(EXECUTABLE)
-include $(DEPENDENCIES)
$(EXECUTABLE): $(OBJECTS)
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
clean:
rm $(EXECUTABLE) $(OBJECTS) $(DEPENDENCIES)
%.o: %.cxx
$(CXX) $< -o $@ $(CFLAGS)
pages:
doxygen Doxyfile
cp -rv html/* .
rm -r html
runtests: test
./test
|