Merge pull request #2 from Liteom/master
[polylib.git] / Makefile.am
blob88285ca7113b07b71faa8524e6621d97535eb2e6
1 SUBDIRS = include Test
3 EXTRA_CPPFLAGS = -I$(srcdir)/include -Iinclude @CPPFLAGS@
5 ACLOCAL_AMFLAGS = -I m4
7 poly_src = $(srcdir)/applications
8 poly_arith = $(srcdir)/source/arith
10 CFILES= \
11         source/arith/errors.c \
12         source/kernel/errormsg.c \
13         source/kernel/vector.c \
14         source/kernel/matrix.c \
15         source/kernel/polyhedron.c \
16         source/kernel/polyparam.c \
17         source/kernel/param.c \
18         source/kernel/alpha.c \
19         source/ehrhart/ehrhart.c \
20         source/ehrhart/ext_ehrhart.c \
21         source/ehrhart/eval_ehrhart.c \
22         source/ehrhart/homogenization.c \
23         source/ehrhart/ranking.c \
24         source/kernel/matrix_addon.c \
25         source/kernel/matrix_permutations.c \
26         source/kernel/compress_parms.c \
27         source/kernel/SolveDio.c \
28         source/kernel/Lattice.c \
29         source/kernel/Matop.c \
30         source/kernel/NormalForms.c \
31         source/kernel/Zpolyhedron.c
33 sources = $(CFILES) \
34         $(poly_arith)/assert.h \
35         $(poly_arith)/arithmetique.h \
36         $(poly_arith)/arithmetic_errors.h
38 EXTRA_DIST = doc source/oldpolytest.c INSTALL COPYING m4/acx_pthread.m4
40 lib_LTLIBRARIES = @polylibs@
41 libpolylib32_la_LDFLAGS = -rpath $(libdir) -version-info @versioninfo@
42 libpolylib32_la_SOURCES = $(sources)
43 libpolylib32_la_CPPFLAGS = -DPOLYLIB_BITS=32 $(EXTRA_CPPFLAGS)
44 libpolylib32_la_LIBADD = @LTLIBOBJS@
45 libpolylib64_la_LDFLAGS = -rpath $(libdir) -version-info @versioninfo@
46 libpolylib64_la_SOURCES = $(sources)
47 libpolylib64_la_CPPFLAGS = -DPOLYLIB_BITS=64 $(EXTRA_CPPFLAGS)
48 libpolylib64_la_LIBADD = @LTLIBOBJS@
49 libpolylib128_la_LDFLAGS = -rpath $(libdir) -version-info @versioninfo@
50 libpolylib128_la_SOURCES = $(sources)
51 libpolylib128_la_CPPFLAGS = -DPOLYLIB_BITS=128  $(EXTRA_CPPFLAGS)
52 libpolylib128_la_LIBADD = @LTLIBOBJS@
53 libpolylibgmp_la_LDFLAGS = -rpath $(libdir) -version-info @versioninfo@
54 libpolylibgmp_la_SOURCES = $(sources)
55 libpolylibgmp_la_CPPFLAGS = -DGNUMP  $(EXTRA_CPPFLAGS)
56 libpolylibgmp_la_LIBADD = @LTLIBOBJS@
58 testlib_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
59 example_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
60 count_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
61 c2p_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
62 r2p_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
63 findv_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
64 disjoint_union_sep_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
65 disjoint_union_adj_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
66 ehrhart_quick_apx_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
67 ehrhart_lower_bound_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
68 ehrhart_upper_bound_CPPFLAGS = $(libpolylib@BITS@_la_CPPFLAGS)
71 EXTRA_LTLIBRARIES = libpolylib32.la libpolylib64.la libpolylib128.la \
72                     libpolylibgmp.la
74 # not using foreach GNU make extension
75 no_inst_programs_32=Zpolytest32$(EXEEXT) polytest32$(EXEEXT) verif_ehrhart32$(EXEEXT) testCompressParms32$(EXEEXT)
76 no_inst_programs_64=Zpolytest64$(EXEEXT) polytest64$(EXEEXT) verif_ehrhart64$(EXEEXT) testCompressParms64$(EXEEXT)
77 no_inst_programs_gmp=Zpolytestgmp$(EXEEXT) polytestgmp$(EXEEXT) verif_ehrhartgmp$(EXEEXT) testCompressParmsgmp$(EXEEXT)
79 noinst_PROGRAMS = \
80         testlib \
81         example \
82         count \
83         @multi_noinst_programs@
85 multi_bin_programs_32=ehrhart_ranking32$(EXEEXT) ehrhart_union32$(EXEEXT) pp32$(EXEEXT) testehrhart32$(EXEEXT)
86 multi_bin_programs_64=ehrhart_ranking64$(EXEEXT) ehrhart_union64$(EXEEXT) pp64$(EXEEXT) testehrhart64$(EXEEXT)
87 multi_bin_programs_gmp=ehrhart_rankinggmp$(EXEEXT) ehrhart_uniongmp$(EXEEXT) ppgmp$(EXEEXT) testehrhartgmp$(EXEEXT)
89 bin_PROGRAMS = \
90         c2p \
91         r2p \
92         findv \
93         disjoint_union_sep \
94         disjoint_union_adj \
95         ehrhart_quick_apx \
96         ehrhart_upper_bound \
97         ehrhart_lower_bound \
98         @multi_bin_programs@
100 EXTRA_PROGRAMS = $(no_inst_programs_32) $(no_inst_programs_64) $(no_inst_programs_gmp) \
101                                  $(multi_bin_programs_32) $(multi_bin_programs_64) $(multi_bin_programs_gmp)
105 LDADD = @polylib@
106 c2p_SOURCES = $(poly_src)/c2p.c
107 c2p_DEPENDENCIES = @polylib@
108 r2p_SOURCES = $(poly_src)/r2p.c
109 r2p_DEPENDENCIES = @polylib@
110 findv_SOURCES = $(poly_src)/findv.c
111 findv_DEPENDENCIES = @polylib@
112 disjoint_union_sep_SOURCES = $(poly_src)/disjoint_union_sep.c
113 disjoint_union_sep_DEPENDENCIES = @polylib@
114 disjoint_union_adj_SOURCES = $(poly_src)/disjoint_union_adj.c
115 disjoint_union_adj_DEPENDENCIES = @polylib@
116 ehrhart_quick_apx_SOURCES = $(poly_src)/ehrhart_quick_apx.c
117 ehrhart_quick_apx_DEPENDENCIES = @polylib@
118 ehrhart_upper_bound_SOURCES =  $(poly_src)/ehrhart_upper_bound.c
119 ehrhart_upper_bound_DEPENDENCIES = @polylib@
120 ehrhart_lower_bound_SOURCES =  $(poly_src)/ehrhart_lower_bound.c
121 ehrhart_lower_bound_DEPENDENCIES = @polylib@
122 testlib_SOURCES = $(poly_src)/testlib.c
123 testlib_DEPENDENCIES = @polylib@
124 example_SOURCES = $(poly_src)/example.c
125 example_DEPENDENCIES = @polylib@
126 count_SOURCES = source/count.c
127 count_DEPENDENCIES = @polylib@
128 Zpolytest32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
129 Zpolytest32_SOURCES = $(poly_src)/Zpolytest.c
130 Zpolytest32_LDADD = libpolylib32.la
131 Zpolytest64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
132 Zpolytest64_SOURCES = $(poly_src)/Zpolytest.c
133 Zpolytest64_LDADD = libpolylib64.la
134 Zpolytestgmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
135 Zpolytestgmp_SOURCES = $(poly_src)/Zpolytest.c
136 Zpolytestgmp_LDADD = libpolylibgmp.la
137 ehrhart_ranking32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
138 ehrhart_ranking32_SOURCES = $(poly_src)/ehrhart_ranking.c
139 ehrhart_ranking32_LDADD = libpolylib32.la
140 ehrhart_ranking64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
141 ehrhart_ranking64_SOURCES = $(poly_src)/ehrhart_ranking.c
142 ehrhart_ranking64_LDADD = libpolylib64.la
143 ehrhart_rankinggmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
144 ehrhart_rankinggmp_SOURCES = $(poly_src)/ehrhart_ranking.c
145 ehrhart_rankinggmp_LDADD = libpolylibgmp.la
146 ehrhart_union32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
147 ehrhart_union32_SOURCES = $(poly_src)/ehrhart_union.c
148 ehrhart_union32_LDADD = libpolylib32.la
149 ehrhart_union64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
150 ehrhart_union64_SOURCES = $(poly_src)/ehrhart_union.c
151 ehrhart_union64_LDADD = libpolylib64.la
152 ehrhart_uniongmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
153 ehrhart_uniongmp_SOURCES = $(poly_src)/ehrhart_union.c
154 ehrhart_uniongmp_LDADD = libpolylibgmp.la
155 polytest32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
156 polytest32_SOURCES = $(poly_src)/polytest.c
157 polytest32_LDADD = libpolylib32.la
158 polytest64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
159 polytest64_SOURCES = $(poly_src)/polytest.c
160 polytest64_LDADD = libpolylib64.la
161 polytestgmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
162 polytestgmp_SOURCES = $(poly_src)/polytest.c
163 polytestgmp_LDADD = libpolylibgmp.la
164 pp32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
165 pp32_SOURCES = $(poly_src)/pp.c
166 pp32_LDADD = libpolylib32.la
167 pp64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
168 pp64_SOURCES = $(poly_src)/pp.c
169 pp64_LDADD = libpolylib64.la
170 ppgmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
171 ppgmp_SOURCES = $(poly_src)/pp.c
172 ppgmp_LDADD = libpolylibgmp.la
173 testehrhart32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
174 testehrhart32_SOURCES = $(poly_src)/testehrhart.c
175 testehrhart32_LDADD = libpolylib32.la
176 testehrhart64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
177 testehrhart64_SOURCES = $(poly_src)/testehrhart.c
178 testehrhart64_LDADD = libpolylib64.la
179 testehrhartgmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
180 testehrhartgmp_SOURCES = $(poly_src)/testehrhart.c
181 testehrhartgmp_LDADD = libpolylibgmp.la
182 testCompressParms32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
183 testCompressParms32_SOURCES = $(poly_src)/testCompressParms.c
184 testCompressParms32_LDADD = libpolylib32.la
185 testCompressParms64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
186 testCompressParms64_SOURCES = $(poly_src)/testCompressParms.c
187 testCompressParms64_LDADD = libpolylib64.la
188 testCompressParmsgmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
189 testCompressParmsgmp_SOURCES = $(poly_src)/testCompressParms.c
190 testCompressParmsgmp_LDADD = libpolylibgmp.la
191 verif_ehrhart32_CPPFLAGS = $(libpolylib32_la_CPPFLAGS)
192 verif_ehrhart32_SOURCES = $(poly_src)/verif_ehrhart.c
193 verif_ehrhart32_LDADD = libpolylib32.la
194 verif_ehrhart64_CPPFLAGS = $(libpolylib64_la_CPPFLAGS)
195 verif_ehrhart64_SOURCES = $(poly_src)/verif_ehrhart.c
196 verif_ehrhart64_LDADD = libpolylib64.la
197 verif_ehrhartgmp_CPPFLAGS = $(libpolylibgmp_la_CPPFLAGS)
198 verif_ehrhartgmp_SOURCES = $(poly_src)/verif_ehrhart.c
199 verif_ehrhartgmp_LDADD = libpolylibgmp.la
201 check: tests
203 tests: all
204         (cd Test; $(MAKE) tests)
206 longtest: all
207         (cd Test; $(MAKE) long_tests)
209 # Make the 'javadoc' style documentation
210 document:
211 # -mkdir doc
212         $(DOXYGEN) polylib.doxygen
214 dist-hook: document
215         rm -rf `find $(distdir)/doc -name CVS`
217 clean-local:
219 distclean-local:
220         rm -f polylib*.pc polylib*-uninstalled.pc polylib*-uninstalled.sh polylib*.pc.in
222 install-data-local:
223         @test -z "$(pkgconfig_libdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfig_libdir)"
224         $(INSTALL_DATA) $(pkgconfig_libfile) "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"
226 uninstall-local:
227         rm -f "$(DESTDIR)$(pkgconfig_libdir)/$(pkgconfig_libfile)"