11 # this dir relative to top dir
22 SVRSRCS = cats.c sql.c
23 SVROBJS = cats.o sql.o
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
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 ===="
47 $(AR) rcs $@ $(LIBOBJS)
50 cats: $(SVROBJS) ../findlib/libfind.a
51 $(CC) $(LDFLAGS) -L../findlib -L../lib -o $@ $(SVROBJS) $(LIBS) $(DLIB) -lfind -lbac
53 Makefile: $(srcdir)/Makefile.in $(topdir)/config.status
55 && CONFIG_FILES=$(thisdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
59 $(RMF) cats core a.out *.o *.a *.bak *~ *.intpro *.extpro 1 2 3
63 $(RMF) make_mysql_tables grant_mysql_privileges drop_mysql_tables
64 $(RMF) create_mysql_database make_sqlite_tables sqlite
67 if test $(srcdir) = .; then $(MAKE) realclean; fi
68 (cd $(srcdir); $(RMF) Makefile)
71 $(INSTALL_SCRIPT) create_mysql_database $(DESTDIR)$(sysconfdir)/create_mysql_database
72 $(INSTALL_SCRIPT) drop_mysql_tables $(DESTDIR)$(sysconfdir)/drop_mysql_tables
73 $(INSTALL_SCRIPT) make_mysql_tables $(DESTDIR)$(sysconfdir)/make_mysql_tables
76 (cd $(DESTDIR)$(sysconfdir); $(RMF) create_mysql_database)
77 (cd $(DESTDIR)$(sysconfdir); $(RMF) drop_mysql_tables)
78 (cd $(DESTDIR)$(sysconfdir); $(RMF) make_mysql_tables)
81 # Semi-automatic generation of dependencies:
82 # Use gcc -MM because X11 `makedepend' doesn't work on all systems
83 # and it also includes system headers.
84 # `semi'-automatic since dependencies are generated at distribution time.
87 @$(MV) Makefile Makefile.bak
88 @$(SED) "/^# DO NOT DELETE:/,$$ d" Makefile.bak > Makefile
89 @$(ECHO) "# DO NOT DELETE: nice dependency list follows" >> Makefile
90 @$(CC) -S -M $(CPPFLAGS) $(XINC) -I$(srcdir) -I$(basedir) $(SQL_INC) *.c >> Makefile
91 @if test -f Makefile ; then \
92 $(RMF) Makefile.bak; \
94 $(MV) Makefile.bak Makefile; \
95 echo -e "Something went wrong\n\a"; \
98 # -----------------------------------------------------------------------
99 # DO NOT DELETE: nice dependency list follows