2 # Bacula Director Makefile
16 # this dir relative to top dir
25 SVRSRCS = dird.c authenticate.c autoprune.c \
26 autorecycle.c backup.c \
27 catreq.c dird_conf.c \
28 fd_cmds.c getmsg.c job.c \
29 mountreq.c msgchan.c newvol.c \
30 run_conf.c restore.c \
31 scheduler.c ua_cmds.c \
33 ua_db_query.c ua_retention.c \
34 ua_input.c ua_output.c ua_prune.c \
36 ua_select.c ua_server.c \
38 SVROBJS = dird.o authenticate.o autoprune.o \
39 autorecycle.o backup.o \
40 catreq.o dird_conf.o \
41 fd_cmds.o getmsg.o job.o \
42 mountreq.o msgchan.o newvol.o \
43 run_conf.o restore.o \
44 scheduler.o ua_cmds.o \
46 ua_db_query.o ua_retention.o \
47 ua_input.o ua_output.o ua_prune.o \
49 ua_select.o ua_server.o \
52 # these are the objects that are changed by the .configure process
61 $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $<
62 #-------------------------------------------------------------------------
63 all: Makefile bacula-dir
64 @echo "==== Make of dird is good ===="
67 bacula-dir: $(SVROBJS) ../lib/libbac.a ../cats/libsql.a
68 $(CXX) $(LDFLAGS) -L../lib -L../cats -o $@ $(SVROBJS) \
69 -lsql $(LIBS) $(DLIB) -lbac -lm
71 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
73 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
76 @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
79 @$(RMF) tags bacula-dir.conf
82 if test $(srcdir) = .; then $(MAKE) realclean; fi
83 (cd $(srcdir); $(RMF) Makefile)
86 $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir
87 @srcconf=bacula-dir.conf; \
88 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
89 destconf=$$srcconf.new; \
90 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
94 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
95 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
97 if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \
98 destconf=$$srcconf.new; \
99 echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \
101 destconf=$$srcconf; \
103 echo "${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \
104 ${INSTALL_DATA} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf
108 (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir)
109 (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf)
113 # Semi-automatic generation of dependencies:
114 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
115 # and it also includes system headers.
116 # `semi'-automatic since dependencies are generated at distribution time.
119 @$(MV) Makefile Makefile.bak
120 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
121 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
122 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
123 @if test -f Makefile ; then \
124 $(RMF) Makefile.bak; \
126 $(MV) Makefile.bak Makefile; \
127 echo -e "Something went wrong\n\a"; \
130 # -----------------------------------------------------------------------
131 # DO NOT DELETE: nice dependency list follows