4 python = @PYTHON_INCDIR@
14 # this dir relative to top dir
17 OPENSSL_LIBS = @OPENSSL_LIBS@
18 OPENSSL_INC = @OPENSSL_INC@
25 LIBSRCS = attr.c base64.c berrno.c bsys.c bget_msg.c \
26 bnet.c bnet_server.c runscript.c \
27 bpipe.c bsnprintf.c btime.c \
28 cram-md5.c crc32.c crypto.c daemon.c edit.c fnmatch.c \
29 hmac.c idcache.c jcr.c lex.c alist.c dlist.c \
30 md5.c message.c mem_pool.c openssl.c parse_conf.c \
32 res.c rwlock.c scan.c serial.c sha1.c \
33 signal.c smartall.c rblist.c tls.c tree.c \
34 util.c var.c watchdog.c workq.c btimers.c \
35 address_conf.c pythonlib.c
38 LIBOBJS = attr.o base64.o berrno.o bsys.o bget_msg.o \
39 bnet.o bnet_server.o runscript.o \
40 bpipe.o bsnprintf.o btime.o \
41 cram-md5.o crc32.o crypto.o daemon.o edit.o enh_fnmatch.o fnmatch.o \
42 hmac.o idcache.o jcr.o lex.o alist.o dlist.o \
43 md5.o message.o mem_pool.o openssl.o parse_conf.o \
45 res.o rwlock.o scan.o serial.o sha1.o \
46 signal.o smartall.o rblist.o tls.o tree.o \
47 util.o var.o watchdog.o workq.o btimers.o \
48 address_conf.o pythonlib.o
54 .SUFFIXES: .c .o .ch .dvi .pdf .tex .view .w .1
61 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
65 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
67 #-------------------------------------------------------------------------
68 all: Makefile libbac.a
69 @echo "==== Make of lib is good ===="
74 $(AR) rc $@ $(LIBOBJS)
78 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
80 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
82 pythonlib.o: pythonlib.c
84 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
88 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
89 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
91 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
95 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
96 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
98 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
103 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
104 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
106 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
108 bsnprintf: bsnprintf.o
110 $(CXX) -DTEST_PROGRAM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
111 $(CXX) $(LDFLAGS) -L. -o $@ bsnprintf.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
113 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
121 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
122 $(RMF) rwlock_test md5sum sha1sum
128 if test $(srcdir) = .; then $(MAKE) realclean; fi
129 (cd $(srcdir); $(RMF) Makefile)
131 # Semi-automatic generation of dependencies:
132 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
133 # and it also includes system headers.
134 # `semi'-automatic since dependencies are generated at distribution time.
137 @$(MV) Makefile Makefile.bak
138 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
139 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
140 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >>Makefile
141 @if test -f Makefile ; then \
142 $(RMF) Makefile.bak; \
144 $(MV) Makefile.bak Makefile; \
145 echo " ===== Something went wrong in make depend ====="; \
148 # -----------------------------------------------------------------------
149 # DO NOT DELETE: nice dependency list follows