]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/cats/Makefile.in
Update doc
[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
16 SQL_INC=@SQL_INCLUDE@
17
18 first_rule: all
19 dummy:
20
21 #
22 SVRSRCS = cats.c sql.c
23 SVROBJS = cats.o sql.o
24
25 LIBSRCS = mysql.c bdb.c bdb_create.c bdb_get.c bdb_update.c \
26           bdb_delete.c bdb_find.c bdb_list.c \
27           sql.c sql_create.c sql_delete.c sql_find.c \
28           sql_get.c sql_list.c sql_update.c sqlite.c 
29 LIBOBJS = mysql.o bdb.o bdb_create.o bdb_get.o bdb_update.o \
30           bdb_delete.o bdb_find.o bdb_list.o \
31           sql.o sql_create.o sql_delete.o sql_find.o \
32           sql_get.o sql_list.o sql_update.o sqlite.o
33
34 .SUFFIXES:      .c .o
35 .PHONY:
36 .DONTCARE:
37
38 # inference rules
39 .c.o:
40         $(CXX) $(DEFS) $(DEBUG) -c $(CPPFLAGS) -I$(srcdir) -I$(basedir) $(SQL_INC) $(DINCLUDE) $(CFLAGS) $<
41 #-------------------------------------------------------------------------
42 all: Makefile libsql.a
43         @echo "==== Make of cats is good ===="
44         @echo " "
45
46 libsql.a: $(LIBOBJS)
47         $(AR) rc  $@ $(LIBOBJS)
48         $(RANLIB) $@
49
50 cats: $(SVROBJS) ../findlib/libfind.a
51         $(CC) $(LDFLAGS) -L../findlib -L../lib -o $@ $(SVROBJS) $(LIBS) $(DB_LIBS) -lfind -lbac
52
53 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
54         cd $(topdir) \
55           && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
56
57
58 clean:
59         $(RMF) cats core a.out *.o *.a *.bak *~ *.intpro *.extpro 1 2 3
60
61 realclean: clean
62         $(RMF) tags
63         $(RMF) make_mysql_tables grant_mysql_privileges drop_mysql_tables
64         $(RMF) create_mysql_database make_sqlite_tables sqlite
65         $(RMF) create_bdb_database drop_bdb_tables make_dbd_tables
66         $(RMF) make_catalog_backup delete_catalog_backup
67
68 distclean: realclean
69         if test $(srcdir) = .; then $(MAKE) realclean; fi
70         (cd $(srcdir); $(RMF) Makefile; $(RMF) -r CVS)
71
72 install:
73         $(INSTALL_SCRIPT) create_@DB_NAME@_database $(DESTDIR)$(sysconfdir)/create_@DB_NAME@_database
74         $(INSTALL_SCRIPT) drop_@DB_NAME@_tables $(DESTDIR)$(sysconfdir)/drop_@DB_NAME@_tables
75         $(INSTALL_SCRIPT) make_@DB_NAME@_tables $(DESTDIR)$(sysconfdir)/make_@DB_NAME@_tables
76         $(INSTALL_SCRIPT) drop_bacula_tables $(DESTDIR)$(sysconfdir)/drop_bacula_tables
77         $(INSTALL_SCRIPT) make_bacula_tables $(DESTDIR)$(sysconfdir)/make_bacula_tables
78         $(INSTALL_SCRIPT) make_catalog_backup $(DESTDIR)$(sysconfdir)/make_catalog_backup  
79         $(INSTALL_SCRIPT) delete_catalog_backup $(DESTDIR)$(sysconfdir)/delete_catalog_backup  
80
81 uninstall:
82         (cd $(DESTDIR)$(sysconfdir); $(RMF) create_@DB_NAME@_database)
83         (cd $(DESTDIR)$(sysconfdir); $(RMF) drop_@DB_NAME@_tables)
84         (cd $(DESTDIR)$(sysconfdir); $(RMF) make_@DB_NAME@_tables)
85         (cd $(DESTDIR)$(sysconfdir); $(RMF) drop_bacula_tables)
86         (cd $(DESTDIR)$(sysconfdir); $(RMF) make_bacula_tables)
87         (cd $(DESTDIR)$(sysconfdir); $(RMF) make_catalog_backup)
88         (cd $(DESTDIR)$(sysconfdir); $(RMF) delete_catalog_backup)
89
90
91 # Semi-automatic generation of dependencies:
92 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
93 # and it also includes system headers.
94 # `semi'-automatic since dependencies are generated at distribution time.
95
96 depend:
97         @$(MV) Makefile Makefile.bak
98         @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
99         @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
100         @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
101         @if test -f Makefile ; then \
102             $(RMF) Makefile.bak; \
103         else \
104            $(MV) Makefile.bak Makefile; \
105            echo -e "Something went wrong\n\a"; \
106         fi
107
108 # -----------------------------------------------------------------------
109 # DO NOT DELETE: nice dependency list follows