1998-10-08 18:40:27 +08:00
|
|
|
# Makefile for rpm library.
|
|
|
|
|
1999-01-20 07:54:30 +08:00
|
|
|
AUTOMAKE_OPTIONS = 1.4 foreign
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2002-05-17 00:55:21 +08:00
|
|
|
INCLUDES = -I. \
|
2001-05-08 08:03:14 +08:00
|
|
|
-I$(top_srcdir)/build \
|
|
|
|
-I$(top_srcdir)/rpmdb \
|
|
|
|
-I$(top_srcdir)/rpmio \
|
2001-09-30 01:44:45 +08:00
|
|
|
-I$(top_srcdir)/beecrypt \
|
2001-05-08 08:03:14 +08:00
|
|
|
-I$(top_srcdir)/popt \
|
|
|
|
@INCPATH@
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
EXTRA_DIST = getdate.y
|
2000-03-23 23:49:50 +08:00
|
|
|
|
1999-01-27 02:08:14 +08:00
|
|
|
pkgincdir = $(pkgincludedir)
|
|
|
|
pkginc_HEADERS = \
|
2001-06-19 19:38:51 +08:00
|
|
|
misc.h rpmcli.h rpmlib.h stringbuf.h
|
1998-10-08 18:40:27 +08:00
|
|
|
noinst_HEADERS = \
|
2002-04-12 00:55:19 +08:00
|
|
|
cpio.h fsm.h manifest.h psm.h \
|
2002-03-14 01:59:49 +08:00
|
|
|
rpmal.h rpmds.h rpmfi.h rpmlead.h rpmte.h rpmts.h signature.h
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2001-05-08 08:03:14 +08:00
|
|
|
mylibpaths = \
|
2002-02-21 06:09:28 +08:00
|
|
|
-L$(top_builddir)/lib \
|
|
|
|
-L$(top_builddir)/rpmdb \
|
|
|
|
-L$(top_builddir)/rpmio \
|
|
|
|
-L$(top_builddir)/popt
|
2001-05-08 08:03:14 +08:00
|
|
|
|
|
|
|
mylibs = -lrpm -lrpmdb -lrpmio -lpopt @LIBS@ @INTLLIBS@ @LIBMISC@
|
2000-08-28 03:19:44 +08:00
|
|
|
LIBS =
|
1999-11-10 04:57:38 +08:00
|
|
|
|
1999-01-23 02:42:31 +08:00
|
|
|
lib_LTLIBRARIES = librpm.la
|
|
|
|
librpm_la_SOURCES = \
|
2001-05-11 12:01:04 +08:00
|
|
|
cpio.c depends.c formats.c fs.c fsm.c getdate.c \
|
2001-09-26 00:21:44 +08:00
|
|
|
manifest.c misc.c package.c \
|
2001-10-25 09:36:32 +08:00
|
|
|
problems.c poptI.c poptQV.c psm.c query.c \
|
2001-11-14 03:04:33 +08:00
|
|
|
rpmal.c rpmchecksig.c rpmds.c rpmfi.c rpminstall.c \
|
2002-03-14 01:59:49 +08:00
|
|
|
rpmlead.c rpmlibprov.c rpmrc.c rpmte.c rpmts.c rpmvercmp.c \
|
2001-10-22 05:43:32 +08:00
|
|
|
signature.c stringbuf.c transaction.c \
|
2001-06-09 04:45:59 +08:00
|
|
|
verify.c
|
2001-07-11 01:59:11 +08:00
|
|
|
librpm_la_LDFLAGS = -release @VERSION@
|
1998-10-08 18:40:27 +08:00
|
|
|
|
2000-06-13 15:15:15 +08:00
|
|
|
# XXX Add internal libtool dependence
|
2000-06-08 07:25:41 +08:00
|
|
|
install-data-local:
|
2000-06-08 07:55:10 +08:00
|
|
|
@cd $(DESTDIR)/$(libdir) && \
|
2001-05-17 03:19:15 +08:00
|
|
|
sed -e "s|^dependency_libs='|& -lrpmdb -lrpmio -lpopt|" < librpm.la > .librpm.la && \
|
2000-06-08 07:25:41 +08:00
|
|
|
mv .librpm.la librpm.la
|
|
|
|
|
2001-03-05 01:31:48 +08:00
|
|
|
getdate.c: getdate.y
|
|
|
|
@echo expect 10 shift/reduce conflicts
|
|
|
|
$(YACC) $(srcdir)/getdate.y
|
|
|
|
-@if test -f y.tab.c; then \
|
2001-06-04 21:55:58 +08:00
|
|
|
{ echo "/*@-globstate -statictrans -unqualifiedtrans -noparams @*/";\
|
2001-05-07 03:17:14 +08:00
|
|
|
echo "/*@-retvalint -usedef -varuse -nullderef -nullassign @*/";\
|
2001-10-16 22:58:57 +08:00
|
|
|
echo "/*@-readonlytrans -modunconnomods -compdef -noeffectuncon @*/";\
|
2001-10-16 01:53:34 +08:00
|
|
|
echo "/*@-globs -evalorderuncon -modobserveruncon -modnomods @*/";\
|
2001-10-18 00:43:36 +08:00
|
|
|
echo "/*@unused@*/";\
|
2001-05-07 03:17:14 +08:00
|
|
|
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 &,' ;\
|
2001-10-16 01:53:34 +08:00
|
|
|
echo "/*@=globs =evalorderuncon =modobserveruncon =modnomods @*/";\
|
2001-10-16 22:58:57 +08:00
|
|
|
echo "/*@=readonlytrans =modunconnomods =compdef =noeffectuncon @*/";\
|
2001-05-07 03:17:14 +08:00
|
|
|
echo "/*@=retvalint =usedef =varuse =nullderef =nullassign @*/";\
|
2001-06-04 21:55:58 +08:00
|
|
|
echo "/*@=globstate =statictrans =unqualifiedtrans =noparams @*/";\
|
2001-04-30 06:43:01 +08:00
|
|
|
} > getdate.c ;\
|
|
|
|
rm -f y.tab.c; \
|
2001-03-05 01:31:48 +08:00
|
|
|
else \
|
|
|
|
if test -f getdate.tab.c ; then \
|
|
|
|
mv getdate.tab.c getdate.c ; \
|
|
|
|
else \
|
|
|
|
echo '*** Unable to create getdate.c' ;\
|
|
|
|
fi ;\
|
|
|
|
fi
|
|
|
|
|
2001-10-22 05:43:32 +08:00
|
|
|
BUILT_SOURCES = getdate.c
|
1998-11-21 04:18:22 +08:00
|
|
|
|
2001-05-04 05:00:18 +08:00
|
|
|
.PHONY: sources
|
|
|
|
sources:
|
|
|
|
@echo $(librpm_la_SOURCES:%=lib/%)
|
|
|
|
|
1998-11-21 04:18:22 +08:00
|
|
|
.PHONY: lclint
|
|
|
|
lclint:
|
1999-11-10 04:57:38 +08:00
|
|
|
lclint $(DEFS) $(INCLUDES) $(librpm_la_SOURCES)
|
1999-04-21 03:17:23 +08:00
|
|
|
|
2000-12-03 05:53:44 +08:00
|
|
|
th: th.c librpm.la
|
2000-02-25 06:28:31 +08:00
|
|
|
$(CC) $(CFLAGS) $(DEFS) $(INCLUDES) -o $@ $< $(mylibpaths) $(mylibs) $(LIBS)
|
2001-07-07 04:37:42 +08:00
|
|
|
|
|
|
|
trb: trb.o librpm.la
|
|
|
|
$(LINK) @LDFLAGS_STATIC@ $(CFLAGS) $(DEFS) $(INCLUDES) -o $@ trb.o $(mylibs) $(LIBS)
|
2001-08-27 01:22:33 +08:00
|
|
|
|
2001-10-28 04:09:20 +08:00
|
|
|
ts: ts.o librpm.la
|
2002-02-21 06:09:28 +08:00
|
|
|
$(LINK) @LDFLAGS_STATIC@ $(CFLAGS) $(DEFS) $(INCLUDES) -o $@ ts.o $(mylibpaths) $(mylibs) $(LIBS)
|
2001-10-28 04:09:20 +08:00
|
|
|
|
2001-08-27 01:22:33 +08:00
|
|
|
trhn: trhn.o librpm.la
|
|
|
|
$(LINK) @LDFLAGS_STATIC@ $(CFLAGS) $(DEFS) $(INCLUDES) -o $@ trhn.o $(mylibs) $(LIBS)
|