2 # Bacula Director Makefile
14 # this dir relative to top dir
23 SVRSRCS = dird.c authenticate.c backup.c catreq.c dird_conf.c \
24 fd_cmds.c getmsg.c job.c \
25 mountreq.c msgchan.c newvol.c run_conf.c restore.c \
26 scheduler.c ua_cmds.c \
28 ua_db_query.c ua_retention.c \
29 ua_input.c ua_output.c ua_prune.c ua_run.c \
30 ua_select.c ua_server.c \
32 SVROBJS = dird.o authenticate.o backup.o catreq.o dird_conf.o \
33 fd_cmds.o getmsg.o job.o \
34 mountreq.o msgchan.o newvol.o run_conf.o restore.o \
35 scheduler.o ua_cmds.o \
37 ua_db_query.o ua_retention.o \
38 ua_input.o ua_output.o ua_prune.o ua_run.o \
39 ua_select.o ua_server.o \
42 # these are the objects that are changed by the .configure process
51 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
52 #-------------------------------------------------------------------------
53 all: Makefile bacula-dir
54 @echo "==== Make of dird is good ===="
57 bacula-dir: $(SVROBJS) ../lib/libbac.a ../cats/libsql.a
58 $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(SVROBJS) \
59 -lsql $(LIBS) $(DLIB) -lbac -lm
61 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
63 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
66 @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
69 @$(RMF) tags bacula-dir.conf
72 if test $(srcdir) = .; then $(MAKE) realclean; fi
73 (cd $(srcdir); $(RMF) Makefile)
76 $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
77 @srcconf=bacula-dir.conf; \
78 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
79 destconf=$$srcconf.new; \
80 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
84 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
85 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
87 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
88 destconf=$$srcconf.new; \
89 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
93 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
94 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
98 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
99 (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf)
103 # Semi-automatic generation of dependencies:
104 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
105 # and it also includes system headers.
106 # `semi'-automatic since dependencies are generated at distribution time.
109 @$(MV) Makefile Makefile.bak
110 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
111 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
112 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
113 @if test -f Makefile ; then \
114 $(RMF) Makefile.bak; \
116 $(MV) Makefile.bak Makefile; \
117 echo -e "Something went wrong\n\a"; \
120 # -----------------------------------------------------------------------
121 # DO NOT DELETE: nice dependency list follows