#
+GETTEXT_LIBS = @LIBINTL@
+
+OPENSSL_INC = @OPENSSL_INC@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+
FINDOBJS = testfind.o
# these are the objects that are changed by the .configure process
DIRCONFOBJS = ../dird/dird_conf.o ../dird/run_conf.o ../dird/inc_conf.o
+NODIRTOOLS = bsmtp
+DIRTOOLS = bsmtp dbcheck fstype testfind testls regex
+TOOLS = $(@DIR_TOOLS@)
+
+INSNODIRTOOLS = bsmtp
+INSDIRTOOLS = bsmtp dbcheck
+INSTOOLS = $(INS@DIR_TOOLS@)
+
+
.SUFFIXES: .c .o
.PHONY:
.DONTCARE:
.c.o:
$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile bsmtp dbcheck fstype testfind testls
+all: Makefile $(TOOLS)
@echo "==== Make of tools is good ===="
@echo " "
bsmtp: bsmtp.o ../lib/libbac.a
- $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS)
+ $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
dbcheck: dbcheck.o ../lib/libbac.a ../cats/libsql.a $(DIRCONFOBJS)
- $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) -lsql -lbac -lm $(DB_LIBS) $(LIBS)
+ $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o $(DIRCONFOBJS) -lsql -lbac -lm $(DB_LIBS) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
fstype: fstype.o ../lib/libbac.a ../findlib/libfind.a
- $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lfind -lbac -lm $(DLIB) $(LIBS)
+ $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lfind -lbac -lm $(DLIB) $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
testfind: ../findlib/libfind.a ../lib/libbac.a $(FINDOBJS)
$(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(FINDOBJS) \
- $(DLIB) -lfind -lbac -lm $(LIBS)
+ $(DLIB) -lfind -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
testls: ../findlib/libfind.a ../lib/libbac.a testls.o
$(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ testls.o \
- $(DLIB) -lfind -lbac -lm $(LIBS)
+ $(DLIB) -lfind -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
+regex: ../findlib/libfind.a ../lib/libbac.a regex.o
+ $(CXX) -g $(LDFLAGS) -L. -L../lib -o $@ regex.o \
+ $(DLIB) -lbac -lm $(LIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS)
+
Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
cd $(topdir) \
distclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
- (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
+ (cd $(srcdir); $(RMF) Makefile)
devclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
(cd $(srcdir); $(RMF) Makefile)
# Allow non-root execution of bsmtp for non-root Directors
-install: bsmtp
- $(INSTALL_PROGRAM) bsmtp $(DESTDIR)$(sbindir)/bsmtp
+install: $(INSTOOLS)
+ @for tool in ${INSTOOLS} ; do \
+ $(INSTALL_PROGRAM) $$tool $(DESTDIR)$(sbindir)/$$tool ; \
+ done
chmod 755 $(DESTDIR)$(sbindir)/bsmtp
- $(INSTALL_PROGRAM) dbcheck $(DESTDIR)$(sbindir)/dbcheck
uninstall:
(cd $(DESTDIR)$(sbindir); $(RMF) bsmtp)
@$(MV) Makefile Makefile.bak
@$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
@$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
- @$(CXX) -S -M $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
+ @$(CXX) -S -M $(CPPFLAGS) $(PYTHON_INC) $(OPENSSL_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
@if test -f Makefile ; then \
$(RMF) Makefile.bak; \
else \