-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmakefile
More file actions
250 lines (230 loc) · 11.5 KB
/
Copy pathmakefile
File metadata and controls
250 lines (230 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# sources contains a list of the source files (i.e., the .cpp files)
sources := $(patsubst %.cpp,%.cpp,$(wildcard *.cpp))
# there is one .o file for each .cpp file
objects := $(patsubst %.cpp,%.o,$(wildcard *.cpp))
# this is used to automatically generate the dependencies
dependencies := $(patsubst %.cpp,%.d,$(wildcard *.cpp))
globals = globals.h
pflags = -c $(includedirs) -pg -O
oflags = -c $(includedirs) -O -Wall
gflags = -c $(includedirs) -g
cflags = $(gflags) # the default setting
cflags = -c $(includedirs) -O2 -fPIC -g
ifdef optimize
NDEBUG = true
cflags = $(oflags)
endif
ifdef profile
cflags = $(pflags)
endif
EXENAME = coxeter
LIBNAME = coxeter3
OS = $(shell uname)
ifeq ($(OS),Darwin)
EXEEXT =
LIBPREFIX = lib
LIBEXT = .dylib
LIBDIR = lib
LINKFLAGS = -dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,3.0,-current_version,3.0,-install_name,$(PREFIX)/lib/$(LIBPREFIX)$(LIBNAME)$(LIBEXT)
LINKLIBS =
else
ifeq ($(OS),CYGWIN)
EXEEXT = .exe
LIBPREFIX = cyg
LIBEXT = .dll
LIBDIR = bin
IMPLIB = lib$(LIBNAME).dll.a
LINKFLAGS = -shared -Wl,--out-implib=$(IMPLIB) -Wl,--export-all-symbols
LINKLIBS = -lc
else
EXEEXT =
LIBPREFIX = lib
LIBEXT = .so
LIBDIR = lib
LINKFLAGS = -shared -Wl,-soname,libcoxeter3.so
LINKLIBS = -lc
endif
endif
LIBRARY = $(LIBPREFIX)$(LIBNAME)$(LIBEXT)
all: coxeter executable
directories.h: directories.h.in
sed "s|@PREFIX@|$(PREFIX)|g" directories.h.in > directories.h
coxeter: $(objects)
$(CXX) $(LINKFLAGS) -o $(LIBRARY) $(objects) $(LINKLIBS)
executable: $(objects)
$(CXX) -o $(EXENAME)$(EXEEXT) $(objects)
BINDIR=$$PREFIX/bin/
DATADIR=$$PREFIX/coxeter/
INCLUDEDIR=$$PREFIX/include/coxeter/
LIBRARYDIR=$$PREFIX/$(LIBDIR)
install: coxeter executable
mkdir -p "$(DESTDIR)$(BINDIR)"
mkdir -p "$(DESTDIR)$(LIBRARYDIR)"
cp $(EXENAME)$(EXEEXT) "$(DESTDIR)$(BINDIR)"
cp $(LIBRARY) "$(DESTDIR)$(LIBRARYDIR)"
if [ $(OS) = "CYGWIN" ]; then \
mkdir -p "$(DESTDIR)$$PREFIX/lib/"; \
cp $(IMPLIB) "$(DESTDIR)$$PREFIX/lib/"; \
fi
mkdir -p "$(DESTDIR)$(DATADIR)"
cp -r coxeter_matrices headers messages "$(DESTDIR)$(DATADIR)"
mkdir -p "$(DESTDIR)$(INCLUDEDIR)"
cp -r *.h *.hpp "$(DESTDIR)$(INCLUDEDIR)"
check: coxeter executable
./$(EXENAME)$(EXEEXT) < test.input > test.output
if ! diff test.output.expected test.output > /dev/null; then \
echo >&2 "Error testing coxeter on test.input:"; \
diff test.output.expected test.output; \
exit 1; \
fi
rm -f test.output
clean:
rm -f $(objects)
%.o:%.cpp
$(CXX) $(cflags) $*.cpp
# dependencies --- these were generated automatically by make depend on my
# system; they are explicitly copied for portability. Only local dependencies
# are considered. If you add new #include directives you should add the
# corresponding dependencies here; the best way if your compiler supports the
# -MM option is probably to simply say make depend > tmp, then paste in the
# contents of tmp in lieu of the dependencies listed here.
%.d:%.cpp
@$(CXX) -MM $*.cpp
depend: $(dependencies)
affine.o: affine.cpp affine.h globals.h coxgroup.h coxtypes.h io.h list.h \
memory.h constants.h list.hpp error.h files.h hecke.h interface.h \
automata.h bits.h minroots.h dotval.h graph.h type.h transducer.h \
schubert.h stack.h stack.hpp hecke.hpp polynomials.h vector.h \
vector.hpp polynomials.hpp invkl.h klsupport.h search.h search.hpp kl.h \
uneqkl.h wgraph.h files.hpp cells.h
automata.o: automata.cpp automata.h globals.h bits.h list.h memory.h \
constants.h list.hpp error.h io.h
bits.o: bits.cpp bits.h globals.h list.h memory.h constants.h list.hpp \
error.h io.h
cells.o: cells.cpp cells.h globals.h bits.h list.h memory.h constants.h \
list.hpp error.h io.h kl.h coxtypes.h klsupport.h polynomials.h \
vector.h vector.hpp polynomials.hpp schubert.h interface.h automata.h \
minroots.h dotval.h graph.h type.h transducer.h stack.h stack.hpp \
hecke.h hecke.hpp search.h search.hpp uneqkl.h wgraph.h
commands.o: commands.cpp commands.h globals.h coxgroup.h coxtypes.h io.h \
list.h memory.h constants.h list.hpp error.h files.h hecke.h \
interface.h automata.h bits.h minroots.h dotval.h graph.h type.h \
transducer.h schubert.h stack.h stack.hpp hecke.hpp polynomials.h \
vector.h vector.hpp polynomials.hpp invkl.h klsupport.h search.h \
search.hpp kl.h uneqkl.h wgraph.h files.hpp cells.h dictionary.h \
dictionary.hpp directories.h fcoxgroup.h help.h interactive.h special.h \
typeA.h
constants.o: constants.cpp constants.h globals.h
coxgroup.o: coxgroup.cpp coxgroup.h globals.h coxtypes.h io.h list.h \
memory.h constants.h list.hpp error.h files.h hecke.h interface.h \
automata.h bits.h minroots.h dotval.h graph.h type.h transducer.h \
schubert.h stack.h stack.hpp hecke.hpp polynomials.h vector.h \
vector.hpp polynomials.hpp invkl.h klsupport.h search.h search.hpp kl.h \
uneqkl.h wgraph.h files.hpp cells.h
coxtypes.o: coxtypes.cpp coxtypes.h globals.h io.h list.h memory.h \
constants.h list.hpp error.h
error.o: error.cpp error.h globals.h coxtypes.h io.h list.h memory.h \
constants.h list.hpp directories.h graph.h bits.h type.h interactive.h \
interface.h automata.h minroots.h dotval.h transducer.h kl.h \
klsupport.h polynomials.h vector.h vector.hpp polynomials.hpp \
schubert.h stack.h stack.hpp hecke.h hecke.hpp search.h search.hpp \
version.h
fcoxgroup.o: fcoxgroup.cpp fcoxgroup.h globals.h coxgroup.h coxtypes.h \
io.h list.h memory.h constants.h list.hpp error.h files.h hecke.h \
interface.h automata.h bits.h minroots.h dotval.h graph.h type.h \
transducer.h schubert.h stack.h stack.hpp hecke.hpp polynomials.h \
vector.h vector.hpp polynomials.hpp invkl.h klsupport.h search.h \
search.hpp kl.h uneqkl.h wgraph.h files.hpp cells.h
files.o: files.cpp files.h globals.h hecke.h list.h memory.h constants.h \
list.hpp error.h interface.h automata.h bits.h io.h coxtypes.h \
minroots.h dotval.h graph.h type.h transducer.h schubert.h stack.h \
stack.hpp hecke.hpp polynomials.h vector.h vector.hpp polynomials.hpp \
invkl.h klsupport.h search.h search.hpp kl.h uneqkl.h wgraph.h \
files.hpp cells.h directories.h posets.h version.h
general.o: general.cpp general.h globals.h coxgroup.h coxtypes.h io.h \
list.h memory.h constants.h list.hpp error.h files.h hecke.h \
interface.h automata.h bits.h minroots.h dotval.h graph.h type.h \
transducer.h schubert.h stack.h stack.hpp hecke.hpp polynomials.h \
vector.h vector.hpp polynomials.hpp invkl.h klsupport.h search.h \
search.hpp kl.h uneqkl.h wgraph.h files.hpp cells.h
graph.o: graph.cpp graph.h globals.h list.h memory.h constants.h list.hpp \
error.h bits.h io.h coxtypes.h type.h directories.h interactive.h \
interface.h automata.h minroots.h dotval.h transducer.h
hecke.o: hecke.cpp
help.o: help.cpp help.h globals.h commands.h coxgroup.h coxtypes.h io.h \
list.h memory.h constants.h list.hpp error.h files.h hecke.h \
interface.h automata.h bits.h minroots.h dotval.h graph.h type.h \
transducer.h schubert.h stack.h stack.hpp hecke.hpp polynomials.h \
vector.h vector.hpp polynomials.hpp invkl.h klsupport.h search.h \
search.hpp kl.h uneqkl.h wgraph.h files.hpp cells.h dictionary.h \
dictionary.hpp directories.h
interactive.o: interactive.cpp interactive.h globals.h bits.h list.h \
memory.h constants.h list.hpp error.h io.h coxtypes.h graph.h type.h \
interface.h automata.h minroots.h dotval.h transducer.h affine.h \
coxgroup.h files.h hecke.h schubert.h stack.h stack.hpp hecke.hpp \
polynomials.h vector.h vector.hpp polynomials.hpp invkl.h klsupport.h \
search.h search.hpp kl.h uneqkl.h wgraph.h files.hpp cells.h \
directories.h fcoxgroup.h general.h typeA.h
interface.o: interface.cpp interface.h globals.h automata.h bits.h list.h \
memory.h constants.h list.hpp error.h io.h coxtypes.h minroots.h \
dotval.h graph.h type.h transducer.h
invkl.o: invkl.cpp invkl.h globals.h coxtypes.h io.h list.h memory.h \
constants.h list.hpp error.h klsupport.h polynomials.h vector.h \
vector.hpp polynomials.hpp schubert.h bits.h interface.h automata.h \
minroots.h dotval.h graph.h type.h transducer.h stack.h stack.hpp \
hecke.h hecke.hpp search.h search.hpp
io.o: io.cpp io.h globals.h list.h memory.h constants.h list.hpp error.h
kl.o: kl.cpp kl.h globals.h coxtypes.h io.h list.h memory.h constants.h \
list.hpp error.h klsupport.h polynomials.h vector.h vector.hpp \
polynomials.hpp schubert.h bits.h interface.h automata.h minroots.h \
dotval.h graph.h type.h transducer.h stack.h stack.hpp hecke.h \
hecke.hpp search.h search.hpp iterator.h
klsupport.o: klsupport.cpp klsupport.h globals.h coxtypes.h io.h list.h \
memory.h constants.h list.hpp error.h polynomials.h vector.h vector.hpp \
polynomials.hpp schubert.h bits.h interface.h automata.h minroots.h \
dotval.h graph.h type.h transducer.h stack.h stack.hpp
main.o: main.cpp constants.h globals.h commands.h coxgroup.h coxtypes.h \
io.h list.h memory.h list.hpp error.h files.h hecke.h interface.h \
automata.h bits.h minroots.h dotval.h graph.h type.h transducer.h \
schubert.h stack.h stack.hpp hecke.hpp polynomials.h vector.h \
vector.hpp polynomials.hpp invkl.h klsupport.h search.h search.hpp kl.h \
uneqkl.h wgraph.h files.hpp cells.h dictionary.h dictionary.hpp \
version.h
memory.o: memory.cpp memory.h globals.h constants.h error.h
minroots.o: minroots.cpp minroots.h globals.h bits.h list.h memory.h \
constants.h list.hpp error.h io.h coxtypes.h dotval.h graph.h type.h
polynomials.o: polynomials.cpp
posets.o: posets.cpp posets.h globals.h bits.h list.h memory.h \
constants.h list.hpp error.h io.h wgraph.h interface.h automata.h \
coxtypes.h minroots.h dotval.h graph.h type.h transducer.h
schubert.o: schubert.cpp schubert.h globals.h coxtypes.h io.h list.h \
memory.h constants.h list.hpp error.h bits.h interface.h automata.h \
minroots.h dotval.h graph.h type.h transducer.h stack.h stack.hpp
search.o: search.cpp
special.o: special.cpp special.h globals.h commands.h coxgroup.h \
coxtypes.h io.h list.h memory.h constants.h list.hpp error.h files.h \
hecke.h interface.h automata.h bits.h minroots.h dotval.h graph.h \
type.h transducer.h schubert.h stack.h stack.hpp hecke.hpp \
polynomials.h vector.h vector.hpp polynomials.hpp invkl.h klsupport.h \
search.h search.hpp kl.h uneqkl.h wgraph.h files.hpp cells.h \
dictionary.h dictionary.hpp directories.h interactive.h
stack.o: stack.cpp
transducer.o: transducer.cpp transducer.h globals.h coxtypes.h io.h \
list.h memory.h constants.h list.hpp error.h graph.h bits.h type.h
type.o: type.cpp type.h globals.h io.h list.h memory.h constants.h \
list.hpp error.h
typeA.o: typeA.cpp typeA.h globals.h fcoxgroup.h coxgroup.h coxtypes.h \
io.h list.h memory.h constants.h list.hpp error.h files.h hecke.h \
interface.h automata.h bits.h minroots.h dotval.h graph.h type.h \
transducer.h schubert.h stack.h stack.hpp hecke.hpp polynomials.h \
vector.h vector.hpp polynomials.hpp invkl.h klsupport.h search.h \
search.hpp kl.h uneqkl.h wgraph.h files.hpp cells.h
uneqkl.o: uneqkl.cpp uneqkl.h globals.h coxtypes.h io.h list.h memory.h \
constants.h list.hpp error.h hecke.h interface.h automata.h bits.h \
minroots.h dotval.h graph.h type.h transducer.h schubert.h stack.h \
stack.hpp hecke.hpp polynomials.h vector.h vector.hpp polynomials.hpp \
klsupport.h search.h search.hpp interactive.h
vector.o: vector.cpp
wgraph.o: wgraph.cpp wgraph.h globals.h list.h memory.h constants.h \
list.hpp error.h bits.h io.h interface.h automata.h coxtypes.h \
minroots.h dotval.h graph.h type.h transducer.h stack.h stack.hpp