4 python = @PYTHON_INCDIR@
14 # this dir relative to top dir
23 LIBSRCS = alloc.c attr.c base64.c berrno.c bsys.c bget_msg.c \
24 bnet.c bnet_server.c \
25 bpipe.c bshm.c btime.c \
26 cram-md5.c crc32.c daemon.c edit.c fnmatch.c \
27 hmac.c idcache.c jcr.c lex.c alist.c dlist.c \
28 md5.c message.c mem_pool.c parse_conf.c \
29 queue.c res.c rwlock.c scan.c serial.c sha1.c \
30 semlock.c signal.c smartall.c tree.c \
31 util.c var.c watchdog.c workq.c btimers.c \
32 address_conf.c pythonlib.c
35 LIBOBJS = alloc.o attr.o base64.o berrno.o bsys.o bget_msg.o \
36 bnet.o bnet_server.o \
37 bpipe.o bshm.o btime.o \
38 cram-md5.o crc32.o daemon.o edit.o fnmatch.o \
39 hmac.o idcache.o jcr.o lex.o alist.o dlist.o \
40 md5.o message.o mem_pool.o parse_conf.o \
41 queue.o res.o rwlock.o scan.o serial.o sha1.o \
42 semlock.o signal.o smartall.o tree.o \
43 util.o var.o watchdog.o workq.o btimers.o \
44 address_conf.o pythonlib.o
50 .SUFFIXES: .c .o .ch .dvi .pdf .tex .view .w .1
56 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
59 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
61 #-------------------------------------------------------------------------
62 all: Makefile libbac.a
63 @echo "==== Make of lib is good ===="
67 $(AR) rc $@ $(LIBOBJS)
71 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
73 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
75 pythonlib.o: pythonlib.c
76 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
80 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
81 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
83 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
87 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
88 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac -lm
90 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
95 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
96 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac -lm
98 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
105 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
106 $(RMF) rwlock_test md5sum sha1sum
112 if test $(srcdir) = .; then $(MAKE) realclean; fi
113 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
115 # Semi-automatic generation of dependencies:
116 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
117 # and it also includes system headers.
118 # `semi'-automatic since dependencies are generated at distribution time.
121 @$(MV) Makefile Makefile.bak
122 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
123 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
124 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
125 @if test -f Makefile ; then \
126 $(RMF) Makefile.bak; \
128 $(MV) Makefile.bak Makefile; \
129 echo -e "Something went wrong\n\a"; \
132 # -----------------------------------------------------------------------
133 # DO NOT DELETE: nice dependency list follows