blob: 7171de7c9c559b473c5c2919492a994830e40920 (
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 = glfw3 assimp
CFLAGS += -I. $(FLAGS) -c -MMD `pkg-config --cflags $(LIBS)`
LDFLAGS += $(FLAGS) `pkg-config --libs $(LIBS)`
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
|