2001-05-08 08:03:14 +08:00
|
|
|
# Makefile for rpm library.
|
|
|
|
|
2007-09-05 16:41:55 +08:00
|
|
|
include $(top_srcdir)/rpm.am
|
|
|
|
|
2007-08-05 16:30:55 +08:00
|
|
|
AM_CPPFLAGS = -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@ \
|
2005-02-17 10:36:37 +08:00
|
|
|
@WITH_POPT_INCLUDE@ \
|
2005-01-18 07:58:09 +08:00
|
|
|
-I$(top_srcdir)/misc \
|
2005-02-03 02:47:42 +08:00
|
|
|
@WITH_SQLITE3_INCLUDE@ \
|
2007-08-22 17:54:31 +08:00
|
|
|
@WITH_LIBELF_INCLUDE@
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2007-08-28 05:40:58 +08:00
|
|
|
EXTRA_PROGRAMS =
|
|
|
|
check_PROGRAMS =
|
2007-09-17 20:14:05 +08:00
|
|
|
CLEANFILES =
|
2002-03-18 05:13:43 +08:00
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
pkgincdir = $(pkgincludedir)
|
2007-09-17 18:45:39 +08:00
|
|
|
pkginc_HEADERS = header.h hdrinline.h rpmdb.h
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2007-07-25 22:10:57 +08:00
|
|
|
usrlibdir = $(libdir)
|
2002-12-02 05:34:06 +08:00
|
|
|
usrlib_LTLIBRARIES = librpmdb.la
|
2002-02-11 05:13:52 +08:00
|
|
|
librpmdb_la_SOURCES = \
|
2007-09-10 16:28:38 +08:00
|
|
|
dbconfig.c fprint.c fprint.h \
|
|
|
|
hdrNVR.c header.c header_internal.c header_internal.h \
|
|
|
|
legacy.c legacy.h \
|
|
|
|
merge.c \
|
2007-09-17 18:45:39 +08:00
|
|
|
poptDB.c rpmhash.c rpmhash.h rpmdb.c rpmdb_internal.h \
|
2001-10-22 05:43:32 +08:00
|
|
|
tagname.c tagtbl.c
|
2007-08-14 22:18:10 +08:00
|
|
|
librpmdb_la_SOURCES += db3.c
|
|
|
|
if SQLITE3
|
|
|
|
librpmdb_la_SOURCES += sqlite.c
|
|
|
|
endif
|
2007-09-11 08:33:56 +08:00
|
|
|
librpmdb_la_LDFLAGS = -release 4.4
|
|
|
|
librpmdb_la_LIBADD = \
|
2002-12-15 05:39:19 +08:00
|
|
|
$(top_builddir)/rpmio/librpmio.la \
|
2007-09-02 14:17:43 +08:00
|
|
|
@WITH_BEECRYPT_LIB@ \
|
2005-02-17 10:36:37 +08:00
|
|
|
@WITH_POPT_LIB@ \
|
2005-02-03 02:47:42 +08:00
|
|
|
@WITH_SQLITE3_LIB@ \
|
2007-09-17 20:27:43 +08:00
|
|
|
@WITH_LIBELF_LIB@
|
|
|
|
if WITH_INTERNAL_DB
|
|
|
|
librpmdb_la_LIBADD += $(libdb_la)
|
|
|
|
else
|
|
|
|
librpmdb_la_LIBADD += @WITH_DB_LIB@
|
|
|
|
endif
|
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
|
2007-09-12 00:39:35 +08:00
|
|
|
@echo '#include "system.h"' > $@
|
2002-06-23 02:51:56 +08:00
|
|
|
@echo '#include <rpmlib.h>' >> $@
|
2007-07-16 16:11:41 +08:00
|
|
|
@echo '#include "debug.h"' >> $@
|
2001-10-22 05:43:32 +08:00
|
|
|
@echo '' >> $@
|
|
|
|
@echo 'static const struct headerTagTableEntry_s rpmTagTbl[] = {' >> $@
|
2007-07-16 16:11:41 +08:00
|
|
|
${AWK} '/(RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ && !/internal/ {tt = "NULL"; ta = "ANY"; if ($$5 == "c") {tt = "CHAR"; ta = "SCALAR"} if ($$5 == "c[]") {tt = "CHAR"; ta = "ARRAY"} if ($$5 == "h") {tt = "INT16"; ta = "SCALAR"} if ($$5 == "h[]") {tt = "INT16"; ta = "ARRAY"} if ($$5 == "i") {tt = "INT32"; ta = "SCALAR"} if ($$5 == "i[]") {tt = "INT32"; ta = "ARRAY"} if ($$5 == "l") {tt = "INT64"; ta = "SCALAR"} if ($$5 == "l[]") {tt = "INT64"; ta = "ARRAY"} if ($$5 == "s") {tt = "STRING"; ta = "SCALAR"} if ($$5 == "s[]") {tt = "STRING_ARRAY"; ta = "ARRAY"} if ($$5 == "s{}") {tt = "I18NSTRING"; ta = "SCALAR"} if ($$5 == "x") {tt = "BIN"; ta = "SCALAR"} if ($$2 == "=") { printf("\t{ \"%s\", %s RPM_%s_TYPE + RPM_%s_RETURN_TYPE },\n", $$1, $$3, tt, ta) } else { printf("\t{ \"%s\", %s, RPM_%s_TYPE + RPM_%s_RETURN_TYPE },\n", $$2, $$3, tt, ta) } }' < ${top_srcdir}/lib/rpmlib.h | sort >> $@
|
2004-10-10 01:44:27 +08:00
|
|
|
@echo ' { NULL, 0, 0 }' >> $@
|
2001-10-22 05:43:32 +08:00
|
|
|
@echo '};' >> $@
|
|
|
|
@echo '' >> $@
|
|
|
|
@echo 'const struct headerTagTableEntry_s * rpmTagTable = rpmTagTbl;' >> $@
|
|
|
|
@echo '' >> $@
|
|
|
|
@echo 'const int rpmTagTableSize = sizeof(rpmTagTbl) / sizeof(rpmTagTbl[0]) - 1;' >> $@
|
2007-09-17 20:14:05 +08:00
|
|
|
BUILT_SOURCES = tagtbl.c
|
|
|
|
|
2007-09-17 20:27:43 +08:00
|
|
|
if WITH_INTERNAL_DB
|
2007-09-17 23:53:47 +08:00
|
|
|
nodist_librpmdb_la_SOURCES = db.h
|
|
|
|
db.h: $(top_builddir)/db3/db.h
|
|
|
|
$(LN_S) $(top_builddir)/db3/db.h $@
|
2007-09-17 20:14:05 +08:00
|
|
|
BUILT_SOURCES += db.h
|
|
|
|
|
2007-09-17 23:53:47 +08:00
|
|
|
# XXX watchout, $(top_builddir)/db3/libdb.la created by this Makefile may surprise
|
|
|
|
libdb_la = $(top_builddir)/db3/libdb.la
|
2002-05-02 06:13:00 +08:00
|
|
|
|
2003-12-12 03:09:58 +08:00
|
|
|
# XXX grrr, force noinst libdb.la for db3.
|
2007-09-17 23:53:47 +08:00
|
|
|
$(libdb_la): $(top_builddir)/db3/libdb-4.6.la
|
2007-08-31 14:53:03 +08:00
|
|
|
sed -e"/^libdir=/s/^.*$$/libdir=''/" \
|
2007-09-17 23:53:47 +08:00
|
|
|
< $(top_builddir)/db3/libdb-4.6.la > $(libdb_la)
|
2007-08-31 22:27:10 +08:00
|
|
|
CLEANFILES += $(libdb_la)
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS =
|
|
|
|
|
|
|
|
rpmlibexec_PROGRAMS += rpmdb_archive
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_archive_SOURCES =
|
|
|
|
rpmdb_archive_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_archive.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_checkpoint
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_checkpoint_SOURCES =
|
|
|
|
rpmdb_checkpoint_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_checkpoint.o \
|
|
|
|
$(top_builddir)/db3/util_log.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_deadlock
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_deadlock_SOURCES =
|
|
|
|
rpmdb_deadlock_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_deadlock.o \
|
|
|
|
$(top_builddir)/db3/util_log.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_dump
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_dump_SOURCES =
|
|
|
|
rpmdb_dump_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_dump.o \
|
|
|
|
$(top_builddir)/db3/util_cache.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_load
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_load_SOURCES =
|
|
|
|
rpmdb_load_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_load.o \
|
|
|
|
$(top_builddir)/db3/util_cache.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_printlog
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_printlog_SOURCES =
|
|
|
|
rpmdb_printlog_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_printlog.o \
|
|
|
|
$(top_builddir)/db3/btree_autop.o \
|
|
|
|
$(top_builddir)/db3/crdel_autop.o \
|
|
|
|
$(top_builddir)/db3/db_autop.o \
|
|
|
|
$(top_builddir)/db3/dbreg_autop.o \
|
|
|
|
$(top_builddir)/db3/fileops_autop.o \
|
|
|
|
$(top_builddir)/db3/hash_autop.o \
|
|
|
|
$(top_builddir)/db3/qam_autop.o \
|
|
|
|
$(top_builddir)/db3/rep_autop.o \
|
|
|
|
$(top_builddir)/db3/txn_autop.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_recover
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_recover_SOURCES =
|
|
|
|
rpmdb_recover_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_recover.o \
|
|
|
|
$(top_builddir)/db3/util_cache.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_stat
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_stat_SOURCES =
|
|
|
|
rpmdb_stat_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_stat.o \
|
|
|
|
$(top_builddir)/db3/util_cache.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_svc
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_svc_SOURCES =
|
|
|
|
rpmdb_svc_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_server_proc.o \
|
|
|
|
$(top_builddir)/db3/db_server_svc.o \
|
|
|
|
$(top_builddir)/db3/db_server_util.o \
|
|
|
|
$(top_builddir)/db3/gen_db_server.o \
|
|
|
|
$(top_builddir)/db3/util_log.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_upgrade
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_upgrade_SOURCES =
|
|
|
|
rpmdb_upgrade_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_upgrade.o \
|
|
|
|
$(top_builddir)/db3/util_cache.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
rpmlibexec_PROGRAMS += rpmdb_verify
|
2002-12-22 04:37:37 +08:00
|
|
|
rpmdb_verify_SOURCES =
|
|
|
|
rpmdb_verify_LDADD = \
|
2007-09-17 23:53:47 +08:00
|
|
|
$(top_builddir)/db3/db_verify.o \
|
|
|
|
$(top_builddir)/db3/util_cache.o \
|
|
|
|
$(top_builddir)/db3/util_sig.o \
|
2002-12-22 04:37:37 +08:00
|
|
|
librpmdb.la
|
2007-09-17 20:27:43 +08:00
|
|
|
endif
|
2002-12-22 04:37:37 +08:00
|
|
|
|
2007-08-28 05:40:58 +08:00
|
|
|
check_PROGRAMS += tdbi
|
2007-08-09 21:04:18 +08:00
|
|
|
tdbi_SOURCES = tdbi.c
|
2007-08-17 00:54:36 +08:00
|
|
|
tdbi_LDADD = librpmdb.la
|
2007-08-09 21:04:18 +08:00
|
|
|
|
2007-09-17 20:14:05 +08:00
|
|
|
check_PROGRAMS += tjfn
|
|
|
|
tjfn_SOURCES = tjfn.c
|
|
|
|
tjfn_LDADD = librpmdb.la @WITH_BEECRYPT_LIB@
|
|
|
|
|
2007-08-09 21:04:18 +08:00
|
|
|
EXTRA_PROGRAMS += tsql
|
|
|
|
tsql_SOURCES = tsql.c
|
2007-08-17 00:54:36 +08:00
|
|
|
tsql_LDADD = librpmdb.la
|
2007-09-17 20:14:05 +08:00
|
|
|
|
|
|
|
CLEANFILES += $(BUILT_SOURCES)
|