2 INCS = -I../include -I../3rdparty/snmp++/include
3 CXXFLAGS += -W -Wall -Wextra $(INCS) $(DEFS)
7 -lboost_program_options \
8 ../3rdparty/snmp++/libsnmp++.a
10 SOURCES1 = test_switch.cpp \
12 ../src/settingsfileparser.cpp \
14 ../src/subscriber.cpp \
19 SOURCES2 = test_data_parser.cpp \
23 .PHONY: all clean snmplib tests
27 tests: test_switch test_data_parser
30 $(MAKE) all -C ../3rdparty
32 test_switch: $(subst .cpp,.o,$(SOURCES1)) snmplib
33 $(CXX) $(subst .cpp,.o,$(SOURCES1)) $(LIBS) -o $@
35 test_data_parser: $(subst .cpp,.o,$(SOURCES2))
36 $(CXX) $(subst .cpp,.o,$(SOURCES2)) $(LIBS) -o $@
39 rm -f *.o *.d test_switch test_data_parser
41 ifneq ($(MAKECMDGOALS),distclean)
42 ifneq ($(MAKECMDGOALS),clean)
43 -include $(subst .cpp,.d,$(SOURCES))
48 @$(CXX) -MM $(CXXFLAGS) $< > $@.$$$$; \
49 sed 's,\($*\).o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \