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
66 @echo "==== Make of lib is good ===="
71 $(AR) rc $@ $(LIBOBJS)
75 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
77 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
79 pythonlib.o: pythonlib.c
81 $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
85 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
86 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
88 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
92 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
93 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
95 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
100 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
101 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
103 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
105 bsnprintf: bsnprintf.o
107 $(CXX) -DTEST_PROGRAM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
108 $(CXX) $(LDFLAGS) -L. -o $@ bsnprintf.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
110 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
112 plugins.o: plugins.c plugins.h
114 $(NO_ECHO)$(CXX) -fPIC $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
122 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
123 $(RMF) rwlock_test md5sum sha1sum
129 if test $(srcdir) = .; then $(MAKE) realclean; fi
130 (cd $(srcdir); $(RMF) Makefile)
132 # Semi-automatic generation of dependencies:
133 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
134 # and it also includes system headers.
135 # `semi'-automatic since dependencies are generated at distribution time.
138 @$(MV) Makefile Makefile.bak
139 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
140 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
141 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >>Makefile
142 @if test -f Makefile ; then \
143 $(RMF) Makefile.bak; \
145 $(MV) Makefile.bak Makefile; \
146 echo " ===== Something went wrong in make depend ====="; \
149 # -----------------------------------------------------------------------
150 # DO NOT DELETE: nice dependency list follows