blob: 42bce87e5492450ac0a1f899e7e6304de9e30ec3 (
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
|
OS = $(shell uname -s)
CC ?= cc
CXX ?= c++
DESTDIR ?= /usr
FLAGS += -std=c++11
ifdef DEBUG
FLAGS += -ggdb -O0
else
FLAGS += -O2
endif
LIBS =
CFLAGS += -I. $(FLAGS) -c -MMD
LDFLAGS += $(FLAGS)
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
|