forked from SpatioTemporal/STARE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.generic
307 lines (239 loc) · 9.33 KB
/
Makefile.generic
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
.PHONY: libs version configure
ARCH = @@ARC##
# Set the following to your default directory, or set TOPDIR make variable.
TOPDIR ?= ~/modtools/mod2htm/hstm/
CXX = g++
CC = gcc
INCDIR = $(TOPDIR)/include
OBJ = $(TOPDIR)/unix
SRC = $(TOPDIR)/trcomp.cpp
SRCS = ${TOPDIR}/src
SHELL = /bin/csh
APP_SRCS= ${TOPDIR}/app
APPS = range2list fillout toid toname par xptest filter lookup
CFLAGS_FROM_CONFIGURE_SCRIPT = @@CFLAGS##
#CFLAGS = -c -g -Wall -I${INCDIR} -D_BOOL_EXISTS -D__macosx -UDIAGNOSE
#CFLAGS_BASE = -O3 -Wall -I${INCDIR} -D_BOOL_EXISTS -D__macosx -UDIAGNOSE
CFLAGS_BASE = ${CFLAGS_FROM_CONFIGURE_SCRIPT}
CFLAGS = -c ${CFLAGS_BASE}
CXX_FLAGS = -std=c++11 ${CFLAGS}
CLX_FLAGS = -std=c++11
#
# Should not have -O3 with debug
# -DHAVE_BITLIST
SKIPOB = \
${OBJ}/SkipListElement.o \
${OBJ}/SkipList.o \
${OBJ}/HtmRange.o \
${OBJ}/HtmRangeMultiLevel.o \
${OBJ}/HstmRange.o \
${OBJ}/SpatialException.o \
${OBJ}/NameEncoding.o \
${OBJ}/BitShiftNameEncoding.o \
${OBJ}/EmbeddedLevelNameEncoding.o \
${OBJ}/SpatiallyAdaptiveDataCover.o \
${OBJ}/SpatialIndex.o \
${OBJ}/TemporalIndex.o \
${TOPDIR}/cc_aux.o
OBJECTS = \
${OBJ}/SpatialGeneral.o \
${OBJ}/NameEncoding.o \
${OBJ}/BitShiftNameEncoding.o \
${OBJ}/EmbeddedLevelNameEncoding.o \
${OBJ}/SpatiallyAdaptiveDataCover.o \
${OBJ}/SpatialIndex.o \
${OBJ}/TemporalIndex.o \
${OBJ}/SpatialConstraint.o \
${OBJ}/sqlInterface.o \
${OBJ}/SpatialVector.o \
${OBJ}/SpatialRotation.o \
${OBJ}/SpatialInterface.o \
${OBJ}/SpatialEdge.o \
${OBJ}/SpatialException.o \
${OBJ}/SpatialDomain.o \
${OBJ}/RangeConvex.o \
${OBJ}/Htmio.o \
${OBJ}/SkipListElement.o \
${OBJ}/SkipList.o \
${OBJ}/HtmRange.o \
${OBJ}/HtmRangeIterator.o \
${OBJ}/HtmRangeMultiLevel.o \
${OBJ}/HtmRangeMultiLevelIterator.o \
${OBJ}/HstmRange.o \
${TOPDIR}/cc_aux.o
# ${OBJ}/SpatialConvex.o
# ${OBJ}/BitList.o
all: intersect filter libs CuteTestsTop lookup lookupInteractive tesselateTrapezoid
# example
CuteTestsTop: libs
$(MAKE) -C tests/CUTE clean-test
$(MAKE) -C tests/CUTE CuteTests
example: ${OBJ}/example.o ${OBJECTS}
$(CXX) -o $@ ${OBJ}/example.o ${OBJECTS}
sqlExample: ${OBJ}/sqlExample.o ${OBJECTS}
$(CXX) -o $@ ${OBJ}/sqlExample.o ${OBJECTS}
intersect: ${OBJ}/intersect.o ${OBJECTS}
$(CXX) -g -o $@ ${OBJ}/intersect.o ${OBJECTS}
simpleIntersect: ${OBJ}/simpleIntersect.o ${OBJECTS}
$(CXX) -g -o $@ ${OBJ}/simpleIntersect.o ${OBJECTS}
libs: ${OBJ}/libSTARE.a
${OBJ}/libSTARE.a: ${OBJECTS}
ar -r $@ ${OBJECTS}
ar -s $@
#---------------------------------------------
${OBJ}/htmlookup.o: ${APP_SRCS}/htmlookup.c
$(CC) $(CFLAGS) ${APP_SRCS}/htmlookup.c -o $@
htmlookup: ${OBJ}/htmlookup.o ${TOPDIR}/cc_aux.o
$(CC) -g -o $@ ${OBJ}/htmlookup.o ${TOPDIR}/cc_aux.o
#---------------------------------------------
${OBJ}/toname.o: ${APP_SRCS}/toname.c
$(CC) $(CFLAGS) ${APP_SRCS}/toname.c -o $@
toname: ${OBJ}/toname.o ${TOPDIR}/cc_aux.o
$(CC) -g -o $@ ${OBJ}/toname.o ${TOPDIR}/cc_aux.o
#---------------------------------------------
${OBJ}/toid.o: ${APP_SRCS}/toid.c
$(CC) $(CFLAGS) ${APP_SRCS}/toid.c -o $@
toid: ${OBJ}/toid.o ${TOPDIR}/cc_aux.o
$(CC) -g -o $@ ${OBJ}/toid.o ${TOPDIR}/cc_aux.o
#---------------------------------------------
${OBJ}/fillout.o: ${APP_SRCS}/fillout.c
$(CC) $(CFLAGS) ${APP_SRCS}/fillout.c -o $@
fillout: ${OBJ}/fillout.o ${TOPDIR}/cc_aux.o
$(CC) -g -o $@ ${OBJ}/fillout.o ${TOPDIR}/cc_aux.o
#---------------------------------------------
${OBJ}/range2list.o: ${APP_SRCS}/range2list.c
$(CC) $(CFLAGS) ${APP_SRCS}/range2list.c -o $@
range2list: ${OBJ}/range2list.o ${TOPDIR}/cc_aux.o
$(CC) -g -o $@ ${OBJ}/range2list.o ${TOPDIR}/cc_aux.o
#---------------------------------------------
lookup: ${OBJ}/lookup.o ${OBJECTS}
$(CXX) -g -o $@ ${OBJ}/lookup.o ${OBJECTS}
lookupInteractive: ${OBJ}/lookupInteractive.o ${OBJECTS}
$(CXX) -g -o $@ ${OBJ}/lookupInteractive.o ${OBJECTS}
tesselateTrapezoid: ${OBJ}/tesselateTrapezoid.o ${OBJECTS}
$(CXX) -g -o $@ ${OBJ}/tesselateTrapezoid.o ${OBJECTS}
#filter: filter.o $(SKIPOB)
# $(CXX) $(CLX_FLAGS) -o $@ filter.o $(SKIPOB)
filter: filter.o $(OBJECTS)
$(CXX) $(CLX_FLAGS) -o $@ filter.o $(OBJECTS)
filter.o: filter.cpp
$(CXX) $(CXX_FLAGS) filter.cpp -o $@
testrun:
make -f Makefile intersect; rm -f tmp.out
./intersect 20 testInputIntersect > tmp.out
diff -q tmp.out correctOutputIntersect
./intersect -varlength 20 testInputIntersect > tmp.out
diff -q tmp.out correctVarout
./intersect -varlength 20 testTiny > tmp.out
diff -q tmp.out correctTinyVarout
./intersect 20 testTiny > tmp.out
diff -q tmp.out correctTinyOut
testcompress:
make -f Makefile intersect filter
./intersect 20 testInputIntersect | filter 1
./intersect -nranges 1 20 testInputIntersect
vis:
echo "C 80 20 30" > /tmp/h1
./intersect -varlength 20 testInputIntersect >> /tmp/h1
xptest: ${OBJ}/xptest.o ${OBJECTS}
$(CXX) -g -o $@ ${OBJ}/xptest.o ${OBJECTS}
${OBJ}/lookup.o: ${APP_SRCS}/lookup.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/lookup.cpp -o $@
${OBJ}/lookupInteractive.o: ${APP_SRCS}/lookupInteractive.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/lookupInteractive.cpp -o $@
${OBJ}/tesselateTrapezoid.o: ${APP_SRCS}/tesselateTrapezoid.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/tesselateTrapezoid.cpp -o $@
test1: ${OBJ}/test1.o ${OBJECTS}
$(CXX) -g -o $@ ${OBJ}/test1.o ${OBJECTS}
${OBJ}/xptest.o: ${APP_SRCS}/xptest.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/xptest.cpp -o $@
${OBJ}/intersect.o: ${APP_SRCS}/intersect.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/intersect.cpp -o $@
${OBJ}/simpleIntersect.o: ${APP_SRCS}/simpleIntersect.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/simpleIntersect.cpp -o $@
${OBJ}/test1.o: ${APP_SRCS}/test1.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/test1.cpp -o $@
${OBJ}/example.o: ${APP_SRCS}/example.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/example.cpp -o $@
${OBJ}/sqlExample.o: ${APP_SRCS}/sqlExample.cpp
$(CXX) $(CXX_FLAGS) ${APP_SRCS}/sqlExample.cpp -o $@
${OBJ}/SpatialGeneral.o: ${SRCS}/SpatialGeneral.C
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialGeneral.C -o $@
${OBJ}/SpatialIndex.o: ${SRCS}/SpatialIndex.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialIndex.cpp -o $@
${OBJ}/TemporalIndex.o: ${SRCS}/TemporalIndex.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/TemporalIndex.cpp -o $@
${OBJ}/SpatialConstraint.o: ${SRCS}/SpatialConstraint.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialConstraint.cpp -o $@
${OBJ}/sqlInterface.o: ${SRCS}/sqlInterface.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/sqlInterface.cpp -o $@
${OBJ}/SpatialVector.o: ${SRCS}/SpatialVector.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialVector.cpp -o $@
${OBJ}/SpatialRotation.o: ${SRCS}/SpatialRotation.C
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialRotation.C -o $@
${OBJ}/SpatialInterface.o: ${SRCS}/SpatialInterface.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialInterface.cpp -o $@
${OBJ}/SpatialEdge.o: ${SRCS}/SpatialEdge.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialEdge.cpp -o $@
${OBJ}/SpatialException.o: ${SRCS}/SpatialException.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialException.cpp -o $@
${OBJ}/SpatialDomain.o: ${SRCS}/SpatialDomain.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialDomain.cpp -o $@
${OBJ}/SpatialConvex.o: ${SRCS}/SpatialConvex.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SpatialConvex.cpp -o $@
${OBJ}/RangeConvex.o: ${SRCS}/RangeConvex.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/RangeConvex.cpp -o $@
${OBJ}/Htmio.o: ${SRCS}/Htmio.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/Htmio.cpp -o $@
${OBJ}/SkipListElement.o: ${SRCS}/SkipListElement.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SkipListElement.cpp -o $@
${OBJ}/SkipList.o: ${SRCS}/SkipList.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/SkipList.cpp -o $@
${OBJ}/HtmRange.o: ${SRCS}/HtmRange.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/HtmRange.cpp -o $@
${OBJ}/HtmRangeIterator.o: ${SRCS}/HtmRangeIterator.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/HtmRangeIterator.cpp -o $@
${OBJ}/HtmRangeMultiLevel.o: ${SRCS}/HtmRangeMultiLevel.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/HtmRangeMultiLevel.cpp -o $@
${OBJ}/HtmRangeMultiLevelIterator.o: ${SRCS}/HtmRangeMultiLevelIterator.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/HtmRangeMultiLevelIterator.cpp -o $@
${OBJ}/HstmRange.o: ${SRCS}/HstmRange.C
$(CXX) $(CXX_FLAGS) ${SRCS}/HstmRange.C -o $@
${OBJ}/NameEncoding.o: ${SRCS}/NameEncoding.C
$(CXX) $(CXX_FLAGS) $< -o $@
${OBJ}/BitShiftNameEncoding.o: ${SRCS}/BitShiftNameEncoding.C
$(CXX) $(CXX_FLAGS) $< -o $@
${OBJ}/EmbeddedLevelNameEncoding.o: ${SRCS}/EmbeddedLevelNameEncoding.C
$(CXX) $(CXX_FLAGS) $< -o $@
${OBJ}/SpatiallyAdaptiveDataCover.o: ${SRCS}/SpatiallyAdaptiveDataCover.C
$(CXX) $(CXX_FLAGS) $< -o $@
${OBJ}/XXX.o: ${SRCS}/XXX.cpp
$(CXX) $(CXX_FLAGS) ${SRCS}/XXX.cpp -o $@
${TOPDIR}/cc_aux.o: ${TOPDIR}/cc_aux.c
$(CC) -c $(CFLAGS) ${TOPDIR}/cc_aux.c -o $@
cc_intersect.o: ${TOPDIR}/cc_intersect.c
$(CC) -c cc_intersect.c
clean:
rm -f $(OBJECTS) ${OBJ}/hello.o $(OBJ)/intersect.o $(OBJ)/test1.o $(OBJ)/fin.o ${OBJ}/NameEncoding.o ${OBJ}/BitShiftNameEncoding.o ${OBJ}/libSTARE.a
cleanAll:
-rm -f $(OBJECTS) ${OBJ}/*.o
-rm -f a.out intersect sqlExample trcomp
-rm -f $(APPS)
-rm -f tmp.out *.o *~
-rm -f ${APP_SRCS}/*~
#
tarball:
source mktarball.csh
par: HtmParse.o
$(CXX) -g -o $@ HtmParse.o ${OBJECTS}
HtmParse.o: HtmParse.cpp HtmParse.h
$(CXX) $(CXX_FLAGS) -I. HtmParse.cpp
%.o: %.cpp
$(CXX) -c $(CXX_FLAGS) $< -o $@
version:
$(CXX) --version; \
echo; echo MakeVariables:; echo TOPDIR=${TOPDIR}; echo CUTEDIR=${CUTEDIR}
# Update the make file
configure:
./configure
export ARCH