# # Bacula Director Makefile # # Version $Id: Makefile.in 4914 2007-05-27 09:34:40Z kerns $ # # # This file is pulled in by all the Unix Bacula Makefiles # so it has all the "common" definitions # DATE="10 November 2007" LSMDATE=10Nov07 VERSION=2.2.6 VERNAME=bacula-$(VERSION)# MAINT=Kern Sibbald# MAINTEMAIL=# WEBMAINT=# WEBMAINTEMAIL=# WEBPAGE=# FTPSITENAME=# FTPSITEDIR=# #------------------------------------------------------------------------- SHELL = /bin/sh # Installation target directories & other installation stuff prefix = exec_prefix = binprefix = manprefix = sbindir = /sbin sysconfdir = /etc scriptdir = /etc mandir = /usr/share/man manext = 8 NO_ECHO = @ # Tools & program stuff CC = cc CPP = cc -E CXX = /usr/bin/c++ MV = /usr/local/bin/mv RM = /usr/local/bin/rm RMF = /usr/local/bin/rm -f CP = /usr/local/bin/cp SED = /usr/local/bin/sed AWK = /usr/local/bin/gawk ECHO = /usr/local/bin/echo CMP = /usr/bin/cmp TBL = /usr/bin/tbl AR = /usr/bin/ar RANLIB = ranlib MKDIR = /mnt/gmirror/ports/sysutils/bacula-client/work/bacula-2.2.6/autoconf/mkinstalldirs INSTALL = /usr/bin/install -c -o root -g wheel # add the -s to the following in PRODUCTION mode INSTALL_PROGRAM = /usr/bin/install -c -o root -g wheel -m 0754 INSTALL_DATA = /usr/bin/install -c -o root -g wheel -m 644 INSTALL_SCRIPT = /usr/bin/install -c -o root -g wheel -m 0754 INSTALL_CONFIG = /usr/bin/install -c -o root -g wheel -m 640 # Flags & libs CFLAGS = -fno-common CPPFLAGS = -I/usr/include/readline -I/usr/local/include LDFLAGS = -L/usr/local/lib TTOOL_LDFLAGS = #DEFS = -DHAVE_CONFIG_H LIBS = -lpthread -lintl WRAPLIBS = DINCLUDE = DLIB = DB_LIBS = PYTHON_LIBS = PYTHON_INC = OPENSSL_LIBS = # Windows (cygwin) flags WCFLAGS = WLDFLAGS = # X Include directory #XINC = -I/usr/X11R6/include @XPM_CFLAGS@ # extra libraries needed by X on some systems, X library location #XLIB = -L/usr/X11R6/lib @XPM_LIBS@ -lX11 # End of common section of the Makefile #------------------------------------------------------------------------- srcdir = . VPATH = . .PATH: . # one up basedir = .. # top dir topdir = ../.. # this dir relative to top dir thisdir = src/dird DEBUG= GETTEXT_LIBS = PYTHON_LIBS = PYTHON_INC = first_rule: all dummy: # SVRSRCS = dird.c admin.c authenticate.c \ autoprune.c backup.c bsr.c \ catreq.c dird_conf.c expand.c \ fd_cmds.c getmsg.c inc_conf.c job.c \ jobq.c migrate.c \ mountreq.c msgchan.c next_vol.c newvol.c \ pythondir.c \ recycle.c restore.c run_conf.c \ scheduler.c \ ua_acl.c ua_cmds.c ua_dotcmds.c \ ua_query.c \ ua_input.c ua_label.c ua_output.c ua_prune.c \ ua_purge.c ua_restore.c ua_run.c \ ua_select.c ua_server.c \ ua_status.c ua_tree.c ua_update.c verify.c SVROBJS = dird.o admin.o authenticate.o \ autoprune.o backup.o bsr.o \ catreq.o dird_conf.o expand.o \ fd_cmds.o getmsg.o inc_conf.o job.o \ jobq.o migrate.o \ mountreq.o msgchan.o next_vol.o newvol.o \ pythondir.o \ recycle.o restore.o run_conf.o \ scheduler.o \ ua_acl.o ua_cmds.o ua_dotcmds.o \ ua_query.o \ ua_input.o ua_label.o ua_output.o ua_prune.o \ ua_purge.o ua_restore.o ua_run.o \ ua_select.o ua_server.o \ ua_status.o ua_tree.o ua_update.o verify.o # these are the objects that are changed by the .configure process EXTRAOBJS = .SUFFIXES: .c .o .PHONY: .DONTCARE: # inference rules .c.o: @echo "Compiling $<" $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(DINCLUDE) $(CFLAGS) $< #------------------------------------------------------------------------- all: Makefile bacula-dir @echo "==== Make of dird is good ====" @echo " " bacula-dir: $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a @echo "Linking $@ ..." $(CXX) $(WLDFLAGS) $(LDFLAGS) -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \ -lsql -lfind -lbac -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \ $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) static-bacula-dir: $(SVROBJS) ../lib/libbac.a ../cats/libsql.a ../findlib/libfind.a $(CXX) $(WLDFLAGS) $(LDFLAGS) -static -L../lib -L../cats -L../findlib -o $@ $(SVROBJS) \ -lsql -lbac -lfind -lm $(PYTHON_LIBS) $(DLIB) $(DB_LIBS) $(LIBS) \ $(WRAPLIBS) $(GETTEXT_LIBS) $(OPENSSL_LIBS) strip $@ Makefile: $(srcdir)/Makefile.in $(topdir)/config.status cd $(topdir) \ && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status clean: @$(RMF) dird bacula-dir core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3 @$(RMF) static-bacula-dir realclean: clean @$(RMF) tags bacula-dir.conf distclean: realclean if test $(srcdir) = .; then $(MAKE) realclean; fi (cd $(srcdir); $(RMF) Makefile) devclean: realclean if test $(srcdir) = .; then $(MAKE) realclean; fi (cd $(srcdir); $(RMF) Makefile) install: all $(INSTALL_PROGRAM) bacula-dir $(DESTDIR)$(sbindir)/bacula-dir @srcconf=bacula-dir.conf; \ if test -f ${DESTDIR}${sysconfdir}/$$srcconf; then \ destconf=$$srcconf.new; \ echo " ==> Found existing $$srcconf, installing new conf file as $$destconf"; \ else \ destconf=$$srcconf; \ fi; \ echo "${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf"; \ ${INSTALL_CONFIG} $$srcconf ${DESTDIR}${sysconfdir}/$$destconf @if test -f ${DESTDIR}${scriptdir}/query.sql; then \ echo " ==> Saving existing query.sql to query.sql.old"; \ $(MV) -f ${DESTDIR}${scriptdir}/query.sql ${DESTDIR}${scriptdir}/query.sql.old; \ fi ${INSTALL_DATA} query.sql ${DESTDIR}${scriptdir}/query.sql @if test -f static-bacula-dir; then \ $(INSTALL_PROGRAM) static-bacula-dir $(DESTDIR)$(sbindir)/static-bacula-dir; \ fi uninstall: (cd $(DESTDIR)$(sbindir); $(RMF) bacula-dir) (cd $(DESTDIR)$(sysconfdir); $(RMF) bacula-dir.conf bacula-dir.conf.new) (cd $(DESTDIR)$(scriptdir); $(RMF) query.sql) # Semi-automatic generation of dependencies: # Use gcc -MM because X11 `makedepend' doesn't work on all systems # and it also includes system headers. # `semi'-automatic since dependencies are generated at distribution time. depend: @$(MV) Makefile Makefile.bak @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile @$(CXX) -S -M $(CPPFLAGS) $(XINC) $(PYTHON_INC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile @if test -f Makefile ; then \ $(RMF) Makefile.bak; \ else \ $(MV) Makefile.bak Makefile; \ echo " ===== Something went wrong in make depend ====="; \ fi # ----------------------------------------------------------------------- # DO NOT DELETE: nice dependency list follows