1 # The top-level input Makefile for OpenCV
3 # tell make where aclocal finds its files in Maintainer Mode
4 ACLOCAL_AMFLAGS = -I autotools/aclocal
6 ## Any directories that you want built and installed should go here.
12 SUBDIRS = 3rdparty src include utils interfaces $(APPS_DIR) tests samples data
14 # All the rest of the distributed files
24 autotools/darwin/Info.plist \
25 autotools/darwin/OpenCV.h \
30 cmake_uninstall.cmake.in \
31 OpenCVConfig.cmake.in \
32 OpenCVFindPkgConfig.cmake \
33 OpenCVPCHSupport.cmake \
38 pkgconfigdir = $(libdir)/pkgconfig
39 pkgconfig_DATA = opencv.pc
41 # Rule to build tar-gzipped distribution package
42 $(PACKAGE)-$(VERSION).tar.gz: dist
45 rm -rf `find $(distdir) -name .svn`
47 # Rule to build RPM distribution package
48 rpm: $(PACKAGE)-$(VERSION).tar.gz
49 rpm -ta $(PACKAGE)-$(VERSION).tar.gz
51 # Rule to install the libraries only - prevent rebuilding apps
53 cd src && $(MAKE) install-libLTLIBRARIES
55 # Run ldconfig after installing the library:
59 # rule that gets added to the clean target by Automake
60 clean-local: clean-framework
63 # FRAMEWORK ###################################################################
65 # The following section is dedicated to Darwin / Mac OS X framework builds.
66 # It currently creates a private framework (see Apple documentation) that
67 # cannot be placed to the /Library/Framework locations but is intended to get
68 # copied into application bundles.
70 # You should usually not invoke this target directly but use the shell script
71 # 'make_frameworks.sh' instead that will create the most sensible
72 # default installation (universal build).
74 # See: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/
77 FRAMEWORK_NAME = OpenCV
79 FRAMEWORK_CURRENT_VERSION = 0
80 FRAMEWORK_COMPAT_VERSION = 0
82 # install path to be set in calling script
83 # FRAMEWORK_INSTALL_PATH = executable_path/../Frameworks
85 # architecture to be set in calling script
86 # FRAMEWORK_ARCH = i386
88 FRAMEWORK_INSTALL_NAME = $(FRAMEWORK_INSTALL_PATH)/$(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/$(FRAMEWORK_NAME)
90 FRAMEWORK_XHEADERS = \
91 $(top_srcdir)/autotools/darwin/OpenCV.h \
92 $(top_srcdir)/include/opencv/cv.h \
93 $(top_srcdir)/include/opencv/cv.hpp \
94 $(top_srcdir)/include/opencv/cvaux.h \
95 $(top_srcdir)/include/opencv/cvaux.hpp \
96 $(top_srcdir)/include/opencv/cvcompat.h \
97 $(top_srcdir)/include/opencv/cvstreams.h \
98 $(top_srcdir)/include/opencv/cvtypes.h \
99 $(top_srcdir)/include/opencv/cvver.h \
100 $(top_srcdir)/include/opencv/cvvidsurv.hpp \
101 $(top_srcdir)/include/opencv/cvwimage.h \
102 $(top_srcdir)/include/opencv/cxcore.h \
103 $(top_srcdir)/include/opencv/cxcore.hpp \
104 $(top_srcdir)/include/opencv/cxerror.h \
105 $(top_srcdir)/include/opencv/cxflann.h \
106 $(top_srcdir)/include/opencv/cxmat.hpp \
107 $(top_srcdir)/include/opencv/cxmisc.h \
108 $(top_srcdir)/include/opencv/cxoperations.hpp \
109 $(top_srcdir)/include/opencv/cxtypes.h \
110 $(top_srcdir)/include/opencv/highgui.h \
111 $(top_srcdir)/include/opencv/highgui.hpp \
112 $(top_srcdir)/include/opencv/ml.h
116 $(top_builddir)/3rdparty/.libs/lib_clapack.a \
117 $(top_builddir)/3rdparty/.libs/lib_flann.a \
118 $(top_builddir)/src/.libs/lib_cxcore.a \
119 $(top_builddir)/src/.libs/lib_cv.a \
120 $(top_builddir)/src/.libs/lib_cvaux.a \
121 $(top_builddir)/src/.libs/lib_ml.a \
122 $(top_builddir)/src/.libs/lib_highgui.a
124 FRAMEWORK_XLIBRARIES = -lz -framework Carbon -framework QuickTime -framework QuartzCore
126 FRAMEWORK_DOCUMENTATION =
128 # $(top_srcdir)/doc/license.txt \
129 # $(top_srcdir)/doc/index.htm \
130 # $(top_srcdir)/doc/faq.htm \
131 # $(top_srcdir)/doc/ref
133 FMWK_CC = g++-4.2 -fopenmp -dynamiclib -all_load -Wl,-single_module -Wl,-Y,100
135 framework: all clean-framework
136 @echo "Setting up framework directories..."
137 mkdir -p $(FRAMEWORK_NAME).framework
138 mkdir -p $(FRAMEWORK_NAME).framework/Versions
139 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)
140 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/Resources
141 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/Headers
142 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/Documentation
143 @echo "Creating framework symlinks..."
144 ln -s $(FRAMEWORK_VERSION) $(FRAMEWORK_NAME).framework/Versions/Current
145 ln -s Versions/Current/Headers $(FRAMEWORK_NAME).framework/Headers
146 ln -s Versions/Current/Resources $(FRAMEWORK_NAME).framework/Resources
147 ln -s Versions/Current/Documentation $(FRAMEWORK_NAME).framework/Documentation
148 ln -s Versions/Current/$(FRAMEWORK_NAME) $(FRAMEWORK_NAME).framework/$(FRAMEWORK_NAME)
149 @echo "Building framework data..."
151 -arch $(FRAMEWORK_ARCH) \
152 -compatibility_version $(FRAMEWORK_COMPAT_VERSION) \
153 -current_version $(FRAMEWORK_CURRENT_VERSION) \
154 -install_name $(FRAMEWORK_INSTALL_NAME) \
155 -o $(FRAMEWORK_NAME).framework/Versions/Current/$(FRAMEWORK_NAME) \
156 $(FRAMEWORK_OFILES) $(FRAMEWORK_XLIBRARIES)
157 strip -x $(FRAMEWORK_NAME).framework/Versions/Current/$(FRAMEWORK_NAME)
158 cp $(FRAMEWORK_XHEADERS) $(FRAMEWORK_NAME).framework/Headers/
159 cp $(top_srcdir)/autotools/darwin/Info.plist $(FRAMEWORK_NAME).framework/Resources/
161 # cp -r $(FRAMEWORK_DOCUMENTATION) $(FRAMEWORK_NAME).framework/Documentation/
164 rm -rf $(FRAMEWORK_NAME).framework build_i386 build_ppc build_x86_64 build_ppc64