2 # Bacula Director Makefile
14 # this dir relative to top dir
23 SVRSRCS = dird.c authenticate.c backup.c \
24 catreq.c dird_conf.c \
25 fd_cmds.c getmsg.c job.c \
26 mountreq.c msgchan.c newvol.c \
27 run_conf.c restore.c \
28 scheduler.c ua_cmds.c \
30 ua_db_query.c ua_retention.c \
31 ua_input.c ua_output.c ua_prune.c \
33 ua_select.c ua_server.c \
35 SVROBJS = dird.o authenticate.o backup.o \
36 catreq.o dird_conf.o \
37 fd_cmds.o getmsg.o job.o \
38 mountreq.o msgchan.o newvol.o \
39 run_conf.o restore.o \
40 scheduler.o ua_cmds.o \
42 ua_db_query.o ua_retention.o \
43 ua_input.o ua_output.o ua_prune.o \
45 ua_select.o ua_server.o \
48 # these are the objects that are changed by the .configure process
57 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
58 #-------------------------------------------------------------------------
59 all: Makefile bacula-dir
60 @echo "==== Make of dird is good ===="
63 bacula-dir: $(SVROBJS) ../lib/libbac.a ../cats/libsql.a
64 $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(SVROBJS) \
65 -lsql $(LIBS) $(DLIB) -lbac -lm
67 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
69 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
72 @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
75 @$(RMF) tags bacula-dir.conf
78 if test $(srcdir) = .; then $(MAKE) realclean; fi
79 (cd $(srcdir); $(RMF) Makefile)
82 $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
83 @srcconf=bacula-dir.conf; \
84 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
85 destconf=$$srcconf.new; \
86 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
90 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
91 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
93 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
94 destconf=$$srcconf.new; \
95 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
99 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
100 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
104 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
105 (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.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