rpm-build/rpmdb/Makefile.am

62 lines
1.7 KiB
Makefile
Raw Normal View History

2002-03-25 23:16:26 +03:00
# Makefile for rpm library.
AUTOMAKE_OPTIONS = 1.4 foreign
INCLUDES = -I. \
2002-03-25 23:16:26 +03:00
-I$(top_srcdir)/build \
-I$(top_srcdir)/lib \
-I$(top_srcdir)/rpmio \
@INCPATH@
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)
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 \
dbconfig.c hdrNVR.c header.c fprint.c legacy.c merge.c poptDB.c \
rpmhash.c rpmdb.c rpmvercmp.c tagname.c tagtbl.c
librpmdb_la_LDFLAGS = -release @VERSION@
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)