]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/Makefile.in
For symmetry, add this file. At present, all it does is update the version table.
[bacula/bacula] / bacula / src / cats / Makefile.in
1
2 @MCOMMON@
3
4 srcdir =        .
5 .PATH:          .
6
7 # one up
8 basedir = ..
9 # top dir
10 topdir = ../..
11 # this dir relative to top dir
12 thisdir = src/cats
13
14 DEBUG=@DEBUG@
15 MKDIR=$(topdir)/autoconf/mkinstalldirs
16
17 SQL_INC=@SQL_INCLUDE@
18
19 first_rule: all
20 dummy:
21
22 #
23 SVRSRCS = cats.c sql.c
24 SVROBJS = cats.o sql.o
25
26 LIBSRCS = mysql.c bdb.c bdb_create.c bdb_get.c bdb_update.c \
27           bdb_delete.c bdb_find.c bdb_list.c \
28           sql.c sql_create.c sql_delete.c sql_find.c \
29           sql_get.c sql_list.c sql_update.c sqlite.c \
30           postgresql.c
31 LIBOBJS = mysql.o bdb.o bdb_create.o bdb_get.o bdb_update.o \
32           bdb_delete.o bdb_find.o bdb_list.o \
33           sql.o sql_create.o sql_delete.o sql_find.o \
34           sql_get.o sql_list.o sql_update.o sqlite.o \
35           postgresql.o
36
37 .SUFFIXES:      .c .o
38 .PHONY:
39 .DONTCARE:
40
41 # inference rules
42 .c.o:
43         $(CXX) $(DEFS) $(DEBUG) -c $(WCFLAGS) $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) $(DINCLUDE) $(CFLAGS) $<
44 #-------------------------------------------------------------------------
45 all: Makefile libsql.a
46         @echo "==== Make of cats is good ===="
47         @echo " "
48
49 libsql.a: $(LIBOBJS)
50         $(AR) rc  $@ $(LIBOBJS)
51         $(RANLIB) $@
52
53 cats: $(SVROBJS) ../findlib/libfind.a
54         $(CC) $(WLDFLAGS) $(LDFLAGS) -L../findlib -L../lib -o $@ $(SVROBJS) $(LIBS) $(DB_LIBS) -lfind -lbac
55
56 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
57         cd $(topdir) \
58           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
59
60
61 clean:
62         $(RMF) cats core a.out *.o *.a *.bak *~ *.intpro *.extpro 1 2 3
63
64 realclean: clean
65         $(RMF) tags
66         $(RMF) make_mysql_tables grant_mysql_privileges drop_mysql_tables
67         $(RMF) make_postgresql_tables grant_postgresql_privileges drop_postgresql_tables
68         $(RMF) create_mysql_database create_postgresql_database make_sqlite_tables sqlite
69         $(RMF) create_bdb_database drop_bdb_tables make_dbd_tables
70         $(RMF) make_catalog_backup delete_catalog_backup
71         $(RMF) update_mysql_tables update_sqlite_tables create_sqlite_database
72         $(RMF) drop_bacula_tables drop_sqlite_tables make_bacula_tables
73         $(RMF) update_bacula_tables
74         $(RMF) drop_bdb_tables make_bdb_tables mysql postgresql
75
76 distclean: realclean
77         if test $(srcdir) = .; then $(MAKE) realclean; fi
78         (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
79
80 install:
81         $(MKDIR) $(DESTDIR)$(datadir)/bacula
82         $(INSTALL_SCRIPT) create_@DB_NAME@_database $(DESTDIR)$(scriptdir)/create_@DB_NAME@_database
83         $(INSTALL_SCRIPT) drop_@DB_NAME@_tables $(DESTDIR)$(scriptdir)/drop_@DB_NAME@_tables
84         $(INSTALL_SCRIPT) make_@DB_NAME@_tables $(DESTDIR)$(scriptdir)/make_@DB_NAME@_tables
85         $(INSTALL_SCRIPT) update_@DB_NAME@_tables $(DESTDIR)$(scriptdir)/update_@DB_NAME@_tables
86         $(INSTALL_SCRIPT) drop_bacula_tables $(DESTDIR)$(scriptdir)/drop_bacula_tables
87         $(INSTALL_SCRIPT) make_bacula_tables $(DESTDIR)$(scriptdir)/make_bacula_tables
88         $(INSTALL_SCRIPT) update_bacula_tables $(DESTDIR)$(scriptdir)/update_bacula_tables
89         $(INSTALL_SCRIPT) make_catalog_backup $(DESTDIR)$(scriptdir)/make_catalog_backup  
90         $(INSTALL_SCRIPT) delete_catalog_backup $(DESTDIR)$(scriptdir)/delete_catalog_backup  
91         $(INSTALL_SCRIPT) grant_mysql_privileges $(DESTDIR)$(scriptdir)/grant_mysql_privileges  
92         $(INSTALL_SCRIPT) grant_postgresql_privileges $(DESTDIR)$(scriptdir)/grant_postgresql_privileges        
93
94 uninstall:
95         (cd $(DESTDIR)$(scriptdir); $(RMF) create_@DB_NAME@_database)
96         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_@DB_NAME@_tables)
97         (cd $(DESTDIR)$(scriptdir); $(RMF) make_@DB_NAME@_tables)
98         (cd $(DESTDIR)$(scriptdir); $(RMF) update_@DB_NAME@_tables)
99         (cd $(DESTDIR)$(scriptdir); $(RMF) drop_bacula_tables)
100         (cd $(DESTDIR)$(scriptdir); $(RMF) make_bacula_tables)
101         (cd $(DESTDIR)$(scriptdir); $(RMF) update_bacula_tables)
102         (cd $(DESTDIR)$(scriptdir); $(RMF) make_catalog_backup)
103         (cd $(DESTDIR)$(scriptdir); $(RMF) delete_catalog_backup)
104         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_mysql_privileges)
105         (cd $(DESTDIR)$(scriptdir); $(RMF) grant_postgresql_privileges)
106
107
108 # Semi-automatic generation of dependencies:
109 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
110 # and it also includes system headers.
111 # `semi'-automatic since dependencies are generated at distribution time.
112
113 depend:
114         @$(MV) Makefile Makefile.bak
115         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
116         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
117         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
118         @if test -f Makefile ; then \
119             $(RMF) Makefile.bak; \
120         else \
121            $(MV) Makefile.bak Makefile; \
122            echo -e "Something went wrong\n\a"; \
123         fi
124
125 # -----------------------------------------------------------------------
126 # DO NOT DELETE: nice dependency list follows