.c.o:
$(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile bacula-dir
+all: Makefile bacula-dir @STATIC_DIR@
@echo "==== Make of dird is good ===="
@echo " "
bacula-dir: $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
- $(CXX) $(LDFLAGS) $(DIR_LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
+ $(CXX) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
-lsql -lbac -lfind -lm $(LIBS) $(DLIB) $(DB_LIBS)
+static-bacula-dir: $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a
+ $(CXX) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \
+ -lsql -lbac -lfind -lm $(LIBS) $(DLIB) $(DB_LIBS)
+ strip $@
+
+
Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
cd $(topdir) \
&& CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
clean:
@$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
+ @$(RMF) static-bacula-dir
realclean: clean
@$(RMF) tags bacula-dir.conf
distclean: realclean
if test $(srcdir) = .; then $(MAKE) realclean; fi
- (cd $(srcdir); $(RMF) Makefile)
+ (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
install: all
$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
else \
destconf=$$srcconf; \
fi; \
- echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
- ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
- if test -f ${DESTDIR}${sysconfdir}/query.sql; then \
- $(MV) -f ${DESTDIR}${sysconfdir}/query.sql ${DESTDIR}${sysconfdir}/query.sql.save; \
+ echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
+ ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+ if test -f ${DESTDIR}${scriptdir}/query.sql; then \
+ $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.save; \
fi
- ${INSTALL_DATA} query.sql ${DESTDIR}${sysconfdir}/query.sql
+ ${INSTALL_DATA} query.sql ${DESTDIR}${scriptdir}/query.sql
uninstall:
(cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
- (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf)
- (cd $(DESTDIR)$(sysconfdir); $(RMF) query.sql)
+ (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new)
+ (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql)