]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/tools/Makefile.in
17Mar06
[bacula/bacula] / bacula / src / tools / Makefile.in
index 64d14f56afb3f52889c40ea1e639d977989c69b5..d9614403923e6059924ed37c252815dff5a03644 100644 (file)
@@ -25,6 +25,11 @@ dummy:
 
 #
 
+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
@@ -32,6 +37,15 @@ EXTRAOBJS = @OBJLIST@
 
 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:
@@ -40,26 +54,31 @@ DIRCONFOBJS = ../dird/dird_conf.o ../dird/run_conf.o ../dird/inc_conf.o
 .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) \
@@ -74,17 +93,18 @@ realclean: clean
 
 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)
@@ -101,7 +121,7 @@ depend:
        @$(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 \