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 btime.c \
28 cram-md5.c crc32.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 parse_conf.c \
31 queue.c res.c rwlock.c scan.c serial.c sha1.c \
32 semlock.c signal.c smartall.c tls.c tree.c \
33 util.c var.c watchdog.c workq.c btimers.c \
34 address_conf.c pythonlib.c
37 LIBOBJS = alloc.o attr.o base64.o berrno.o bsys.o bget_msg.o \
38 bnet.o bnet_server.o \
39 bpipe.o bshm.o btime.o \
40 cram-md5.o crc32.o daemon.o edit.o fnmatch.o \
41 hmac.o idcache.o jcr.o lex.o alist.o dlist.o \
42 md5.o message.o mem_pool.o parse_conf.o \
43 queue.o res.o rwlock.o scan.o serial.o sha1.o \
44 semlock.o signal.o smartall.o tls.o tree.o \
45 util.o var.o watchdog.o workq.o btimers.o \
46 address_conf.o pythonlib.o
52 .SUFFIXES: .c .o .ch .dvi .pdf .tex .view .w .1
58 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
61 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(OPENSSL_INC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
63 #-------------------------------------------------------------------------
64 all: Makefile libbac.a
65 @echo "==== Make of lib is good ===="
69 $(AR) rc $@ $(LIBOBJS)
73 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
75 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
77 pythonlib.o: pythonlib.c
78 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
82 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
83 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
85 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
89 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
90 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
92 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
97 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
98 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac $(OPENSSL_LIBS) -lm
100 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
107 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
108 $(RMF) rwlock_test md5sum sha1sum
114 if test $(srcdir) = .; then $(MAKE) realclean; fi
115 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
117 # Semi-automatic generation of dependencies:
118 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
119 # and it also includes system headers.
120 # `semi'-automatic since dependencies are generated at distribution time.
123 @$(MV) Makefile Makefile.bak
124 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
125 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
126 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
127 @if test -f Makefile ; then \
128 $(RMF) Makefile.bak; \
130 $(MV) Makefile.bak Makefile; \
131 echo -e "Something went wrong\n\a"; \
134 # -----------------------------------------------------------------------
135 # DO NOT DELETE: nice dependency list follows