2001-05-08 08:03:14 +08:00
|
|
|
# Makefile for rpm library.
|
|
|
|
|
|
|
|
AUTOMAKE_OPTIONS = 1.4 foreign
|
|
|
|
|
2002-12-01 06:15:29 +08:00
|
|
|
LINT = splint
|
|
|
|
|
2002-05-17 00:55:21 +08:00
|
|
|
INCLUDES = -I. \
|
2005-01-05 12:46:01 +08:00
|
|
|
-I$(top_srcdir) \
|
2001-05-08 08:03:14 +08:00
|
|
|
-I$(top_srcdir)/build \
|
|
|
|
-I$(top_srcdir)/lib \
|
|
|
|
-I$(top_srcdir)/rpmio \
|
2003-05-23 05:21:43 +08:00
|
|
|
@WITH_BEECRYPT_INCLUDE@ \
|
2001-05-08 08:03:14 +08:00
|
|
|
-I$(top_srcdir)/popt \
|
2005-01-18 07:58:09 +08:00
|
|
|
-I$(top_srcdir)/misc \
|
2005-02-03 02:47:42 +08:00
|
|
|
@WITH_SQLITE3_INCLUDE@ \
|
2002-06-20 10:19:21 +08:00
|
|
|
@WITH_LIBELF_INCLUDE@ \
|
2001-05-08 08:03:14 +08:00
|
|
|
@INCPATH@
|
|
|
|
|
2005-02-03 02:47:42 +08:00
|
|
|
EXTRA_DIST = db3.c sqlite.c db_emu.h
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2002-03-18 05:13:43 +08:00
|
|
|
EXTRA_PROGRAMS = tjfn
|
|
|
|
|
|
|
|
tjfn_SOURCES = tjfn.c
|
2005-01-05 03:31:31 +08:00
|
|
|
tjfn_LDFLAGS = @LDFLAGS_STATIC@
|
2002-03-18 05:13:43 +08:00
|
|
|
tjfn_LDADD = librpmdb.la
|
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
pkgincdir = $(pkgincludedir)
|
2002-07-14 03:08:51 +08:00
|
|
|
pkginc_HEADERS = db.h header.h hdrinline.h rpmdb.h rpmhash.h
|
|
|
|
noinst_HEADERS = fprint.h header_internal.h legacy.h
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2002-12-22 04:37:37 +08:00
|
|
|
pkgbindir = @RPMCONFIGDIR@
|
|
|
|
pkgbin_PROGRAMS = \
|
2004-10-21 08:24:38 +08:00
|
|
|
rpmdb_archive rpmdb_checkpoint rpmdb_deadlock rpmdb_dump rpmdb_load \
|
|
|
|
rpmdb_printlog rpmdb_recover rpmdb_svc rpmdb_stat rpmdb_upgrade \
|
|
|
|
rpmdb_verify
|
2002-12-22 04:37:37 +08:00
|
|
|
|
2002-12-02 05:34:06 +08:00
|
|
|
mylibs = librpmdb.la
|
2001-05-08 08:03:14 +08:00
|
|
|
|
|
|
|
LIBS =
|
|
|
|
|
2003-12-12 03:09:58 +08:00
|
|
|
# XXX watchout, ../db3/libdb.la created by this Makefile may surprise
|
|
|
|
libdb_la = $(top_builddir)/$(WITH_DB_SUBDIR)/libdb.la
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2003-12-12 03:09:58 +08:00
|
|
|
# XXX grrr, RPM_BUILD_ROOT prevents build pollution if/when -lrpm different
|
|
|
|
LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)
|
2003-03-07 06:50:04 +08:00
|
|
|
|
2002-12-02 05:34:06 +08:00
|
|
|
usrlibdir = $(libdir)@MARK64@
|
|
|
|
usrlib_LTLIBRARIES = librpmdb.la
|
2002-02-11 05:13:52 +08:00
|
|
|
librpmdb_la_SOURCES = \
|
2001-11-20 06:45:35 +08:00
|
|
|
dbconfig.c fprint.c \
|
2002-04-08 03:52:42 +08:00
|
|
|
hdrNVR.c header.c header_internal.c legacy.c merge.c \
|
2001-11-20 06:45:35 +08:00
|
|
|
poptDB.c rpmhash.c rpmdb.c \
|
2001-10-22 05:43:32 +08:00
|
|
|
tagname.c tagtbl.c
|
2004-11-20 01:41:09 +08:00
|
|
|
librpmdb_la_LDFLAGS = -release 4.4 \
|
2002-12-15 05:39:19 +08:00
|
|
|
$(top_builddir)/rpmio/librpmio.la \
|
|
|
|
$(top_builddir)/popt/libpopt.la \
|
2005-02-03 02:47:42 +08:00
|
|
|
@WITH_SQLITE3_LIB@ \
|
2003-12-12 03:09:58 +08:00
|
|
|
@WITH_LIBELF_LIB@
|
|
|
|
librpmdb_la_LIBADD = $(DBLIBOBJS) $(libdb_la)
|
|
|
|
librpmdb_la_DEPENDENCIES = $(DBLIBOBJS) $(libdb_la)
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2002-05-21 22:56:05 +08:00
|
|
|
# XXX make sure that db.h symlink is generated
|
2005-02-03 02:47:42 +08:00
|
|
|
dbconfig.c $(DBLIBSRCS): db.h
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2002-06-23 02:51:56 +08:00
|
|
|
tagtbl.c: Makefile.am $(top_srcdir)/lib/rpmlib.h
|
|
|
|
@echo '/*@-bounds@*/' > $@
|
|
|
|
@echo '#include "system.h"' >> $@
|
|
|
|
@echo '#include <rpmlib.h>' >> $@
|
2001-10-22 05:43:32 +08:00
|
|
|
@echo '' >> $@
|
|
|
|
@echo '/*@observer@*/ /*@unchecked@*/' >> $@
|
|
|
|
@echo 'static const struct headerTagTableEntry_s rpmTagTbl[] = {' >> $@
|
2004-06-16 02:08:05 +08:00
|
|
|
${AWK} '/(RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ && !/internal/ { tt = "NULL"; if ($$5 == "c") {tt = "CHAR"} if ($$5 == "h") {tt = "INT16"} if ($$5 == "i") {tt = "INT32"} if ($$5 == "l") {tt = "INT64"} if ($$5 == "s") {tt = "STRING"} if ($$5 == "x") {tt = "BIN"} if ($$5 == "s[]") {tt = "STRING_ARRAY"} if ($$5 == "s{}") {tt = "I18NSTRING"} if ($$2 == "=") { printf("\t{ \"%s\", %s RPM_%s_TYPE },\n", $$1, $$3, tt) } else { printf("\t{ \"%s\", %s, RPM_%s_TYPE },\n", $$2, $$3, tt) } }' < $(top_srcdir)/lib/rpmlib.h >> $@
|
2004-10-10 01:44:27 +08:00
|
|
|
@echo ' { NULL, 0, 0 }' >> $@
|
2001-10-22 05:43:32 +08:00
|
|
|
@echo '};' >> $@
|
|
|
|
@echo '' >> $@
|
|
|
|
@echo '/*@observer@*/ /*@unchecked@*/' >> $@
|
|
|
|
@echo 'const struct headerTagTableEntry_s * rpmTagTable = rpmTagTbl;' >> $@
|
|
|
|
@echo '' >> $@
|
|
|
|
@echo '/*@unchecked@*/' >> $@
|
|
|
|
@echo 'const int rpmTagTableSize = sizeof(rpmTagTbl) / sizeof(rpmTagTbl[0]) - 1;' >> $@
|
2002-06-23 02:51:56 +08:00
|
|
|
@echo '/*@=bounds@*/' >> $@
|
2001-10-22 05:43:32 +08:00
|
|
|
|
2002-05-02 06:13:00 +08:00
|
|
|
db.h:
|
2002-05-21 22:56:05 +08:00
|
|
|
@ln -sf ../$(WITH_DB_SUBDIR)/db.h $@
|
2002-05-02 06:13:00 +08:00
|
|
|
|
2003-12-12 03:09:58 +08:00
|
|
|
# XXX grrr, force noinst libdb.la for db3.
|
|
|
|
$(libdb_la):
|
2004-10-16 20:50:52 +08:00
|
|
|
sed -e"/^libdir=/s/^.*$$/libdir=''/" < $(top_builddir)/$(WITH_DB_SUBDIR)/libdb-4.3.la > $(libdb_la)
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_archive_SOURCES =
|
|
|
|
rpmdb_archive_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_archive.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_checkpoint_SOURCES =
|
|
|
|
rpmdb_checkpoint_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_checkpoint.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_deadlock_SOURCES =
|
|
|
|
rpmdb_deadlock_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_deadlock.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_dump_SOURCES =
|
|
|
|
rpmdb_dump_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_dump.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_load_SOURCES =
|
|
|
|
rpmdb_load_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_load.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_printlog_SOURCES =
|
|
|
|
rpmdb_printlog_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_printlog.o \
|
2004-10-16 20:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/btree_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/crdel_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/dbreg_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/fileops_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/hash_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/qam_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/rep_autop.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/txn_autop.o \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_recover_SOURCES =
|
|
|
|
rpmdb_recover_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_recover.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_stat_SOURCES =
|
|
|
|
rpmdb_stat_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_stat.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_svc_SOURCES =
|
|
|
|
rpmdb_svc_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_proc.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_svc.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_server_util.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/gen_db_server.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_log.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_upgrade_SOURCES =
|
|
|
|
rpmdb_upgrade_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_upgrade.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
|
|
|
rpmdb_verify_SOURCES =
|
|
|
|
rpmdb_verify_LDADD = \
|
2003-11-24 03:50:52 +08:00
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/db_verify.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_cache.o \
|
|
|
|
$(top_builddir)/$(WITH_DB_SUBDIR)/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2001-05-08 21:59:47 +08:00
|
|
|
clean-local:
|
2003-12-12 03:09:58 +08:00
|
|
|
rm -f *.o db.h $(libdb_la)
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2003-12-12 03:09:58 +08:00
|
|
|
BUILT_SOURCES = tagtbl.c
|
2001-10-22 05:43:32 +08:00
|
|
|
|
2002-06-23 02:51:56 +08:00
|
|
|
rpmdb.lcd: Makefile.am ${librpmdb_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS}
|
2005-02-03 02:47:42 +08:00
|
|
|
-splint ${DEFS} ${INCLUDES} ${librpmdb_la_SOURCES} -dump $@ 2>/dev/null
|
2002-06-23 02:51:56 +08:00
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
.PHONY: sources
|
|
|
|
sources:
|
|
|
|
@echo $(librpmdb_la_SOURCES:%=rpmdb/%)
|
|
|
|
|
2002-12-01 06:15:29 +08:00
|
|
|
.PHONY: lint
|
|
|
|
lint:
|
2005-02-03 02:47:42 +08:00
|
|
|
$(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES) $(DBLIBSRCS)
|
2001-05-31 06:42:43 +08:00
|
|
|
|
2001-06-06 20:36:31 +08:00
|
|
|
tdbi: librpmdb.la tdbi.o
|
2005-01-05 03:31:31 +08:00
|
|
|
$(LINK) @LDFLAGS_STATIC@ $@.o $< $(mylibpaths) $(mylibs) $(LIBS)
|