4 python = @PYTHON_INCDIR@
14 # this dir relative to top dir
17 OPENSSL_LIBS = @OPENSSL_LIBS@
18 OPENSSL_INC = @OPENSSL_INC@
25 LIBSRCS = alloc.c attr.c base64.c berrno.c bsys.c bget_msg.c \
26 bnet.c bnet_server.c \
27 bpipe.c bshm.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 semlock.c signal.c smartall.c tls.c tree.c \
34 util.c var.c watchdog.c workq.c btimers.c \
35 address_conf.c pythonlib.c winapi.c
38 LIBOBJS = alloc.o attr.o base64.o berrno.o bsys.o bget_msg.o \
39 bnet.o bnet_server.o \
40 bpipe.o bshm.o bsnprintf.o btime.o \
41 cram-md5.o crc32.o crypto.o daemon.o edit.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 semlock.o signal.o smartall.o tls.o tree.o \
47 util.o var.o watchdog.o workq.o btimers.o \
48 address_conf.o pythonlib.o winapi.o
54 .SUFFIXES: .c .o .ch .dvi .pdf .tex .view .w .1
60 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
63 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
65 #-------------------------------------------------------------------------
66 all: Makefile libbac.a
67 @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
80 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
84 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
85 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
87 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
91 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
92 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
94 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
99 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
100 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
102 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
104 bsnprintf: bsnprintf.o
106 $(CXX) -DTEST_PROGRAM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
107 $(CXX) $(LDFLAGS) -L. -o $@ bsnprintf.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
109 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) bsnprintf.c
117 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
118 $(RMF) rwlock_test md5sum sha1sum
124 if test $(srcdir) = .; then $(MAKE) realclean; fi
125 (cd $(srcdir); $(RMF) Makefile)
127 # Semi-automatic generation of dependencies:
128 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
129 # and it also includes system headers.
130 # `semi'-automatic since dependencies are generated at distribution time.
133 @$(MV) Makefile Makefile.bak
134 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
135 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
136 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >>Makefile
137 @if test -f Makefile ; then \
138 $(RMF) Makefile.bak; \
140 $(MV) Makefile.bak Makefile; \
141 echo " ===== Something went wrong in make depend ====="; \
144 # -----------------------------------------------------------------------
145 # DO NOT DELETE: nice dependency list follows