# # # 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 = . .PATH: . # one up basedir = .. # top dir topdir = ../.. # this dir relative to top dir thisdir = src/cats CPPFLAGS += -DBUILDING_CATS DEBUG= MKDIR=$(topdir)/autoconf/mkinstalldirs SQL_INC= first_rule: all dummy: # SVRSRCS = cats.c sql.c SVROBJS = cats.o sql.o LIBSRCS = mysql.c bdb.c bdb_create.c bdb_get.c bdb_update.c \ bdb_delete.c bdb_find.c bdb_list.c \ sql.c sql_cmds.c sql_create.c sql_delete.c sql_find.c \ sql_get.c sql_list.c sql_update.c sqlite.c \ postgresql.c LIBOBJS = mysql.o bdb.o bdb_create.o bdb_get.o bdb_update.o \ bdb_delete.o bdb_find.o bdb_list.o \ sql.o sql_cmds.o sql_create.o sql_delete.o sql_find.o \ sql_get.o sql_list.o sql_update.o sqlite.o \ postgresql.o .SUFFIXES: .c .o .PHONY: .DONTCARE: # inference rules .c.o: @echo "Compiling $<" $(NO_ECHO)$(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) $(DINCLUDE) $(CFLAGS) $< #------------------------------------------------------------------------- all: Makefile libsql.a @echo "==== Make of cats is good ====" @echo " " libsql.a: $(LIBOBJS) @echo "Making $@ ..." $(AR) rc $@ $(LIBOBJS) $(RANLIB) $@ cats: $(SVROBJS) ../findlib/libfind.a $(CC) $(WLDFLAGS) $(LDFLAGS) -L../findlib -L../lib -o $@ $(SVROBJS) $(LIBS) $(DB_LIBS) -lfind -lbac Makefile: $(srcdir)/Makefile.in $(topdir)/config.status cd $(topdir) \ && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status clean: $(RMF) cats core a.out *.o *.a *.bak *~ *.intpro *.extpro 1 2 3 realclean: clean $(RMF) tags $(RMF) create_bacula_database update_bacula_tables make_bacula_tables $(RMF) grant_bacula_privileges drop_bacula_tables drop_bacula_database $(RMF) create_bdb_database update_bdb_tables make_bdb_tables $(RMF) grant_bdb_privileges drop_bdb_tables drop_bdb_database $(RMF) create_mysql_database update_mysql_tables make_mysql_tables $(RMF) grant_mysql_privileges drop_mysql_tables drop_mysql_database $(RMF) create_postgresql_database update_postgresql_tables make_postgresql_tables $(RMF) grant_postgresql_privileges drop_postgresql_tables drop_postgresql_database $(RMF) create_sqlite_database update_sqlite_tables make_sqlite_tables $(RMF) grant_sqlite_privileges drop_sqlite_tables drop_sqlite_database $(RMF) create_sqlite3_database update_sqlite3_tables make_sqlite3_tables $(RMF) grant_sqlite3_privileges drop_sqlite3_tables drop_sqlite3_database $(RMF) mysql sqlite postgresql $(RMF) make_catalog_backup delete_catalog_backup 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: $(INSTALL_SCRIPT) create_bdb_database $(DESTDIR)$(scriptdir)/create_bdb_database $(INSTALL_SCRIPT) update_bdb_tables $(DESTDIR)$(scriptdir)/update_bdb_tables $(INSTALL_SCRIPT) make_bdb_tables $(DESTDIR)$(scriptdir)/make_bdb_tables $(INSTALL_SCRIPT) grant_bdb_privileges $(DESTDIR)$(scriptdir)/grant_bdb_privileges $(INSTALL_SCRIPT) drop_bdb_tables $(DESTDIR)$(scriptdir)/drop_bdb_tables $(INSTALL_SCRIPT) drop_bdb_database $(DESTDIR)$(scriptdir)/drop_bdb_database $(INSTALL_SCRIPT) create_bacula_database $(DESTDIR)$(scriptdir)/create_bacula_database $(INSTALL_SCRIPT) update_bacula_tables $(DESTDIR)$(scriptdir)/update_bacula_tables $(INSTALL_SCRIPT) make_bacula_tables $(DESTDIR)$(scriptdir)/make_bacula_tables $(INSTALL_SCRIPT) grant_bacula_privileges $(DESTDIR)$(scriptdir)/grant_bacula_privileges $(INSTALL_SCRIPT) drop_bacula_tables $(DESTDIR)$(scriptdir)/drop_bacula_tables $(INSTALL_SCRIPT) drop_bacula_database $(DESTDIR)$(scriptdir)/drop_bacula_database @filename=make_catalog_backup; \ if test -f ${DESTDIR}${scriptdir}/$$filename; then \ destname=$$filename.new; \ echo " ==> Found existing $$filename, installing new file as $$destname"; \ else \ destname=$$filename; \ fi; \ echo "${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname"; \ ${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname @filename=delete_catalog_backup; \ if test -f ${DESTDIR}${scriptdir}/$$filename; then \ destname=$$filename.new; \ echo " ==> Found existing $$filename, installing new file as $$destname"; \ else \ destname=$$filename; \ fi; \ echo "${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname"; \ ${INSTALL_SCRIPT} $$filename ${DESTDIR}${scriptdir}/$$destname uninstall: (cd $(DESTDIR)$(scriptdir); $(RMF) create_bdb_database) (cd $(DESTDIR)$(scriptdir); $(RMF) update_bdb_tables) (cd $(DESTDIR)$(scriptdir); $(RMF) make_bdb_tables) (cd $(DESTDIR)$(scriptdir); $(RMF) grant_bdb_privileges) (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bdb_tables) (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bdb_database) (cd $(DESTDIR)$(scriptdir); $(RMF) create_bacula_database) (cd $(DESTDIR)$(scriptdir); $(RMF) update_bacula_tables) (cd $(DESTDIR)$(scriptdir); $(RMF) make_bacula_tables) (cd $(DESTDIR)$(scriptdir); $(RMF) grant_bacula_privileges) (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_tables) (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_database) (cd $(DESTDIR)$(scriptdir); $(RMF) make_catalog_backup) (cd $(DESTDIR)$(scriptdir); $(RMF) delete_catalog_backup) # 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) -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