2001-05-08 08:03:14 +08:00
|
|
|
# Makefile for rpm library.
|
|
|
|
|
|
|
|
AUTOMAKE_OPTIONS = 1.4 foreign
|
|
|
|
|
|
|
|
INCLUDES = \
|
|
|
|
-I$(top_srcdir) \
|
|
|
|
-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 \
|
|
|
|
@INCPATH@
|
|
|
|
|
2001-05-29 23:03:35 +08:00
|
|
|
EXTRA_DIST = db3.c db1.c falloc.c
|
2001-05-08 08:03:14 +08:00
|
|
|
|
|
|
|
pkgincdir = $(pkgincludedir)
|
2001-11-20 06:45:35 +08:00
|
|
|
pkginc_HEADERS = header.h hdrinline.h rpmdb.h
|
|
|
|
noinst_HEADERS = falloc.h fprint.h header_internal.h legacy.h rpmhash.h
|
2001-05-08 08:03:14 +08:00
|
|
|
|
|
|
|
mylibpaths = \
|
|
|
|
-L$(top_builddir)/lib/.libs \
|
|
|
|
-L$(top_builddir)/rpmio/.libs \
|
|
|
|
-L$(top_builddir)/popt/.libs
|
|
|
|
|
|
|
|
mylibs = -lrpm -lrpmio -lpopt @LIBS@ @INTLLIBS@ @LIBMISC@
|
|
|
|
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
|
|
|
|
|
|
|
lib_LTLIBRARIES = librpmdb.la
|
2001-06-09 04:45:59 +08:00
|
|
|
librpmdb_la_SOURCES = $(DBLIBSRCS) \
|
2001-11-20 06:45:35 +08:00
|
|
|
dbconfig.c fprint.c \
|
|
|
|
hdrNVR.c header.c header_internal.c legacy.c \
|
|
|
|
poptDB.c rpmhash.c rpmdb.c \
|
2001-10-22 05:43:32 +08:00
|
|
|
tagname.c tagtbl.c
|
2001-07-11 01:59:11 +08:00
|
|
|
librpmdb_la_LDFLAGS = -release @VERSION@ @libdb3@
|
2001-05-08 08:03:14 +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
|
|
|
|
|
|
|
# XXX Add internal libtool dependence
|
|
|
|
install-data-local:
|
|
|
|
@cd $(DESTDIR)/$(libdir) && \
|
|
|
|
sed -e "s|^dependency_libs='|& -lrpmio|" < librpmdb.la > .librpmdb.la && \
|
|
|
|
mv .librpmdb.la librpmdb.la
|
|
|
|
|
|
|
|
falloc.lo: falloc.c $(top_srcdir)/system.h $(top_srcdir)/rpmio/rpmio.h falloc.h
|
|
|
|
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
|
|
|
|
2001-10-22 05:43:32 +08:00
|
|
|
tagtbl.c: $(top_srcdir)/lib/rpmlib.h
|
|
|
|
@echo '#include "system.h"' > $@
|
|
|
|
@echo '#include "lib/rpmlib.h"' >> $@
|
|
|
|
@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;' >> $@
|
|
|
|
|
2001-05-31 06:42:43 +08:00
|
|
|
.created:
|
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:
|
2001-06-01 06:31:14 +08:00
|
|
|
rm -f $(DB3LOBJS) *.o .created
|
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
|
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
.PHONY: sources
|
|
|
|
sources:
|
|
|
|
@echo $(librpmdb_la_SOURCES:%=rpmdb/%)
|
|
|
|
|
|
|
|
.PHONY: lclint
|
|
|
|
lclint:
|
|
|
|
lclint $(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)
|
|
|
|
|
2001-05-31 06:42:43 +08:00
|
|
|
tfalloc: librpmdb.la tfalloc.o
|
|
|
|
$(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS)
|