2 # Makefile for the Barry library and test programs
5 include ..
/Makefile.conf
52 # object files needed to build Barry
54 OBJS
= $(LIBOBJS
) $(CONNECTOBJS
) $(BBTOOLOBJS
) $(UPLDIFOBJS
)
57 ###############################################################################
58 all: visual dep.mak tests connect btool upldif translate libbarry.a
63 connect
: $(CONNECTOBJS
)
64 $(CXX
) $(DEBUG
) -o connect
$(CONNECTOBJS
) $(LDFLAGS
)
67 $(CXX
) $(DEBUG
) -o btool
$(BBTOOLOBJS
) $(LDFLAGS
)
70 $(CXX
) $(DEBUG
) -o upldif
$(UPLDIFOBJS
) $(LDFLAGS
)
72 translate
: translate.
cc
73 $(CXX
) $(CXXFLAGS
) -o translate translate.
cc
75 libbarry.a
: $(LIBOBJS
)
76 ar rcs libbarry.a
$(LIBOBJS
)
83 mkdir
-p
$(INSTALLDIR
)
84 mkdir
-p
$(INSTALLDIR
)/include/barry
85 mkdir
-p
$(INSTALLDIR
)/lib
86 install libbarry.a
$(INSTALLDIR
)/lib
87 install barry.h base64.h builder.h common.h controller.h controllertmpl.h data.h debug.h error.h parser.h probe.h protocol.h protostructs.h record.h s11n-boost.h socket.h time.h usbwrap.h
$(INSTALLDIR
)/include/barry
94 tests
: test-data test-contact test-base64 test-time
96 test-time
: time.h time.
cc
97 $(CXX
) $(CXXFLAGS
) -D__TEST_MODE__
-o test-time time.
cc
99 test-base64
: base64.h base64.
cc
100 $(CXX
) $(CXXFLAGS
) -D__TEST_MODE__
-o test-base64 base64.
cc
102 test-data
: data.h data.
cc
103 $(CXX
) $(CXXFLAGS
) -D__TEST_MODE__
-o test-data data.
cc
105 test-contact.o
: record.
cc
106 $(CXX
) $(CXXFLAGS
) -D__TEST_MODE__
-o test-contact.o
-c record.
cc
108 test-contact
: test-contact.o data.o base64.o
109 $(CXX
) $(CXXFLAGS
) -o test-contact test-contact.o data.o base64.o
112 rm -f test-data test-contact test-contact.o test-base64 test-time
119 rm -f
$(OBJS
) *.rpo
*/*.rpo dep.mak core core.
* gmon.out leak.out
120 rm -f connect btool upldif
123 rm -rf ..
/doc
/doxygen
/html
127 $(CXX
) $(CXXFLAGS
) -M
*.
cc > dep.mak
133 # dependencies.... run make dep to create them
134 ifeq (dep.mak
,$(wildcard dep.mak
))