-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.in
406 lines (287 loc) · 9.64 KB
/
Makefile.in
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
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
# @configure_input@
SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
arch= @build_cpu@
datarootdir=@datadir@
CC = @CC@
CXX=@CXX@
LD=@CXX@
RANLIB=@RANLIB@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
OFLAGS=@OFLAGS@
LDFLAGS = @LDFLAGS@
LOADLIBES = @LIBS@
INSTALL = @INSTALL@
AR=ar
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
MAKEINFO = @MAKEINFO@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DEBUGEXTRA=@STLDEBUG@ -DCVD_IMAGE_DEBUG -DTOON_CHECK_BOUNDS -DTOON_INITIALIZE_NAN
SUBDIRS =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_COMMON = README ChangeLog Makefile.am \
Makefile.in aclocal.m4 configure configure.ac install-sh missing \
mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
################################################################################
#
# CVD objects
#
CVD_OBJS= \
cvd_src/diskbuffer2.o \
cvd_src/deinterlacebuffer.o \
cvd_src/exceptions.o \
cvd_src/image_io.o \
cvd_src/bayer.o \
cvd_src/morphology.o \
cvd_src/colourspace_convert.o \
cvd_src/draw.o \
cvd_src/yuv422.o \
cvd_src/yuv420.o \
cvd_src/image_io/pnm_grok.o \
cvd_src/image_io/bmp.o \
cvd_src/image_io/bmp_read.o \
cvd_src/image_io/bmp_write.o \
cvd_src/image_io/cvdimage.o \
cvd_src/image_io/fits.o \
cvd_src/image_io/fitswrite.o \
cvd_src/image_io/save_postscript.o \
cvd_src/image_io/text_write.o \
cvd_src/image_io/text.o \
cvd_src/fast_corner.o \
cvd_src/convolution.o \
cvd_src/nonmax_suppression.o \
cvd_src/timeddiskbuffer.o \
cvd_src/videosource.o \
cvd_src/connected_components.o \
cvd_src/cvd_timer.o \
@dep_objects@
################################################################################
#
# Shared objects
#
ifeq (@osx_hacks@,yes)
soname=libcvd.dylib
soname1=libcvd-@[email protected]
soname2=libcvd-@major@.@[email protected]
dsoname=libcvd_debug.dylib
dsoname1=libcvd_debug-@[email protected]
dsoname2=libcvd_debug-@major@.@[email protected]
shared=-dynamiclib
install_so=install-libs-so
install_so_debug=install-libs-debug-so
else
ifeq (@cygwin_hacks@,yes)
dllname=cygcvd.dll
dllimportname=libcvd.dll.a
ddllname=cygcvd_debug.dll
ddllimportname=libcvd_debug.dll.a
install_so=install-libs-dll
install_so_debug=install-libs-debug-dll
else
soname=libcvd.so
soname1=libcvd.so.@major@
soname2=libcvd.so.@major@.@minor@
dsoname=libcvd_debug.so
dsoname1=libcvd_debug.so.@major@
dsoname2=libcvd_debug.so.@major@.@minor@
set_soname=-Wl,-soname,libcvd.so.@major@
set_dsoname=-Wl,-soname,libcvd_debug.so.@major@
shared=-shared
install_so=install-libs-so
install_so_debug=install-libs-debug-so
endif
endif
OBJS=$(CVD_OBJS)
DEBUG_OBJS=$(OBJS:cvd_src%=debug/cvd_src%)
sos= $(soname) $(soname1) $(soname2)
dsos= $(dsoname) $(dsoname1) $(dsoname2)
ifeq (@debug_build@,yes)
DTARGETS=libcvd_debug.a $(dsoname) $(ddllname)
DINSTALL=install-libs-debug
endif
all: libcvd.a $(soname) $(dllname) progs $(DTARGETS)
cyg%.dll lib%.dll.a: lib%.a
$(LD) -shared -o cyg$*.dll -Wl,--out-implib=lib$*.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive lib$*.a -Wl,--no-whole-archive $(LDFLAGS) $(LOADLIBES)
$(soname): $(OBJS)
rm -f $(sos)
$(LD) $(shared) -o $(soname2) $(OBJS) $(LDFLAGS) $(LOADLIBES) $(set_soname)
ln -s $(soname2) $(soname1)
ln -s $(soname1) $(soname)
$(dsoname): $(DEBUG_OBJS)
rm -f $(dsos)
$(LD) $(shared) -o $(dsoname2) $(DEBUG_OBJS) $(LDFLAGS) $(LOADLIBES) $(set_dsoname)
ln -s $(dsoname2) $(dsoname1)
ln -s $(dsoname1) $(dsoname)
libcvd.a: $(OBJS)
$(AR) crvs libcvd.a $(OBJS)
$(RANLIB) libcvd.a
libcvd_debug.a: $(DEBUG_OBJS)
$(AR) crvs libcvd_debug.a $(DEBUG_OBJS)
$(RANLIB) libcvd_debug.a
#Automatically deduce the debug directories
DEBUG_DIRS=$(shell find cvd_src -type d | xargs -n1 -Ix echo debug/x)
#This the debug subdir all debug directories, so specifying a dependency on this
#will ensure that all subdirs get created
debug:$(DEBUG_DIRS)
#Multiple targets are allowed on the left, so all directories can be created in batch
#with a single rule
$(DEBUG_DIRS):
mkdir -p $(DEBUG_DIRS)
# Before we compile the test programs we need to augment the
# search paths with the path to libcvd, and also add libcvd to the
# libraries to use
CPPFLAGS = -I. @CPPFLAGS@
ifneq (@osx_hacks@,yes)
LDFLAGS = -Wl,-R. @LDFLAGS@
endif
LDFLAGS = @LDFLAGS@ -L.
LOADLIBES = @LIBS@
PROGS=@progs@
TESTPROGS=@testprogs@
$(PROGS):$(soname)
$(TESTPROGS):$(soname)
testprogs: $(TESTPROGS)
progs: $(PROGS)
@docs@:
doxygen Doxyfile
test-fast:test/fast_test
test/fast_test test/fast_test_image/noise.pgm
#If the mandir is older than the lib, then remake. A bit of a hack
man: libcvd.a
doxygen Doxyfile
touch man
install: install-nodebug $(DINSTALL)
install-nodebug: install-progs install-headers install-libs
install-progs:progs
mkdir -p $(DESTDIR)$(bindir)
[ "$(PROGS)" = "" ] || cp $(PROGS) $(DESTDIR)$(bindir)
install-headers:
mkdir -p $(DESTDIR)$(includedir)
cp -r cvd $(DESTDIR)$(includedir)
install-libs-dll:$(dllname) $(dllimportname)
mkdir -p $(DESTDIR)$(bindir)
cp $(dllname) $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(libdir)
cp $(dllimportname) $(DESTDIR)$(libdir)
install-libs-debug-dll:$(ddllname) $(ddllimportname)
mkdir -p $(DESTDIR)$(bindir)
cp $(ddllname) $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(libdir)
cp $(ddllimportname) $(DESTDIR)$(libdir)
install-libs-so:$(soname)
mkdir -p $(DESTDIR)$(libdir)
rm -f $(DESTDIR)$(libdir)/$(soname2) $(DESTDIR)$(libdir)/$(soname1) $(DESTDIR)$(libdir)/$(soname)
cp $(soname2) $(DESTDIR)$(libdir)
ln -s $(libdir)/$(soname2) $(DESTDIR)$(libdir)/$(soname1)
ln -s $(libdir)/$(soname1) $(DESTDIR)$(libdir)/$(soname)
install-libs-debug-so:$(dsoname)
rm -f $(DESTDIR)$(libdir)/$(dsoname2) $(DESTDIR)$(libdir)/$(dsoname1) $(DESTDIR)$(libdir)/$(dsoname)
cp $(dsoname2) $(DESTDIR)$(libdir)
ln -s $(libdir)/$(dsoname2) $(DESTDIR)$(libdir)/$(dsoname1)
ln -s $(libdir)/$(dsoname1) $(DESTDIR)$(libdir)/$(dsoname)
install-libs-a:libcvd.a
mkdir -p $(DESTDIR)$(libdir)
cp libcvd.a $(DESTDIR)$(libdir)
install-libs-debug-a:libcvd_debug.a
mkdir -p $(DESTDIR)$(libdir)
cp libcvd_debug.a $(DESTDIR)$(libdir)
install-libs:$(install_so) install-libs-a
install-libs-debug:$(install_so_debug) install-libs-debug-a
distclean: clean
/bin/rm -f Makefile config.h config.status config.cache config.log cvd/config.h .deps config.dep_tmp
/bin/rm -rf debug
.deps:
rm -f .sourcefiles
find . -name "*.cxx" -o -name "*.cc" -o -name "*.cpp" -o -name "*.c" -o -name "*.C" | grep -v python > .sourcefiles
rm -f .deps
bash generate_dependencies.bash "-I. $(CPPFLAGS) $(CXXFLAGS)" > .deps
depend: .deps
.PRECIOUS: %.o
%.o : %.cc
$(CXX) $(OFLAGS) -I. $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
%.o: %.cpp
$(CXX) $(OFLAGS) -I. $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
%.o: %.cxx
$(CXX) $(OFLAGS) -I. $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
%.o: %.C
$(CXX) $(OFLAGS) -I. $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@
%.o: %.s
as -g -o $@ $<
debug/%.o : %.cc debug
$(CXX) -I. $(CPPFLAGS) $(CXXFLAGS) $(DEBUGEXTRA) -c $< -o $@
debug/%.o: %.cpp debug
$(CXX) -I. $(CPPFLAGS) $(CXXFLAGS) $(DEBUGEXTRA) -c $< -o $@
debug/%.o: %.cxx debug
$(CXX) -I. $(CPPFLAGS) $(CXXFLAGS) $(DEBUGEXTRA) -c $< -o $@
debug/%.o: %.C debug
$(CXX) -I. $(CPPFLAGS) $(CXXFLAGS) $(DEBUGEXTRA) -c $< -o $@
debug/%.o: %.s debug
as -g -o $@ $<
%: %.o
$(CXX) -o $@ $< $(LDFLAGS) -lcvd $(LOADLIBES)
printlibs:
@echo $(LOADLIBES)
.PHONY: test
REGRESSIONS=distance_transform fast_corner load_and_save
REGRESSION_OUT=$(patsubst %,tests/%.out, $(REGRESSIONS))
test:$(REGRESSION_OUT)
tests/%.test: tests/%.cc
$(CXX) -I. $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -O3 -L. -lcvd
tests/%.out: tests/%.test
./$< && touch $@
.PHONY: examples
EXAMPLES=colourmaps distance_transform
EXAMPLE_PROGS=$(patsubst %,examples/%, $(EXAMPLES))
examples:$(EXAMPLE_PROGS)
$(EXAMPLE_PROGS): % : %.cc
$(CXX) -I. $(CPPFLAGS) $(CXXFLAGS) $< -o $@ -O3 -L. -lcvd
clean:
/bin/rm -f tmp libcvd.a $(sos) libcvd_debug.a $(dsos) $(dllname) $(ddllname) $(dllimportname) $(ddllimportname)
find . -name '*.o' | xargs rm -f
find progs/ -perm +0100 -type f | xargs rm -f
rm -rf html man
rm -f regressions/*.out
rm -rf $(EXAMPLE_PROGS)
include .deps