Add bunch of missing includes to fix build with gcc 4.7
[apt.git] / apt-pkg / Makefile.am
1 localedir = $(datadir)/locale
2
3 lib_LTLIBRARIES = libapt-pkg.la
4
5 pkgconfigdir = $(libdir)/pkgconfig
6 pkgconfig_DATA = libapt-pkg.pc
7
8 libapt_pkg_la_LIBADD = @RPM_LIBS@
9 libapt_pkg_la_LDFLAGS = -version-info 3:0:0
10
11 AM_CPPFLAGS = -DLIBDIR=\"$(libdir)\" -DPKGDATADIR=\"$(pkgdatadir)\"
12 AM_CPPFLAGS += -DLOCALEDIR=\"$(localedir)\" -DAPT_DOMAIN=\"$(PACKAGE)\"
13 AM_CPPFLAGS += -I$(top_srcdir)/luaext
14
15 if WITH_LUAEXT
16 libapt_pkg_la_LIBADD += $(top_builddir)/luaext/libluaext.la
17 libapt_pkg_la_LIBADD += -llua
18 endif
19
20 libapt_pkg_la_SOURCES = \
21         contrib/cdromutl.cc \
22         contrib/cdromutl.h \
23         contrib/cmndline.cc \
24         contrib/cmndline.h \
25         contrib/configuration.cc \
26         contrib/configuration.h \
27         contrib/crc-16.cc \
28         contrib/crc-16.h \
29         contrib/error.cc \
30         contrib/error.h \
31         contrib/fileutl.cc \
32         contrib/fileutl.h \
33         contrib/hashes.cc \
34         contrib/hashes.h \
35         contrib/md5.h \
36         contrib/mmap.cc \
37         contrib/mmap.h \
38         contrib/progress.cc \
39         contrib/progress.h \
40         contrib/rhash.cc \
41         contrib/rhash.h \
42         contrib/sha1.h \
43         contrib/sptr.h \
44         contrib/sqlite.h \
45         contrib/sqlite.cc \
46         contrib/strutl.cc \
47         contrib/strutl.h \
48         contrib/system.h \
49         rpm/rapttypes.h \
50         rpm/raptheader.cc \
51         rpm/raptheader.h \
52         rpm/repomd.cc \
53         rpm/repomd.h \
54         rpm/aptcallback.h \
55         rpm/aptcallback.cc \
56         rpm/rpmhandler.cc \
57         rpm/rpmhandler.h \
58         rpm/rpmindexfile.cc \
59         rpm/rpmindexfile.h \
60         rpm/rpmlistparser.cc \
61         rpm/rpmlistparser.h \
62         rpm/rpmpackagedata.cc \
63         rpm/rpmpackagedata.h \
64         rpm/rpmpm.cc \
65         rpm/rpmpm.h \
66         rpm/rpmrecords.cc \
67         rpm/rpmrecords.h \
68         rpm/rpmsrcrecords.cc \
69         rpm/rpmsrcrecords.h \
70         rpm/rpmsystem.cc \
71         rpm/rpmsystem.h \
72         rpm/rpmversion.cc \
73         rpm/rpmversion.h \
74         rpm/xmlutil.cc \
75         rpm/xmlutil.h \
76         acquire.cc \
77         acquire.h \
78         acquire-item.cc \
79         acquire-item.h \
80         acquire-method.cc \
81         acquire-method.h \
82         acquire-worker.cc \
83         acquire-worker.h \
84         algorithms.cc \
85         algorithms.h \
86         cachefile.cc \
87         cachefile.h \
88         cacheiterators.h \
89         clean.cc \
90         clean.h \
91         depcache.cc \
92         depcache.h \
93         indexfile.cc \
94         indexfile.h \
95         init.cc \
96         init.h \
97         luaiface.cc \
98         luaiface.h \
99         orderlist.cc \
100         orderlist.h \
101         packagemanager.cc \
102         packagemanager.h \
103         pkgcache.cc \
104         pkgcachegen.cc \
105         pkgcachegen.h \
106         pkgcache.h \
107         pkgrecords.cc \
108         pkgrecords.h \
109         pkgsystem.cc \
110         pkgsystem.h \
111         policy.cc \
112         policy.h \
113         repository.cc \
114         repository.h \
115         sourcelist.cc \
116         sourcelist.h \
117         srcrecords.cc \
118         srcrecords.h \
119         tagfile.cc \
120         tagfile.h \
121         version.cc \
122         version.h \
123         versionmatch.cc \
124         versionmatch.h
125
126 PRIVATEHEADERS = \
127         contrib/system.h \
128         contrib/sqlite.h \
129         rpm/rapttypes.h \
130         rpm/raptheader.h \
131         rpm/repomd.h \
132         rpm/aptcallback.h \
133         rpm/rpmhandler.h \
134         rpm/rpmindexfile.h \
135         rpm/rpmlistparser.h \
136         rpm/rpmpackagedata.h \
137         rpm/rpmpm.h \
138         rpm/rpmrecords.h \
139         rpm/rpmsrcrecords.h \
140         rpm/rpmsystem.h \
141         rpm/rpmversion.h \
142         rpm/xmlutil.h 
143
144 includedir=${prefix}/include/apt-pkg
145 include_HEADERS = $(filter-out \
146                     $(PRIVATEHEADERS), \
147                     $(filter %.h,$(libapt_pkg_la_SOURCES)))
148
149 # This is a hack to allow us to maintain the original
150 # APT system of a a flat apt-pkg/ header directory.
151 PRIVREALHEADERS = $(PRIVATEHEADERS)
152 PRIVCOPYHEADERS = $(patsubst %.h, \
153                     $(top_builddir)/include/%.h, \
154                     $(notdir $(PRIVREALHEADERS)))
155 REALHEADERS = $(filter-out \
156                 $(PRIVREALHEADERS), \
157                 $(filter %.h,$(libapt_pkg_la_SOURCES)))
158 COPYHEADERS = $(patsubst %.h, \
159                 $(top_builddir)/include/apt-pkg/%.h, \
160                 $(notdir $(REALHEADERS)))
161 REALOBJECTS = $(patsubst %.cc,%.lo,\
162                 $(filter %.cc,$(libapt_pkg_la_SOURCES)))
163 $(REALOBJECTS): $(COPYHEADERS) $(PRIVCOPYHEADERS)
164
165 $(top_builddir)/include/apt-pkg/%: %
166         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
167         cp -f -p $< $@
168 $(top_builddir)/include/apt-pkg/%: contrib/%
169         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
170         cp -f -p $< $@
171 $(top_builddir)/include/apt-pkg/%: rpm/%
172         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
173         cp -f -p $< $@
174 $(top_builddir)/include/%: %
175         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
176         cp -f -p $< $@
177 $(top_builddir)/include/%: contrib/%
178         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
179         cp -f -p $< $@
180 $(top_builddir)/include/%: rpm/%
181         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
182         cp -f -p $< $@
183
184 DISTCLEANFILES = libapt-pkg.pc
185 EXTRA_DIST = libapt-pkg.pc.in
186
187 clean-local:
188         rm -f $(PRIVCOPYHEADERS)
189         rm -rf $(top_builddir)/include/apt-pkg
190