2002-03-25 20:16:26 +00:00
# Makefile for rpm library.
AUTOMAKE_OPTIONS = 1.4 foreign
2002-08-03 16:35:14 +00:00
INCLUDES = -I. \
2002-03-25 20:16:26 +00:00
-I$( top_srcdir) /build \
-I$( top_srcdir) /rpmdb \
-I$( top_srcdir) /rpmio \
@INCPATH@
EXTRA_DIST = getdate.y
pkgincdir = $( pkgincludedir)
pkginc_HEADERS = \
2005-10-15 14:12:36 +00:00
header.h misc.h rpmcli.h rpmlib.h stringbuf.h
2002-03-25 20:16:26 +00:00
noinst_HEADERS = \
cpio.h depends.h fsm.h header_internal.h \
manifest.h psm.h \
rpmlead.h signature.h
mylibpaths = \
-L$( top_builddir) /lib/.libs \
-L$( top_builddir) /rpmdb/.libs \
2002-03-25 20:58:05 +00:00
-L$( top_builddir) /rpmio/.libs
2002-03-25 20:16:26 +00:00
2003-11-24 20:44:29 +00:00
mylibs = -lrpm -lrpmdb -lrpmio @LIBS@ @LIBINTL@
2002-03-25 20:16:26 +00:00
LIBS =
lib_LTLIBRARIES = librpm.la
librpm_la_SOURCES = \
2002-03-25 20:58:05 +00:00
closeall.c cpio.c depends.c formats.c fs.c fsm.c getdate.c \
2005-10-15 14:12:36 +00:00
header_internal.c manifest.c misc.c package.c \
2002-03-25 20:16:26 +00:00
problems.c poptI.c poptK.c poptQV.c psm.c query.c \
2005-10-15 14:44:31 +00:00
rpmchecksig.c rpminstall.c rpmlead.c rpmlibprov.c rpmrc.c \
2005-10-15 15:13:29 +00:00
signature.c stringbuf.c transaction.c \
2002-03-25 20:16:26 +00:00
verify.c
librpm_la_LDFLAGS = -release @VERSION@
2003-11-24 20:44:29 +00:00
librpm_la_LIBADD = $( top_builddir) /rpmdb/librpmdb.la $( top_builddir) /rpmio/librpmio.la @LIBPOPT@
librpm_la_DEPENDENCIES = $( top_builddir) /rpmdb/librpmdb.la $( top_builddir) /rpmio/librpmio.la
2002-03-25 20:16:26 +00:00
getdate.c : getdate .y
@echo expect 10 shift/reduce conflicts
$( YACC) $( srcdir) /getdate.y
-@if test -f y.tab.c; then \
{ echo "/*@-globstate -statictrans -unqualifiedtrans -noparams @*/" ; \
echo "/*@-retvalint -usedef -varuse -nullderef -nullassign @*/" ; \
echo "/*@-readonlytrans -modunconnomods -compdef @*/" ; \
sed -e 's,y.tab.c,getdate.c,' y.tab.c \
-e 's,^YYSTYPE ,static &,' \
-e 's,^short ,static &,' \
-e 's,^const short ,static &,' \
-e 's,^int yydebug,/*@unused@*/ static &,' \
-e 's,^int ,static &,' ; \
echo "/*@=readonlytrans =modunconnomods =compdef @*/" ; \
echo "/*@=retvalint =usedef =varuse =nullderef =nullassign @*/" ; \
echo "/*@=globstate =statictrans =unqualifiedtrans =noparams @*/" ; \
} > getdate.c ; \
rm -f y.tab.c; \
else \
if test -f getdate.tab.c ; then \
mv getdate.tab.c getdate.c ; \
else \
echo '*** Unable to create getdate.c' ; \
fi ; \
fi
2005-10-15 15:13:29 +00:00
BUILT_SOURCES = getdate.c
2002-03-25 20:16:26 +00:00
.PHONY : sources
sources :
@echo $( librpm_la_SOURCES:%= lib/%)
.PHONY : lclint
lclint :
lclint $( DEFS) $( INCLUDES) $( librpm_la_SOURCES)
th : th .c librpm .la
$( CC) $( CFLAGS) $( DEFS) $( INCLUDES) -o $@ $< $( mylibpaths) $( mylibs) $( LIBS)
trb : trb .o librpm .la
$( LINK) @LDFLAGS_STATIC@ $( CFLAGS) $( DEFS) $( INCLUDES) -o $@ trb.o $( mylibs) $( LIBS)
trhn : trhn .o librpm .la
$( LINK) @LDFLAGS_STATIC@ $( CFLAGS) $( DEFS) $( INCLUDES) -o $@ trhn.o $( mylibs) $( LIBS)