rpm-build/rpmdb/Makefile.am

70 lines
2.0 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@
2003-11-24 23:44:29 +03:00
DBLIBSRCS = db3.c db1.c falloc.c
LIBDB = @libdb3@
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
noinst_HEADERS = falloc.h 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
librpmdb_la_SOURCES = $(DBLIBSRCS) \
dbconfig.c hdrNVR.c header.c fprint.c legacy.c merge.c poptDB.c \
rpmhash.c rpmdb.c rpmvercmp.c tagname.c tagtbl.c
2002-03-25 23:16:26 +03:00
librpmdb_la_LDFLAGS = -release @VERSION@ @libdb3@
2006-01-15 00:58:13 +03:00
librpmdb_la_LIBADD = $(LIBDB) $(LIBELF) $(LIBPOPT) $(top_builddir)/rpmio/librpmio.la
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
falloc.lo: falloc.c $(top_srcdir)/system.h $(top_srcdir)/rpmio/rpmio.h falloc.h
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
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)
2002-03-25 23:16:26 +03:00
tfalloc: librpmdb.la tfalloc.o
2004-03-22 14:37:21 +03:00
$(LINK) -all-static $@.o $< $(mylibpaths) $(mylibs) $(LIBS)