Add -I$(top_builddir)/include/rpm to AM_CPPFLAGS.
[platform/upstream/rpm.git] / lib / Makefile.am
1 # Makefile for rpm library.
2
3 AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/rpm
4 AM_CPPFLAGS += -I$(top_srcdir)/lib
5 AM_CPPFLAGS += -I$(top_builddir)/rpmdb -I$(top_srcdir)/rpmdb
6 AM_CPPFLAGS += -I$(top_srcdir)/rpmio
7 AM_CPPFLAGS += @WITH_NSS_INCLUDE@
8 AM_CPPFLAGS += @WITH_POPT_INCLUDE@
9 AM_CPPFLAGS += -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 usrlibdir = $(libdir)
21 usrlib_LTLIBRARIES = librpm.la
22 librpm_la_SOURCES = \
23         cpio.c cpio.h depends.c formats.c fs.c fsm.c fsm.h getdate.c \
24         idtx.c manifest.c manifest.h misc.c package.c \
25         poptALL.c poptI.c poptQV.c psm.c psm.h query.c \
26         rpmal.c rpmchecksig.c rpmds.c rpmfi.c rpmgi.c rpmgi_internal.h \
27         rpminstall.c rpmtsscore.h rpmts_internal.h \
28         rpmlead.c rpmlead.h rpmlibprov.c rpmps.c rpmrc.c rpmte.c rpmts.c \
29         rpmvercmp.c signature.c signature.h stringbuf.c transaction.c \
30         verify.c rpmlock.c rpmlock.h misc.h
31 librpm_la_LDFLAGS = -release 4.4
32
33 librpm_la_LIBADD = \
34         $(top_builddir)/rpmdb/librpmdb.la \
35         $(top_builddir)/rpmio/librpmio.la \
36         @WITH_NSS_LIB@ \
37         @WITH_POPT_LIB@ \
38         @WITH_SELINUX_LIB@ \
39         @LIBINTL@
40
41 getdate.c: getdate.y
42         @echo expect 10 shift/reduce conflicts
43         $(YACC) $(srcdir)/getdate.y
44         -@if test -f y.tab.c; then \
45          { sed  -e 's,y.tab.c,getdate.c,' y.tab.c \
46                 -e 's,^YYSTYPE ,static &,' \
47                 -e 's,^short ,static &,' \
48                 -e 's,^const short ,static &,' \
49                 -e 's,^int yydebug,/*@unused@*/ static &,' \
50                 -e 's,^int ,static &,' ;\
51          } > getdate.c ;\
52            rm -f y.tab.c; \
53         else \
54            if test -f getdate.tab.c ; then \
55                mv getdate.tab.c getdate.c ; \
56            else \
57                echo '*** Unable to create getdate.c' ;\
58            fi ;\
59         fi
60
61 BUILT_SOURCES = getdate.c
62
63 check_PROGRAMS += tds
64 tds_SOURCES = tds.c
65 tds_LDADD = librpm.la   
66  
67 check_PROGRAMS += trb
68 trb_SOURCES = trb.c
69 trb_LDADD = librpm.la
70  
71 check_PROGRAMS += tthread
72 tthread_SOURCES = tthread.c
73 tthread_LDADD = librpm.la @WITH_LIBELF_LIB@
74  
75 check_PROGRAMS += tsystem
76 tsystem_SOURCES = tsystem.c
77 tsystem_LDADD = ../rpmio/librpmio.la @WITH_POPT_LIB@
78  
79 check_PROGRAMS += tcpu
80 tcpu_SOURCES = tcpu.c
81 tcpu_LDADD = librpm.la
82  
83 check_PROGRAMS += tplatform
84 tplatform_SOURCES = tplatform.c
85 tplatform_LDADD = librpm.la
86  
87 check_PROGRAMS += tgi
88 tgi_SOURCES = tgi.c
89 tgi_LDADD = librpm.la
90