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 \
26 enh_fnmatch.c fnmatch.c \
27 guid_to_name.c hmac.c jcr.c lex.c alist.c dlist.c \
28 md5.c message.c mem_pool.c openssl.c parse_conf.c \
30 res.c rwlock.c scan.c serial.c sha1.c \
31 signal.c smartall.c rblist.c tls.c tree.c \
32 util.c var.c watchdog.c workq.c btimers.c \
33 address_conf.c pythonlib.c breg.c
36 LIBOBJS = attr.o base64.o berrno.o bsys.o bget_msg.o \
37 bnet.o bnet_server.o runscript.o \
38 bsock.o bpipe.o bsnprintf.o btime.o \
39 cram-md5.o crc32.o crypto.o daemon.o edit.o \
40 enh_fnmatch.o fnmatch.o \
41 guid_to_name.o hmac.o jcr.o lex.o alist.o dlist.o \
42 md5.o message.o mem_pool.o openssl.o parse_conf.o \
44 res.o rwlock.o scan.o serial.o sha1.o \
45 signal.o smartall.o rblist.o tls.o tree.o \
46 util.o var.o watchdog.o workq.o btimers.o \
47 address_conf.o pythonlib.o breg.o
53 .SUFFIXES: .c .o .ch .dvi .pdf .tex .view .w .1
60 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
64 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
66 #-------------------------------------------------------------------------
67 all: Makefile libbac.a
68 @echo "==== Make of lib is good ===="
73 $(AR) rc $@ $(LIBOBJS)
77 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
79 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
81 pythonlib.o: pythonlib.c
83 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
87 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
88 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
90 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
94 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
95 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
97 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
102 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
103 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
105 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
107 bsnprintf: bsnprintf.o
109 $(CXX) -DTEST_PROGRAM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
110 $(CXX) $(LDFLAGS) -L. -o $@ bsnprintf.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
112 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
120 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
121 $(RMF) rwlock_test md5sum sha1sum
127 if test $(srcdir) = .; then $(MAKE) realclean; fi
128 (cd $(srcdir); $(RMF) Makefile)
130 # Semi-automatic generation of dependencies:
131 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
132 # and it also includes system headers.
133 # `semi'-automatic since dependencies are generated at distribution time.
136 @$(MV) Makefile Makefile.bak
137 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
138 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
139 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >>Makefile
140 @if test -f Makefile ; then \
141 $(RMF) Makefile.bak; \
143 $(MV) Makefile.bak Makefile; \
144 echo " ===== Something went wrong in make depend ====="; \
147 # -----------------------------------------------------------------------
148 # DO NOT DELETE: nice dependency list follows