]> git.stg.codes - stg.git/blob - tests/Makefile
Добавляем каталог с тестами
[stg.git] / tests / Makefile
1 CXXFLAGS+=-g3 -Wall -W -pedantic -DLINUX -I../include -I../projects/stargazer
2 LIBS=-lpthread
3 PROG=tests
4
5 SOURCES=main.cpp \
6         test_raw_ip.cpp \
7         test_admin_conf.cpp \
8         test_tariff.cpp \
9         ../projects/stargazer/tariff.cpp
10
11 all: $(PROG) 
12
13 $(PROG): $(subst .cpp,.o,$(SOURCES))
14         $(CXX) $(LDFLAGS) $^ $(LIBS) -o $@
15
16 clean:
17         rm -f *.o *.d
18
19 ifneq ($(MAKECMDGOALS),distclean)
20 ifneq ($(MAKECMDGOALS),clean)
21 -include $(subst .cpp,.d,$(SOURCES))
22 endif
23 endif
24
25 %.d: %.cpp
26         @$(CC) -MM $(CXXFLAGS) $< > $@.$$$$; \
27         sed 's,\($*\).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
28         rm -f $@.$$$$