- merge repomd branch
[apt.git] / apt-pkg / Makefile.am
1
2 lib_LTLIBRARIES = libapt-pkg.la
3
4 libapt_pkg_la_LIBADD = @RPMLIBS@
5 libapt_pkg_la_LDFLAGS = -version-info 2:0:0 -release @GLIBC_VER@-@LIBSTDCPP_VER@
6
7 AM_CPPFLAGS = -DLIBDIR=\"$(libdir)\"
8
9 INCLUDES = -I$(top_srcdir)/lua/include -I$(top_srcdir)/lua/local
10
11 if WITH_LUA
12 libapt_pkg_la_LIBADD += $(top_builddir)/lua/liblua.la
13 endif
14
15 libapt_pkg_la_SOURCES = \
16         contrib/cdromutl.cc \
17         contrib/cdromutl.h \
18         contrib/cmndline.cc \
19         contrib/cmndline.h \
20         contrib/configuration.cc \
21         contrib/configuration.h \
22         contrib/crc-16.cc \
23         contrib/crc-16.h \
24         contrib/error.cc \
25         contrib/error.h \
26         contrib/fileutl.cc \
27         contrib/fileutl.h \
28         contrib/hashes.cc \
29         contrib/hashes.h \
30         contrib/md5.cc \
31         contrib/md5.h \
32         contrib/mmap.cc \
33         contrib/mmap.h \
34         contrib/progress.cc \
35         contrib/progress.h \
36         contrib/sha1.cc \
37         contrib/sha1.h \
38         contrib/sptr.h \
39         contrib/strutl.cc \
40         contrib/strutl.h \
41         contrib/system.h \
42         rpm/repomd.cc \
43         rpm/repomd.h \
44         rpm/rpmhandler.cc \
45         rpm/rpmhandler.h \
46         rpm/rpmindexfile.cc \
47         rpm/rpmindexfile.h \
48         rpm/rpmlistparser.cc \
49         rpm/rpmlistparser.h \
50         rpm/rpmmisc.h \
51         rpm/rpmpackagedata.cc \
52         rpm/rpmpackagedata.h \
53         rpm/rpmpm.cc \
54         rpm/rpmpm.h \
55         rpm/rpmshowprogress.h \
56         rpm/rpmrecords.cc \
57         rpm/rpmrecords.h \
58         rpm/rpmsrcrecords.cc \
59         rpm/rpmsrcrecords.h \
60         rpm/rpmsystem.cc \
61         rpm/rpmsystem.h \
62         rpm/rpmversion.cc \
63         rpm/rpmversion.h \
64         acquire.cc \
65         acquire.h \
66         acquire-item.cc \
67         acquire-item.h \
68         acquire-method.cc \
69         acquire-method.h \
70         acquire-worker.cc \
71         acquire-worker.h \
72         algorithms.cc \
73         algorithms.h \
74         cachefile.cc \
75         cachefile.h \
76         cacheiterators.h \
77         clean.cc \
78         clean.h \
79         depcache.cc \
80         depcache.h \
81         indexfile.cc \
82         indexfile.h \
83         init.cc \
84         init.h \
85         luaiface.cc \
86         luaiface.h \
87         orderlist.cc \
88         orderlist.h \
89         packagemanager.cc \
90         packagemanager.h \
91         pkgcache.cc \
92         pkgcachegen.cc \
93         pkgcachegen.h \
94         pkgcache.h \
95         pkgrecords.cc \
96         pkgrecords.h \
97         pkgsystem.cc \
98         pkgsystem.h \
99         policy.cc \
100         policy.h \
101         repository.cc \
102         repository.h \
103         sourcelist.cc \
104         sourcelist.h \
105         srcrecords.cc \
106         srcrecords.h \
107         tagfile.cc \
108         tagfile.h \
109         version.cc \
110         version.h \
111         versionmatch.cc \
112         versionmatch.h
113
114 PRIVATEHEADERS = contrib/system.h
115
116 includedir=${prefix}/include/apt-pkg
117 include_HEADERS = $(filter-out \
118                     $(PRIVATEHEADERS), \
119                     $(filter %.h,$(libapt_pkg_la_SOURCES)))
120
121 # This is a hack to allow us to maintain the original
122 # APT system of a a flat apt-pkg/ header directory.
123 PRIVREALHEADERS = $(PRIVATEHEADERS)
124 PRIVCOPYHEADERS = $(patsubst %.h, \
125                     $(top_builddir)/include/%.h, \
126                     $(notdir $(PRIVREALHEADERS)))
127 REALHEADERS = $(filter-out \
128                 $(PRIVREALHEADERS), \
129                 $(filter %.h,$(libapt_pkg_la_SOURCES)))
130 COPYHEADERS = $(patsubst %.h, \
131                 $(top_builddir)/include/apt-pkg/%.h, \
132                 $(notdir $(REALHEADERS)))
133 REALOBJECTS = $(patsubst %.cc,%.lo,\
134                 $(filter %.cc,$(libapt_pkg_la_SOURCES)))
135 $(REALOBJECTS): $(COPYHEADERS) $(PRIVCOPYHEADERS)
136
137 $(top_builddir)/include/apt-pkg/%: %
138         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
139         cp -f -p $< $@
140 $(top_builddir)/include/apt-pkg/%: contrib/%
141         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
142         cp -f -p $< $@
143 $(top_builddir)/include/apt-pkg/%: rpm/%
144         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
145         cp -f -p $< $@
146 $(top_builddir)/include/%: %
147         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
148         cp -f -p $< $@
149 $(top_builddir)/include/%: contrib/%
150         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
151         cp -f -p $< $@
152 $(top_builddir)/include/%: rpm/%
153         @$(mkinstalldirs) $(top_builddir)/include/apt-pkg
154         cp -f -p $< $@
155
156 clean-local:
157         rm -f $(PRIVCOPYHEADERS)
158         rm -rf $(top_builddir)/include/apt-pkg
159