5 CTANGLE = $(CWEB)/ctangle
6 CWEAVE = $(CWEB)/cweave
7 TEXINPUTS = TEXINPUTS=.:$(CWEB):
9 # FIXME -- These should be found by autoconf
15 python = @PYTHON_INCDIR@
25 # this dir relative to top dir
36 LIBSRCS = alloc.c attr.c base64.c berrno.c bsys.c bget_msg.c \
37 bnet.c bnet_server.c \
38 bpipe.c bshm.c btime.c \
39 cram-md5.c crc32.c daemon.c edit.c fnmatch.c \
40 hmac.c idcache.c jcr.c lex.c alist.c dlist.c \
41 md5.c message.c mem_pool.c parse_conf.c \
42 queue.c rwlock.c scan.c serial.c sha1.c \
43 semlock.c signal.c smartall.c tree.c \
44 util.c var.c watchdog.c workq.c btimers.c \
45 address_conf.c python.c
48 LIBOBJS = alloc.o attr.o base64.o berrno.o bsys.o bget_msg.o \
49 bnet.o bnet_server.o \
50 bpipe.o bshm.o btime.o \
51 cram-md5.o crc32.o daemon.o edit.o fnmatch.o \
52 hmac.o idcache.o jcr.o lex.o alist.o dlist.o \
53 md5.o message.o mem_pool.o parse_conf.o \
54 queue.o rwlock.o scan.o serial.o sha1.o \
55 semlock.o signal.o smartall.o tree.o \
56 util.o var.o watchdog.o workq.o btimers.o \
57 address_conf.o python.o
63 .SUFFIXES: .c .o .ch .dvi .pdf .tex .view .w .1
69 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
72 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
81 ( $(TEXINPUTS) ; export TEXINPUTS; $(TEX) $< )
84 ( $(TEXINPUTS) ; export TEXINPUTS; $(PDFTEX) $< )
89 #-------------------------------------------------------------------------
90 all: Makefile libbac.a
91 @echo "==== Make of lib is good ===="
95 $(AR) rc $@ $(LIBOBJS)
99 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
101 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
104 $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(python) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
108 $(CXX) -DTEST_RWLOCK $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
109 $(CXX) $(LDFLAGS) -L. -o $@ rwlock.o $(LIBS) $(DLIB) -lbac -lm
111 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) rwlock.c
115 $(CXX) -DMD5_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
116 $(CXX) $(LDFLAGS) -L. -o $@ md5.o $(LIBS) $(DLIB) -lbac -lm
118 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
123 $(CXX) -DSHA1_SUM $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) sha1.c
124 $(CXX) $(LDFLAGS) -L. -o $@ sha1.o $(LIBS) $(DLIB) -lbac -lm
126 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) md5.c
133 $(RMF) *.a core a.out *.o *.bak *.tex *.pdf *~ *.intpro *.extpro 1 2 3
134 $(RMF) rwlock_test md5sum sha1sum
140 if test $(srcdir) = .; then $(MAKE) realclean; fi
141 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
143 # Semi-automatic generation of dependencies:
144 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
145 # and it also includes system headers.
146 # `semi'-automatic since dependencies are generated at distribution time.
149 @$(MV) Makefile Makefile.bak
150 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
151 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
152 @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(python) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
153 @if test -f Makefile ; then \
154 $(RMF) Makefile.bak; \
156 $(MV) Makefile.bak Makefile; \
157 echo -e "Something went wrong\n\a"; \
160 # -----------------------------------------------------------------------
161 # DO NOT DELETE: nice dependency list follows