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 testfind
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 -lsql -lbac -lm $(LIBS) $(DB_LIBS)
49 testfind: ../findlib/libfind.a ../lib/libbac.a $(FINDOBJS)
50 $(CXX) -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; $(RMF) -r CVS)
70 $(INSTALL_PROGRAM) smtp $(DESTDIR)$(sbindir)/smtp
71 $(INSTALL_PROGRAM) dbcheck $(DESTDIR)$(sbindir)/dbcheck
74 (cd $(DESTDIR)$(sbindir); $(RMF) smtp)
78 # Semi-automatic generation of dependencies:
79 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
80 # and it also includes system headers.
81 # `semi'-automatic since dependencies are generated at distribution time.
84 @$(MV) Makefile Makefile.bak
85 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
86 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
87 @$(CC) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
88 @if test -f Makefile ; then \
89 $(RMF) Makefile.bak; \
91 $(MV) Makefile.bak Makefile; \
92 echo -e "Something went wrong\n\a"; \
95 # -----------------------------------------------------------------------
96 # DO NOT DELETE: nice dependency list follows