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. \
|
2001-05-08 08:03:14 +08:00
|
|
|
-I$(top_srcdir)/build \
|
|
|
|
-I$(top_srcdir)/lib \
|
|
|
|
-I$(top_srcdir)/rpmio \
|
2001-10-21 06:31:09 +08:00
|
|
|
-I$(top_srcdir)/beecrypt \
|
2001-05-08 08:03:14 +08:00
|
|
|
-I$(top_srcdir)/popt \
|
2002-06-20 10:19:21 +08:00
|
|
|
@WITH_LIBELF_INCLUDE@ \
|
2001-05-08 08:03:14 +08:00
|
|
|
@INCPATH@
|
|
|
|
|
2002-05-03 06:16:30 +08:00
|
|
|
EXTRA_DIST = db3.c
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2002-03-18 05:13:43 +08:00
|
|
|
EXTRA_PROGRAMS = tjfn
|
|
|
|
|
|
|
|
tjfn_SOURCES = tjfn.c
|
|
|
|
tjfn_LDFLAGS = -all-static
|
|
|
|
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-02 05:34:06 +08:00
|
|
|
mylibs = librpmdb.la
|
2001-05-08 08:03:14 +08:00
|
|
|
|
|
|
|
LIBS =
|
|
|
|
|
2001-05-08 21:59:47 +08:00
|
|
|
DB3LOBJS = $(shell cat $(top_builddir)/$(WITH_DB_SUBDIR)/db3lobjs)
|
2001-05-08 08:03:14 +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
|
2002-12-15 05:39:19 +08:00
|
|
|
librpmdb_la_LDFLAGS = -release @VERSION@ \
|
|
|
|
$(top_builddir)/rpmio/librpmio.la \
|
|
|
|
$(top_builddir)/popt/libpopt.la \
|
|
|
|
@WITH_LIBELF_LIB@ \
|
|
|
|
@libdb3@
|
2002-12-01 06:15:29 +08:00
|
|
|
librpmdb_la_LIBADD = $(DBLIBOBJS) $(DB3LOBJS)
|
2001-05-31 06:42:43 +08:00
|
|
|
librpmdb_la_DEPENDENCIES = $(DBLIBOBJS) .created
|
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
|
2002-12-15 05:39:19 +08:00
|
|
|
dbconfig.c db3.c: 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[] = {' >> $@
|
|
|
|
$(AWK) '/(RPMTAG_[A-Z0-9]*)[ \t]+([0-9]*)/ && !/internal/ { if ($$2 == "=") { printf("\t{ \"%s\", %s },\n", $$1, $$3); } else { printf("\t{ \"%s\", %s },\n", $$2, $$3); } }' < $(top_srcdir)/lib/rpmlib.h >> $@
|
|
|
|
@echo ' { NULL, 0 }' >> $@
|
|
|
|
@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
|
|
|
|
|
|
|
.created: db.h
|
2001-05-08 08:03:14 +08:00
|
|
|
for lo in $(DB3LOBJS); do \
|
2001-05-26 03:51:53 +08:00
|
|
|
[ -f $$lo ] || $(LN_S) $(top_builddir)/$(WITH_DB_SUBDIR)/$$lo $$lo ; \
|
2001-05-08 08:03:14 +08:00
|
|
|
done
|
2001-05-31 06:42:43 +08:00
|
|
|
touch $@
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2001-05-08 21:59:47 +08:00
|
|
|
clean-local:
|
2002-05-21 22:56:05 +08:00
|
|
|
rm -f $(DB3LOBJS) *.o .created db.h
|
2001-05-08 08:03:14 +08:00
|
|
|
|
2001-10-22 05:43:32 +08:00
|
|
|
# XXX TODO: figger why .created addition here dinna work
|
|
|
|
BUILT_SOURCES = tagtbl.c # .created
|
|
|
|
|
2002-06-23 02:51:56 +08:00
|
|
|
rpmdb.lcd: Makefile.am ${librpmdb_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS}
|
|
|
|
-lclint ${DEFS} ${INCLUDES} ${librpmdb_la_SOURCES} -dump $@ 2>/dev/null
|
|
|
|
|
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:
|
|
|
|
$(LINT) $(DEFS) $(INCLUDES) $(librpmdb_la_SOURCES)
|
2001-05-31 06:42:43 +08:00
|
|
|
|
2001-06-06 20:36:31 +08:00
|
|
|
tdbi: librpmdb.la tdbi.o
|
|
|
|
$(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS)
|