#
@MCOMMON@
+PYTHON_INC = @PYTHON_INCDIR@
+
srcdir = .
VPATH = .
.PATH: .
#
+OPENSSL_INC = @OPENSSL_INC@
+OPENSSL_LIBS = @OPENSSL_LIBS@
+
FINDOBJS = testfind.o
# these are the objects that are changed by the .configure process
EXTRAOBJS = @OBJLIST@
+DIRCONFOBJS = ../dird/dird_conf.o ../dird/run_conf.o ../dird/inc_conf.o
+
.SUFFIXES: .c .o
.PHONY:
.DONTCARE:
# inference rules
.c.o:
- $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+ $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile smtp dbcheck testfind testls
+all: Makefile bsmtp dbcheck fstype testfind testls
@echo "==== Make of tools is good ===="
@echo " "
-smtp: smtp.o ../lib/libbac.a
- $(CXX) $(LDFLAGS) -L../lib -o $@ smtp.o -lbac -lm $(LIBS) $(DLIB)
+bsmtp: bsmtp.o ../lib/libbac.a
+ $(CXX) $(LDFLAGS) -L../lib -o $@ bsmtp.o -lbac -lm $(DLIB) $(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) $(OPENSSL_LIBS)
-dbcheck: dbcheck.o ../lib/libbac.a ../cats/libsql.a
- $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o -lsql -lbac -lm $(LIBS) $(DB_LIBS)
+fstype: fstype.o ../lib/libbac.a ../findlib/libfind.a
+ $(CXX) $(LDFLAGS) -L../lib -L../findlib -o $@ fstype.o -lfind -lbac -lm $(DLIB) $(LIBS) $(OPENSSL_LIBS)
testfind: ../findlib/libfind.a ../lib/libbac.a $(FINDOBJS)
$(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(FINDOBJS) \
- $(LIBS) $(DLIB) -lfind -lbac -lm
+ $(DLIB) -lfind -lbac -lm $(LIBS) $(OPENSSL_LIBS)
testls: ../findlib/libfind.a ../lib/libbac.a testls.o
$(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ testls.o \
- $(LIBS) $(DLIB) -lfind -lbac -lm
-
-
+ $(DLIB) -lfind -lbac -lm $(LIBS) $(OPENSSL_LIBS)
Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
cd $(topdir) \
&& CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
clean:
- @$(RMF) smtp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
- @$(RMF) testfind dbcheck testls
+ @$(RMF) bsmtp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
+ @$(RMF) testfind dbcheck testls fstype
realclean: clean
@$(RMF) tags
if test $(srcdir) = .; then $(MAKE) realclean; fi
(cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
-install: smtp
- $(INSTALL_PROGRAM) smtp $(DESTDIR)$(sbindir)/smtp
+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
+ chmod 755 $(DESTDIR)$(sbindir)/bsmtp
$(INSTALL_PROGRAM) dbcheck $(DESTDIR)$(sbindir)/dbcheck
uninstall:
- (cd $(DESTDIR)$(sbindir); $(RMF) smtp)
+ (cd $(DESTDIR)$(sbindir); $(RMF) bsmtp)
(cd $(DESTDIR)$(sbindir); $(RMF) dbcheck)
@$(MV) Makefile Makefile.bak
@$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
@$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
- @$(CC) -S -M $(CPPFLAGS) -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 \
$(MV) Makefile.bak Makefile; \
- echo -e "Something went wrong\n\a"; \
+ echo " ===== Something went wrong in make depend ====="; \
fi
# -----------------------------------------------------------------------