4 python = @PYTHON_INCDIR@
14 # this dir relative to top dir
22 LIBSRCS = attr.c base64.c berrno.c bsys.c bget_msg.c \
23 bnet.c bnet_server.c runscript.c \
24 bsock.c bpipe.c bsnprintf.c btime.c \
25 cram-md5.c crc32.c crypto.c daemon.c edit.c fnmatch.c \
26 guid_to_name.c hmac.c jcr.c lex.c alist.c dlist.c \
27 md5.c message.c mem_pool.c openssl.c parse_conf.c \
28 plugins.c queue.c bregex.c \
29 res.c rwlock.c scan.c serial.c sha1.c \
30 signal.c smartall.c rblist.c tls.c tree.c \
31 util.c var.c watchdog.c workq.c btimers.c \
32 address_conf.c pythonlib.c breg.c htable.c
35 LIBOBJS = attr.o base64.o berrno.o bsys.o bget_msg.o \
36 bnet.o bnet_server.o runscript.o \
37 bsock.o bpipe.o bsnprintf.o btime.o \
38 cram-md5.o crc32.o crypto.o daemon.o edit.o fnmatch.o \
39 guid_to_name.o hmac.o jcr.o lex.o alist.o dlist.o \
40 md5.o message.o mem_pool.o openssl.o parse_conf.o \
41 plugins.o queue.o bregex.o \
42 res.o rwlock.o scan.o serial.o sha1.o \
43 signal.o smartall.o rblist.o tls.o tree.o \
44 util.o var.o watchdog.o workq.o btimers.o \
45 address_conf.o pythonlib.o breg.o htable.o
51 .SUFFIXES: .c .o .ch .dvi .pdf .tex .view .w .1
58 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
62 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
64 #-------------------------------------------------------------------------
65 all: Makefile libbac.a libtokyocabinet.a
66 @echo "==== Make of lib is good ===="
70 @(cd tokyocabinet ; echo "==>Entering directory `pwd`"; \
71 $(MAKE) $@ || (echo ""; echo ""; echo " ====== Error in `pwd` ======"; \
73 @cp tokyocabinet/tcadb.h tokyocabinet/tcbdb.h tokyocabinet/tchdb.h .
74 @touch tokyocabinet/libtokyocabinet.a
75 @cp tokyocabinet/libtokyocabinet.a .
80 $(AR) rc $@ $(LIBOBJS)
84 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
86 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
88 pythonlib.o: pythonlib.c
90 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
94 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
95 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
97 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
101 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
102 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
104 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
109 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
110 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
112 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
114 bsnprintf: bsnprintf.o
116 $(CXX) -DTEST_PROGRAM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
117 $(CXX) $(LDFLAGS) -L. -o $@ bsnprintf.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
119 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
121 plugins.o: plugins.c plugins.h
123 $(NO_ECHO)$(CXX) -fPIC $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
131 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
132 $(RMF) rwlock_test md5sum sha1sum
133 $(RMF) tcadb.h tcbdb.h tchdb.h
134 (cd tokyocabinet ; make clean)
140 if test $(srcdir) = .; then $(MAKE) realclean; fi
141 (cd $(srcdir); $(RMF) Makefile)
143 # Semi-automatic generation of dependencies:
144 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
145 # and it also includes system headers.
146 # `semi'-automatic since dependencies are generated at distribution time.
149 @$(MV) Makefile Makefile.bak
150 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
151 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
152 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >>Makefile
153 @if test -f Makefile ; then \
154 $(RMF) Makefile.bak; \
156 $(MV) Makefile.bak Makefile; \
157 echo " ===== Something went wrong in make depend ====="; \
160 # -----------------------------------------------------------------------
161 # DO NOT DELETE: nice dependency list follows