]> git.stg.codes - stg.git/blob - tests/Makefile
Locks added, rnd logic for ALIVE changed, CONN_ACK bug fixed
[stg.git] / tests / Makefile
1 CXXFLAGS+=-g3 -Wall -W -Wextra -DLINUX -I../include -I../projects/stargazer -I../stglibs/stgconffiles.lib -I.
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         test_conffiles.cpp \
10         ../projects/stargazer/tariff_impl.cpp \
11         ../stglibs/conffiles.lib/conffiles.cpp \
12         ../stglibs/common.lib/common.cpp
13
14 all: $(PROG) 
15
16 $(PROG): $(subst .cpp,.o,$(SOURCES))
17         $(CXX) $(LDFLAGS) $^ $(LIBS) -o $@
18
19 clean:
20         rm -f *.o *.d $(PROG)
21
22 ifneq ($(MAKECMDGOALS),distclean)
23 ifneq ($(MAKECMDGOALS),clean)
24 -include $(subst .cpp,.d,$(SOURCES))
25 endif
26 endif
27
28 %.d: %.cpp
29         @$(CC) -MM $(CXXFLAGS) $< > $@.$$$$; \
30         sed 's,\($*\).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
31         rm -f $@.$$$$