summaryrefslogtreecommitdiff
path: root/lib/Makefile.am
blob: aea97771c3b4481334b6722778c02662038c189b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Makefile for rpm library.

LINT = splint

AM_CPPFLAGS = -I. \
	-I$(top_srcdir) \
	-I$(top_srcdir)/build \
	-I$(top_srcdir)/rpmdb \
	-I$(top_srcdir)/rpmio \
	@WITH_BEECRYPT_INCLUDE@ \
	@WITH_POPT_INCLUDE@ \
	-I$(top_srcdir)/misc \
	@INCPATH@

EXTRA_DIST = getdate.y

EXTRA_PROGRAMS =

pkgincdir = $(pkgincludedir)
pkginc_HEADERS = \
	misc.h rpmcli.h rpmlib.h \
	rpmal.h rpmds.h rpmfi.h rpmgi.h rpmps.h rpmsx.h rpmte.h rpmts.h \
	stringbuf.h
noinst_HEADERS = \
	cpio.h fsm.h manifest.h psm.h rpmlead.h signature.h rpmlock.h

LIBS =

LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)

usrlibdir = $(libdir)
usrlib_LTLIBRARIES = librpm.la
librpm_la_SOURCES = \
	cpio.c depends.c formats.c fs.c fsm.c getdate.c \
	manifest.c misc.c package.c \
	poptALL.c poptI.c poptQV.c psm.c query.c \
	rpmal.c rpmchecksig.c rpmds.c rpmfi.c rpmgi.c rpminstall.c \
	rpmlead.c rpmlibprov.c rpmps.c rpmrc.c rpmsx.c rpmte.c rpmts.c \
	rpmvercmp.c signature.c stringbuf.c transaction.c \
	verify.c rpmlock.c
librpm_la_LDFLAGS = -release 4.4 $(LDFLAGS) \
	$(top_builddir)/rpmdb/librpmdb.la \
	$(top_builddir)/rpmio/librpmio.la \
	@WITH_POPT_LIB@ \
	@WITH_SELINUX_LIB@ \
	@LIBINTL@

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 -noeffectuncon @*/";\
	   echo "/*@-globs -evalorderuncon -modobserveruncon -modnomods @*/";\
	   echo "/*@unused@*/";\
	   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 "/*@=globs =evalorderuncon =modobserveruncon =modnomods @*/";\
	   echo "/*@=readonlytrans =modunconnomods =compdef =noeffectuncon @*/";\
	   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

BUILT_SOURCES = getdate.c # rpmlib.lcd

rpmlib.lcd: Makefile.am ${librpm_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS}
	-lclint ${DEFS} ${AM_CPPFLAGS} ${librpm_la_SOURCES} -dump $@ 2>/dev/null

.PHONY:	sources
sources:
	@echo $(librpm_la_SOURCES:%=lib/%)

.PHONY:	lint
lint:
	$(LINT) $(DEFS) $(AM_CPPFLAGS) $(librpm_la_SOURCES)

EXTRA_PROGRAMS += setfiles
setfiles_SOURCES = setfiles.c
setfiles_LDFLAGS = @LDFLAGS_STATIC@
setfiles_LDADD = -lselinux \
	../rpmio/librpmio.la \
	@WITH_POPT_LIB@
 
#EXTRA_PROGRAMS += tds
#tds_SOURCES = tds.c
#tds_LDADD = librpm.la	
 
EXTRA_PROGRAMS += trb
trb_SOURCES = trb.c
#trb_LDFLAGS = @LDFLAGS_STATIC@
trb_LDADD = librpm.la
 
EXTRA_PROGRAMS += tthread
tthread_SOURCES = tthread.c
tthread_LDFLAGS =
tthread_LDADD = librpm.la @WITH_LIBELF_LIB@
 
EXTRA_PROGRAMS += tsystem
tsystem_SOURCES = tsystem.c
tsystem_LDFLAGS =
tsystem_LDADD = ../rpmio/librpmio.la @WITH_POPT_LIB@
 
EXTRA_PROGRAMS += tre
tre_SOURCES = tre.c
tre_LDFLAGS = 
tre_LDADD = librpm.la -lselinux
 
EXTRA_PROGRAMS += tcpu
tcpu_SOURCES = tcpu.c
# tcpu_LDFLAGS = @LDFLAGS_STATIC@
tcpu_LDADD = librpm.la
 
EXTRA_PROGRAMS += tplatform
tplatform_SOURCES = tplatform.c
# tplatform_LDFLAGS = @LDFLAGS_STATIC@
tplatform_LDADD = librpm.la
 
EXTRA_PROGRAMS += tgi
tgi_SOURCES = tgi.c
# tgi_LDFLAGS = @LDFLAGS_STATIC@
tgi_LDADD = librpm.la

CLEANFILES = $(EXTRA_PROGRAMS)