2 # Bacula Tools Makefile
16 # this dir relative to top dir
28 # these are the objects that are changed by the .configure process
37 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
38 #-------------------------------------------------------------------------
39 all: Makefile smtp dbcheck
40 @echo "==== Make of tools is good ===="
43 smtp: smtp.o ../lib/libbac.a
44 $(CXX) $(LDFLAGS) -L../lib -o $@ smtp.o -lbac -lm $(LIBS) $(DLIB)
46 dbcheck: dbcheck.o ../lib/libbac.a ../cats/libsql.a
47 $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ dbcheck.o -lbac -lsql -lm $(LIBS) $(DB_LIBS)
49 testfind: ../findlib/libfind.a ../lib/libbac.a $(FINDOBJS)
50 $(CC) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ $(FINDOBJS) \
51 $(LIBS) $(DLIB) -lfind -lbac -lm
54 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
56 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
59 @$(RMF) smtp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
60 @$(RMF) testfind dbcheck
66 if test $(srcdir) = .; then $(MAKE) realclean; fi
67 (cd $(srcdir); $(RMF) Makefile)
70 $(INSTALL_PROGRAM) smtp $(DESTDIR)$(sbindir)/smtp
73 (cd $(DESTDIR)$(sbindir); $(RMF) smtp)
77 # Semi-automatic generation of dependencies:
78 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
79 # and it also includes system headers.
80 # `semi'-automatic since dependencies are generated at distribution time.
83 @$(MV) Makefile Makefile.bak
84 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
85 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
86 @$(CC) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
87 @if test -f Makefile ; then \
88 $(RMF) Makefile.bak; \
90 $(MV) Makefile.bak Makefile; \
91 echo -e "Something went wrong\n\a"; \
94 # -----------------------------------------------------------------------
95 # DO NOT DELETE: nice dependency list follows