2 # Makefile for the Barry library and test programs
5 include ../Makefile.conf
54 # object files needed to build Barry
56 OBJS = $(LIBOBJS) $(CONNECTOBJS) $(BBTOOLOBJS) $(UPLDIFOBJS)
59 ###############################################################################
60 all: visual dep.mak tests connect btool upldif translate libbarry.a
65 connect: $(CONNECTOBJS)
66 $(CXX) $(DEBUG) -o connect $(CONNECTOBJS) $(LDFLAGS)
69 $(CXX) $(DEBUG) -o btool $(BBTOOLOBJS) $(LDFLAGS)
72 $(CXX) $(DEBUG) -o upldif $(UPLDIFOBJS) $(LDFLAGS)
74 translate: translate.cc
75 $(CXX) $(CXXFLAGS) -o translate translate.cc
77 libbarry.a: $(LIBOBJS)
78 ar rcs libbarry.a $(LIBOBJS)
85 mkdir -p $(INSTALLDIR)
86 mkdir -p $(INSTALLDIR)/include/barry
87 mkdir -p $(INSTALLDIR)/bin
88 mkdir -p $(INSTALLDIR)/lib
89 install btool upldif $(INSTALLDIR)/bin
90 install libbarry.a $(INSTALLDIR)/lib
91 install barry.h base64.h builder.h common.h controller.h controllertmpl.h data.h debug.h error.h packet.h parser.h probe.h protocol.h protostructs.h record.h s11n-boost.h socket.h time.h usbwrap.h $(INSTALLDIR)/include/barry
98 tests: test-data test-contact test-base64 test-time
100 test-time: time.h time.cc
101 $(CXX) $(CXXFLAGS) -D__TEST_MODE__ -o test-time time.cc
103 test-base64: base64.h base64.cc
104 $(CXX) $(CXXFLAGS) -D__TEST_MODE__ -o test-base64 base64.cc
106 test-data: data.h data.cc
107 $(CXX) $(CXXFLAGS) -D__TEST_MODE__ -o test-data data.cc
109 test-contact.o: record.cc
110 $(CXX) $(CXXFLAGS) -D__TEST_MODE__ -o test-contact.o -c record.cc
112 test-contact: test-contact.o data.o base64.o
113 $(CXX) $(CXXFLAGS) -o test-contact test-contact.o data.o base64.o
116 rm -f test-data test-contact test-contact.o test-base64 test-time
123 rm -f $(OBJS) *.rpo */*.rpo dep.mak core core.* gmon.out leak.out
124 rm -f connect btool upldif
127 rm -rf ../doc/doxygen/html
131 $(CXX) $(CXXFLAGS) -M *.cc > dep.mak
137 # dependencies.... run make dep to create them
138 ifeq (dep.mak,$(wildcard dep.mak))