RIP rpmsx and all its uses
[platform/upstream/rpm.git] / lib / Makefile.am
1 # Makefile for rpm library.
2
3 AM_CPPFLAGS = -I. \
4         -I$(top_srcdir) \
5         -I$(top_srcdir)/rpmdb \
6         -I$(top_srcdir)/rpmio \
7         @WITH_BEECRYPT_INCLUDE@ \
8         @WITH_POPT_INCLUDE@ \
9         -I$(top_srcdir)/misc
10 AM_CPPFLAGS += -DLOCALEDIR="\"$(localedir)\""
11 AM_CPPFLAGS += -DSYSCONFDIR="\"$(sysconfdir)\""
12 AM_CPPFLAGS += -DLOCALSTATEDIR="\"$(localstatedir)\""
13 AM_CPPFLAGS += -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\""
14 AM_CPPFLAGS += -DLIBRPMALIAS_FILENAME="\"@RPMCONFIGDIR@/rpmpopt-${VERSION}\""
15
16 EXTRA_DIST = getdate.y
17
18 check_PROGRAMS =
19
20 pkgincdir = $(pkgincludedir)
21 pkginc_HEADERS = \
22         idtx.h misc.h rpmcli.h rpmlib.h \
23         rpmal.h rpmds.h rpmfi.h rpmgi.h rpmps.h rpmte.h rpmts.h \
24         stringbuf.h
25
26 usrlibdir = $(libdir)
27 usrlib_LTLIBRARIES = librpm.la
28 librpm_la_SOURCES = \
29         cpio.c cpio.h depends.c formats.c fs.c fsm.c fsm.h getdate.c \
30         idtx.c manifest.c manifest.h misc.c package.c \
31         poptALL.c poptI.c poptQV.c psm.c psm.h query.c \
32         rpmal.c rpmchecksig.c rpmds.c rpmfi.c rpmgi.c rpminstall.c \
33         rpmlead.c rpmlead.h rpmlibprov.c rpmps.c rpmrc.c rpmte.c rpmts.c \
34         rpmvercmp.c signature.c signature.h stringbuf.c transaction.c \
35         verify.c rpmlock.c rpmlock.h
36 librpm_la_LDFLAGS = -release 4.4 \
37         $(top_builddir)/rpmdb/librpmdb.la \
38         $(top_builddir)/rpmio/librpmio.la \
39         @WITH_BEECRYPT_LIB@ \
40         @WITH_POPT_LIB@ \
41         @WITH_SELINUX_LIB@ \
42         @LIBINTL@
43
44 getdate.c: getdate.y
45         @echo expect 10 shift/reduce conflicts
46         $(YACC) $(srcdir)/getdate.y
47         -@if test -f y.tab.c; then \
48          { echo "/*@-globstate -statictrans -unqualifiedtrans -noparams @*/";\
49            echo "/*@-retvalint -usedef -varuse -nullderef -nullassign @*/";\
50            echo "/*@-readonlytrans -modunconnomods -compdef -noeffectuncon @*/";\
51            echo "/*@-globs -evalorderuncon -modobserveruncon -modnomods @*/";\
52            echo "/*@unused@*/";\
53            sed  -e 's,y.tab.c,getdate.c,' y.tab.c \
54                 -e 's,^YYSTYPE ,static &,' \
55                 -e 's,^short ,static &,' \
56                 -e 's,^const short ,static &,' \
57                 -e 's,^int yydebug,/*@unused@*/ static &,' \
58                 -e 's,^int ,static &,' ;\
59            echo "/*@=globs =evalorderuncon =modobserveruncon =modnomods @*/";\
60            echo "/*@=readonlytrans =modunconnomods =compdef =noeffectuncon @*/";\
61            echo "/*@=retvalint =usedef =varuse =nullderef =nullassign @*/";\
62            echo "/*@=globstate =statictrans =unqualifiedtrans =noparams @*/";\
63          } > getdate.c ;\
64            rm -f y.tab.c; \
65         else \
66            if test -f getdate.tab.c ; then \
67                mv getdate.tab.c getdate.c ; \
68            else \
69                echo '*** Unable to create getdate.c' ;\
70            fi ;\
71         fi
72
73 BUILT_SOURCES = getdate.c
74
75 if SELINUX
76 check_PROGRAMS += setfiles
77 setfiles_SOURCES = setfiles.c
78 # setfiles_LDFLAGS = @LDFLAGS_STATIC@
79 setfiles_LDADD = @WITH_SELINUX_LIB@ \
80         ../rpmio/librpmio.la \
81         @WITH_POPT_LIB@
82 endif
83
84 check_PROGRAMS += tds
85 tds_SOURCES = tds.c
86 tds_LDADD = librpm.la   
87  
88 check_PROGRAMS += trb
89 trb_SOURCES = trb.c
90 #trb_LDFLAGS = @LDFLAGS_STATIC@
91 trb_LDADD = librpm.la
92  
93 check_PROGRAMS += tthread
94 tthread_SOURCES = tthread.c
95 tthread_LDFLAGS =
96 tthread_LDADD = librpm.la @WITH_LIBELF_LIB@
97  
98 check_PROGRAMS += tsystem
99 tsystem_SOURCES = tsystem.c
100 tsystem_LDFLAGS =
101 tsystem_LDADD = ../rpmio/librpmio.la @WITH_POPT_LIB@
102  
103 check_PROGRAMS += tcpu
104 tcpu_SOURCES = tcpu.c
105 # tcpu_LDFLAGS = @LDFLAGS_STATIC@
106 tcpu_LDADD = librpm.la
107  
108 check_PROGRAMS += tplatform
109 tplatform_SOURCES = tplatform.c
110 # tplatform_LDFLAGS = @LDFLAGS_STATIC@
111 tplatform_LDADD = librpm.la
112  
113 check_PROGRAMS += tgi
114 tgi_SOURCES = tgi.c
115 # tgi_LDFLAGS = @LDFLAGS_STATIC@
116 tgi_LDADD = librpm.la
117
118 check_PROGRAMS += tufdio
119 tufdio_SOURCES = tufdio.c
120 # tgi_LDFLAGS = @LDFLAGS_STATIC@
121 tufdio_LDADD = librpm.la