]> git.stg.codes - stg.git/blob - tests/Makefile
IP initialization added in TEST_ADMIN
[stg.git] / tests / Makefile
1 CXXFLAGS+=-g3 -Wall -W -Wextra -DLINUX -I../include -I../projects/stargazer -I../stglibs/stgconffiles.lib -I. -DUSE_ABSTRACT_SETTINGS
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         test_fee_charge_rules.cpp \
11         test_reconnect_on_tariff_change.cpp \
12         ../projects/stargazer/tariff_impl.cpp \
13         ../projects/stargazer/user_impl.cpp \
14         ../projects/stargazer/user_property.cpp \
15         ../stglibs/conffiles.lib/conffiles.cpp \
16         ../stglibs/common.lib/common.cpp \
17         ../stglibs/logger.lib/logger.cpp \
18         ../stglibs/scriptexecuter.lib/scriptexecuter.cpp
19
20 .PHONY: all includes clean
21
22 all: includes $(PROG)
23
24 includes:
25         make -C ../stglibs includes
26
27 $(PROG): $(subst .cpp,.o,$(SOURCES))
28         $(CXX) $(LDFLAGS) $^ $(LIBS) -o $@
29
30 clean:
31         rm -f *.o *.d $(PROG)
32
33 ifneq ($(MAKECMDGOALS),distclean)
34 ifneq ($(MAKECMDGOALS),clean)
35 -include $(subst .cpp,.d,$(SOURCES))
36 endif
37 endif
38
39 %.d: %.cpp
40         @$(CC) -MM $(CXXFLAGS) $< > $@.$$$$; \
41         sed 's,\($*\).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
42         rm -f $@.$$$$