11 # this dir relative to top dir
20 SVRSRCS = filed.c authenticate.c backup.c estimate.c \
22 restore.c status.c verify.c verify_vol.c
23 SVROBJS = filed.o authenticate.o backup.o estimate.o \
25 restore.o status.o verify.o verify_vol.o
27 # these are the objects that are changed by the .configure process
30 FDLIBS = @FDLIBS@ # extra libs for File daemon
32 # extra items for linking on Win32
33 WIN32OBJS = win32/winmain.o win32/winlib.a win32/winres.res
34 win32 = $(WIN32OBJS) -luser32 -lgdi32
36 WIN32LIBS = $(@WIN32@)
44 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
45 #-------------------------------------------------------------------------
46 all: Makefile @WIN32@ bacula-fd
47 @echo "==== Make of filed is good ===="
62 # win32 libraries if needed
67 bacula-fd: $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a @WIN32@
68 $(CXX) $(LDFLAGS) $(FD_LDFLAGS) -L../lib -L../findlib -o $@ $(SVROBJS) \
69 $(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB)
71 static-bacula-fd: $(SVROBJS) ../findlib/libfind.a ../lib/libbac.a @WIN32@
72 $(CXX) $(LDFLAGS) -static -L../lib -L../findlib -o $@ $(SVROBJS) \
73 $(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB)
77 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
79 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
82 @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
83 if test -f win32/Makefile; then \
84 (cd win32; $(MAKE) clean); \
88 @$(RMF) tags bacula-fd.conf
91 if test $(srcdir) = .; then $(MAKE) realclean; fi
92 (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
93 if test -f win32/Makefile; then \
94 (cd win32; $(MAKE) distclean); \
98 $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd
99 @srcconf=bacula-fd.conf; \
100 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
101 destconf=$$srcconf.new; \
102 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
104 destconf=$$srcconf; \
106 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
107 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
110 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd)
111 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd.conf)
115 # Semi-automatic generation of dependencies:
116 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
117 # and it also includes system headers.
118 # `semi'-automatic since dependencies are generated at distribution time.
121 @$(MV) Makefile Makefile.bak
122 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
123 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
124 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
125 @if test -f Makefile ; then \
126 $(RMF) Makefile.bak; \
128 $(MV) Makefile.bak Makefile; \
129 echo -e "Something went wrong\n\a"; \
132 # -----------------------------------------------------------------------
133 # DO NOT DELETE: nice dependency list follows