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) -L../lib -L../findlib -o $@ $(SVROBJS) \
69 $(WIN32LIBS) $(FDLIBS) -lfind -lbac -lm $(LIBS) $(DLIB)
71 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
73 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
76 @$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
77 if test -f win32/Makefile; then \
78 (cd win32; $(MAKE) clean); \
82 @$(RMF) tags bacula-fd.conf
85 if test $(srcdir) = .; then $(MAKE) realclean; fi
86 (cd $(srcdir); $(RMF) Makefile)
87 if test -f win32/Makefile; then \
88 (cd win32; $(MAKE) distclean); \
92 $(INSTALL_PROGRAM) bacula-fd $(DESTDIR)$(sbindir)/bacula-fd
93 @srcconf=bacula-fd.conf; \
94 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
95 destconf=$$srcconf.new; \
96 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
100 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
101 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
104 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd)
105 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-fd.conf)
109 # Semi-automatic generation of dependencies:
110 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
111 # and it also includes system headers.
112 # `semi'-automatic since dependencies are generated at distribution time.
115 @$(MV) Makefile Makefile.bak
116 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
117 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
118 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
119 @if test -f Makefile ; then \
120 $(RMF) Makefile.bak; \
122 $(MV) Makefile.bak Makefile; \
123 echo -e "Something went wrong\n\a"; \
126 # -----------------------------------------------------------------------
127 # DO NOT DELETE: nice dependency list follows