1 |
# Makefile written by Jerry James <loganjerry@gmail.com> |
2 |
# and released into the public domain. |
3 |
|
4 |
version = @version@ |
5 |
major = @major@ |
6 |
minor = @minor@ |
7 |
|
8 |
INCLUDES = -Ilib-src -Ilib-src-reg -Iwrap-gmp-gmpxx -I/usr/include/cddlib |
9 |
CPPFLAGS = $(INCLUDES) -DPACKAGE=\"TOPCOM\" -DVERSION=\"$(version)\" \ |
10 |
-DVERBOSE -DGMPRATIONAL -ftemplate-depth=35 |
11 |
CFLAGS = $(CPPFLAGS) @RPM_OPT_FLAGS@ |
12 |
LIB_LDFLAGS = @RPM_LD_FLAGS@ -Wl,--as-needed -lcddgmp -lgmpxx -lgmp |
13 |
LDFLAGS = @RPM_LD_FLAGS@ -Wl,--as-needed -L. -lTOPCOM -lcddgmp -lgmpxx -lgmp |
14 |
SHFLAGS = -shared -Wl,-h,libTOPCOM.so.$(major) |
15 |
bindir = @bindir@ |
16 |
libdir = @libdir@ |
17 |
mandir = @mandir@ |
18 |
includedir = @includedir@/TOPCOM |
19 |
|
20 |
library_sources = \ |
21 |
lib-src-reg/LPinterface.cc \ |
22 |
lib-src-reg/RegularityCheck.cc \ |
23 |
lib-src-reg/SPXinterface.cc \ |
24 |
lib-src/Admissibles.cc \ |
25 |
lib-src/CheckTriang.cc \ |
26 |
lib-src/Circuits.cc \ |
27 |
lib-src/Cocircuits.cc \ |
28 |
lib-src/CommandlineOptions.cc \ |
29 |
lib-src/CompressedIntegerSet.cc \ |
30 |
lib-src/ComputeTriangs.cc \ |
31 |
lib-src/Facets.cc \ |
32 |
lib-src/FastSimplicialComplex.cc \ |
33 |
lib-src/Field.cc \ |
34 |
lib-src/FineTriang.cc \ |
35 |
lib-src/Flip.cc \ |
36 |
lib-src/IndexTableArray.cc \ |
37 |
lib-src/IntegerSet.cc \ |
38 |
lib-src/InteriorFacets.cc \ |
39 |
lib-src/MarkedFlips.cc \ |
40 |
lib-src/Matrix.cc \ |
41 |
lib-src/Permutation.cc \ |
42 |
lib-src/PlacingTriang.cc \ |
43 |
lib-src/PointConfiguration.cc \ |
44 |
lib-src/RealChiro.cc \ |
45 |
lib-src/SimplicialComplex.cc \ |
46 |
lib-src/SimplicialComplexTemplate.cc \ |
47 |
lib-src/SparseIntegerSet.cc \ |
48 |
lib-src/SparseSimplicialComplex.cc \ |
49 |
lib-src/StairCaseMatrix.cc \ |
50 |
lib-src/SymmetricBFS.cc \ |
51 |
lib-src/Symmetry.cc \ |
52 |
lib-src/TriangFlips.cc \ |
53 |
lib-src/TriangNode.cc \ |
54 |
lib-src/Vector.cc \ |
55 |
lib-src/VertexFacetTable.cc \ |
56 |
lib-src/VertexFacetTableArray.cc \ |
57 |
lib-src/VirtualChiro.cc |
58 |
library_objs = $(library_sources:%.cc=%.o) |
59 |
|
60 |
bin_sources = \ |
61 |
src-reg/checkregularity.cc \ |
62 |
src/B_A.cc \ |
63 |
src/B_A_center.cc \ |
64 |
src/B_D.cc \ |
65 |
src/chiro2allfinetriangs.cc \ |
66 |
src/chiro2alltriangs.cc \ |
67 |
src/chiro2circuits.cc \ |
68 |
src/chiro2cocircuits.cc \ |
69 |
src/chiro2dual.cc \ |
70 |
src/chiro2finetriang.cc \ |
71 |
src/chiro2finetriangs.cc \ |
72 |
src/chiro2mintriang.cc \ |
73 |
src/chiro2nallfinetriangs.cc \ |
74 |
src/chiro2nalltriangs.cc \ |
75 |
src/chiro2nfinetriangs.cc \ |
76 |
src/chiro2ntriangs.cc \ |
77 |
src/chiro2placingtriang.cc \ |
78 |
src/chiro2triangs.cc \ |
79 |
src/cocircuits2facets.cc \ |
80 |
src/cross.cc \ |
81 |
src/cube.cc \ |
82 |
src/cyclic.cc \ |
83 |
src/hypersimplex.cc \ |
84 |
src/lattice.cc \ |
85 |
src/points2allfinetriangs.cc \ |
86 |
src/points2alltriangs.cc \ |
87 |
src/points2chiro.cc \ |
88 |
src/points2facets.cc \ |
89 |
src/points2finetriang.cc \ |
90 |
src/points2finetriangs.cc \ |
91 |
src/points2flips.cc \ |
92 |
src/points2nallfinetriangs.cc \ |
93 |
src/points2nalltriangs.cc \ |
94 |
src/points2nfinetriangs.cc \ |
95 |
src/points2nflips.cc \ |
96 |
src/points2ntriangs.cc \ |
97 |
src/points2placingtriang.cc \ |
98 |
src/points2triangs.cc \ |
99 |
src/points2volume.cc \ |
100 |
src/santos_22_triang.cc \ |
101 |
src/santos_dim4_triang.cc \ |
102 |
src/santos_triang.cc |
103 |
bin_exes = $(bin_sources:%.cc=%) |
104 |
|
105 |
all: $(bin_exes) |
106 |
|
107 |
libTOPCOM.so.$(major).$(minor): $(library_objs) |
108 |
$(CXX) $(CFLAGS) $(SHFLAGS) -o $@ $^ $(LIB_LDFLAGS) |
109 |
ln -s libTOPCOM.so.$(major).$(minor) libTOPCOM.so.$(major) |
110 |
ln -s libTOPCOM.so.$(major) libTOPCOM.so |
111 |
|
112 |
lib-src-reg/%.o: lib-src-reg/%.cc |
113 |
$(CXX) $(CFLAGS) -fPIC -c -o $@ $^ |
114 |
|
115 |
lib-src/%.o: lib-src/%.cc |
116 |
$(CXX) $(CFLAGS) -fPIC -c -o $@ $^ |
117 |
|
118 |
src-reg/%: src-reg/%.cc libTOPCOM.so.$(major).$(minor) |
119 |
$(CXX) $(CFLAGS) -o $@ $< $(LDFLAGS) |
120 |
|
121 |
src/%: src/%.cc libTOPCOM.so.$(major).$(minor) |
122 |
$(CXX) $(CFLAGS) -o $@ $< $(LDFLAGS) |
123 |
|
124 |
install: $(bin_exes) |
125 |
install -d $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(includedir) |
126 |
install -p -m 0755 libTOPCOM.so.$(major).$(minor) $(DESTDIR)$(libdir) |
127 |
ln -s libTOPCOM.so.$(major).$(minor) $(DESTDIR)$(libdir)/libTOPCOM.so.$(major) |
128 |
ln -s libTOPCOM.so.$(major) $(DESTDIR)$(libdir)/libTOPCOM.so |
129 |
install -p -m 0755 $(bin_exes) $(DESTDIR)$(bindir) |
130 |
install -p -m 0644 wrap-gmp-gmpxx/*.h $(DESTDIR)$(includedir) |
131 |
install -p -m 0644 lib-src-reg/*.hh $(DESTDIR)$(includedir) |
132 |
install -p -m 0644 lib-src/*.hh $(DESTDIR)$(includedir) |
133 |
install -d $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man7 |
134 |
for f in man/*.1; do \ |
135 |
sed "s/#version#/$(version)/" $$f > $(DESTDIR)$(mandir)/$${f/man/man1}; \ |
136 |
touch -r $$f $(DESTDIR)$(mandir)/$${f/man/man1}; \ |
137 |
done |
138 |
for f in man/*.7; do \ |
139 |
sed "s/#version#/$(version)/" $$f > $(DESTDIR)$(mandir)/$${f/man/man7}; \ |
140 |
touch -r $$f $(DESTDIR)$(mandir)/$${f/man/man7}; \ |
141 |
done |