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 testls
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
53 testls: ../findlib/libfind.a ../lib/libbac.a testls.o
54 $(CXX) -g $(LDFLAGS) -L. -L../lib -L../findlib -o $@ testls.o \
55 $(LIBS) $(DLIB) -lfind -lbac -lm
59 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
61 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
64 @$(RMF) smtp core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
65 @$(RMF) testfind dbcheck testls
71 if test $(srcdir) = .; then $(MAKE) realclean; fi
72 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
75 $(INSTALL_PROGRAM) smtp $(DESTDIR)$(sbindir)/smtp
76 $(INSTALL_PROGRAM) dbcheck $(DESTDIR)$(sbindir)/dbcheck
79 (cd $(DESTDIR)$(sbindir); $(RMF) smtp)
80 (cd $(DESTDIR)$(sbindir); $(RMF) dbcheck)
84 # Semi-automatic generation of dependencies:
85 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
86 # and it also includes system headers.
87 # `semi'-automatic since dependencies are generated at distribution time.
90 @$(MV) Makefile Makefile.bak
91 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
92 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
93 @$(CC) -S -M $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
94 @if test -f Makefile ; then \
95 $(RMF) Makefile.bak; \
97 $(MV) Makefile.bak Makefile; \
98 echo -e "Something went wrong\n\a"; \
101 # -----------------------------------------------------------------------
102 # DO NOT DELETE: nice dependency list follows