+#
+# Bacula Makefile for the File daemon
+#
+# Version $Id$
+#
+
@MCOMMON@
srcdir = .
#
SVRSRCS = filed.c authenticate.c backup.c estimate.c \
- filed_conf.c job.c \
+ filed_conf.c heartbeat.c job.c \
restore.c status.c verify.c verify_vol.c
SVROBJS = filed.o authenticate.o backup.o estimate.o \
- filed_conf.o job.o \
+ filed_conf.o heartbeat.o job.o \
restore.o status.o verify.o verify_vol.o
# these are the objects that are changed by the .configure process
# inference rules
.c.o:
- $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
+ $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
#-------------------------------------------------------------------------
-all: Makefile @WIN32@ bacula-fd
+all: Makefile @WIN32@ bacula-fd @STATIC_FD@
@echo "==== Make of filed is good ===="
@echo " "
win32/winlib.a:
- (cd win32; $(MAKE))
+ (cd win32; $(MAKE) DESTDIR=$(DESTDIR))
@rm -f bacula-fd.exe
win32/winmain.o:
- (cd win32; $(MAKE))
+ (cd win32; $(MAKE) DESTDIR=$(DESTDIR))
@rm -f bacula-fd.exe
win32/winres.res:
- (cd win32; $(MAKE))
+ (cd win32; $(MAKE) DESTDIR=$(DESTDIR))
@rm -f bacula-fd.exe
# win32 libraries if needed
win32: $(WIN32OBJS)
- (cd win32; $(MAKE))
+ (cd win32; $(MAKE) DESTDIR=$(DESTDIR))
@rm -f bacula-fd.exe
bacula-fd: $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a @WIN32@
- $(CXX) $(LDFLAGS) $(FD_LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
+ $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
$(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB)
static-bacula-fd: $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a @WIN32@
- $(CXX) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
+ $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
$(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB)
strip $@
clean:
@$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
+ @$(RMF) static-bacula-fd
if test -f win32/Makefile; then \
(cd win32; $(MAKE) clean); \
fi
(cd win32; $(MAKE) distclean); \
fi
+devclean: realclean
+ if test $(srcdir) = .; then $(MAKE) realclean; fi
+ (cd $(srcdir); $(RMF) Makefile)
+ if test -f win32/Makefile; then \
+ (cd win32; $(MAKE) devclean); \
+ fi
+
install: all
$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd
@srcconf=bacula-fd.conf; \
else \
destconf=$$srcconf; \
fi; \
- echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
- ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+ echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
+ ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
+ @if test -f static-bacula-fd; then \
+ $(INSTALL_PROGRAM) static-bacula-fd $(DESTDIR)$(sbindir)/static-bacula-fd; \
+ fi
+
+
uninstall:
(cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd)
(cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd.conf)
+ (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd.conf.new)