2002-03-25 23:16:26 +03:00
# Makefile for rpm library.
AUTOMAKE_OPTIONS = 1.4 foreign
2002-08-03 20:35:14 +04:00
INCLUDES = -I. \
2002-03-25 23:16:26 +03:00
-I$( top_srcdir) /build \
-I$( top_srcdir) /lib \
-I$( top_srcdir) /rpmio \
@INCPATH@
2009-04-23 14:46:46 +04:00
LIBDB = -ldb
2005-10-15 23:16:25 +04:00
LIBELF = @WITH_LIBELF_LIB@
2006-01-15 00:58:13 +03:00
LIBPOPT = @LIBPOPT@
2002-03-25 23:16:26 +03:00
pkgincdir = $( pkgincludedir)
2005-10-15 18:12:36 +04:00
pkginc_HEADERS = hdrinline.h rpmdb.h
2009-04-23 13:49:52 +04:00
noinst_HEADERS = fprint.h rpmhash.h jhash.h
2002-03-25 23:16:26 +03:00
2004-03-22 14:37:21 +03:00
mylibpaths = -L$( top_builddir) /lib/.libs
mylibs = -lrpm
2002-03-25 23:16:26 +03:00
LIBS =
lib_LTLIBRARIES = librpmdb.la
2009-04-23 13:49:52 +04:00
librpmdb_la_SOURCES = db3.c \
2005-10-15 22:43:13 +04:00
dbconfig.c hdrNVR.c header.c fprint.c legacy.c merge.c poptDB.c \
2005-10-15 19:25:41 +04:00
rpmhash.c rpmdb.c rpmvercmp.c tagname.c tagtbl.c
2009-04-23 14:46:46 +04:00
librpmdb_la_LDFLAGS = -release @VERSION@
2010-03-31 19:36:41 +04:00
librpmdb_la_LIBADD = $( LIBDB) $( LIBELF) $( LIBPOPT) $( top_builddir) /rpmio/librpmio.la @WITH_SELINUX_LIB@
2004-03-22 14:37:21 +03:00
librpmdb_la_DEPENDENCIES = $( top_builddir) /rpmio/librpmio.la
2002-03-25 23:16:26 +03:00
2005-10-15 19:13:29 +04:00
tagtbl.c : Makefile .am $( top_srcdir ) /lib /rpmlib .h
@echo '/*@-bounds@*/' > $@
@echo '#include "system.h"' >> $@
2005-10-15 19:22:28 +04:00
@echo '#include "rpmlib.h"' >> $@
2005-10-15 19:13:29 +04:00
@echo '' >> $@
@echo '/*@observer@*/ /*@unchecked@*/' >> $@
2005-10-19 21:45:39 +04:00
@echo 'const struct headerTagTableEntry_s rpmTagTable[] = {' >> $@
2005-10-15 20:07:06 +04:00
${ 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 }' >> $@
2005-10-15 19:13:29 +04:00
@echo '};' >> $@
@echo '' >> $@
@echo '/*@unchecked@*/' >> $@
2005-10-19 21:45:39 +04:00
@echo 'const int rpmTagTableSize = sizeof(rpmTagTable) / sizeof(rpmTagTable[0]) - 1;' >> $@
2005-10-15 19:13:29 +04:00
@echo '/*@=bounds@*/' >> $@
BUILT_SOURCES = tagtbl.c
2002-03-25 23:16:26 +03:00
clean-local :
2002-03-26 18:21:55 +03:00
rm -f $( DB3LOBJS) *.o
2002-03-25 23:16:26 +03:00
.PHONY : sources
sources :
@echo $( librpmdb_la_SOURCES:%= rpmdb/%)
.PHONY : lclint
lclint :
lclint $( DEFS) $( INCLUDES) $( librpmdb_la_SOURCES)
tdbi : librpmdb .la tdbi .o
2004-03-22 14:37:21 +03:00
$( LINK) -all-static $@ .o $< $( mylibpaths) $( mylibs) $( LIBS)