Permalink
Fetching contributors…
Cannot retrieve contributors at this time
408 lines (288 sloc) 9.71 KB
# @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/noarch/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 \
cvd_src/thread.o \
@dep_objects@
################################################################################
#
# Shared objects
#
ifeq (@osx_hacks@,yes)
soname=libcvd.dylib
soname1=libcvd-@major@.dylib
soname2=libcvd-@major@.@minor@.dylib
dsoname=libcvd_debug.dylib
dsoname1=libcvd_debug-@major@.dylib
dsoname2=libcvd_debug-@major@.@minor@.dylib
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 "$(CXX)" "-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