1 # The top-level input Makefile for OpenCV
3 # use the default c++ flags
4 AM_CXXFLAGS=@DEF_CXXFLAGS@
6 # tell make where aclocal finds its files in Maintainer Mode
7 ACLOCAL_AMFLAGS = -I ./autotools/aclocal
9 ## Any directories that you want built and installed should go here.
15 SUBDIRS = cxcore cv cvaux ml otherlibs utils interfaces $(APPS_DIR) tests samples data docs
17 # All the rest of the distributed files
18 #EXTRA_DIST = THANKS COPYING INSTALL README NEWS ChangeLog \
19 EXTRA_DIST = THANKS TODO \
20 opencv.spec opencv.spec.in opencv.pc.in opencv.pc \
21 _make apps filters make_frameworks.sh
23 pkgconfigdir = $(libdir)/pkgconfig
24 pkgconfig_DATA = opencv.pc
26 # The directory where the include files will be installed
27 libcvincludedir = $(includedir)/opencv
29 # Which header files to install
30 libcvinclude_HEADERS =
32 # Rule to build tar-gzipped distribution package
33 $(PACKAGE)-$(VERSION).tar.gz: dist
36 rm -rf `find $(distdir) -name CVS`
37 chmod u+x $(srcdir)/utils/unix2dos.py
38 find $(distdir) -name *.dsw -exec $(srcdir)/utils/unix2dos.py {} \;
39 find $(distdir) -name *.dsp -exec $(srcdir)/utils/unix2dos.py {} \;
41 # Rule to build RPM distribution package
42 rpm: $(PACKAGE)-$(VERSION).tar.gz
43 rpm -ta $(PACKAGE)-$(VERSION).tar.gz
45 # Rule to force automake to rebuild the library
47 @echo "This build target is no longer necessary"
49 # Rule to install the libraries only - prevent rebuilding apps
51 cd src && $(MAKE) install-libLTLIBRARIES
53 # Run ldconfig after installing the library:
57 # rule that gets added to the clean target by Automake
58 clean-local: clean-framework
61 # FRAMEWORK ###################################################################
63 # The following section is dedicated to Darwin / Mac OS X framework builds.
64 # It currently creates a private framework (see Apple documentation) that
65 # cannot be placed to the /Library/Framework locations but is intended to get
66 # copied into application bundles.
68 # You should usually not invoke this target directly but use the shell script
69 # 'make_frameworks.sh' instead that will create the most sensible
70 # default installation (universal build).
72 # See: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/
75 FRAMEWORK_NAME = OpenCV
77 FRAMEWORK_CURRENT_VERSION = 1
78 FRAMEWORK_COMPAT_VERSION = 1
80 # install path to be set in calling script
81 # FRAMEWORK_INSTALL_PATH = executable_path/../Frameworks
83 # architecture to be set in calling script
84 # FRAMEWORK_ARCH = i386
86 FRAMEWORK_INSTALL_NAME = $(FRAMEWORK_INSTALL_PATH)/$(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/$(FRAMEWORK_NAME)
88 FRAMEWORK_XHEADERS = \
89 $(top_srcdir)/autotools/darwin/OpenCV.h \
90 $(top_srcdir)/cxcore/include/cxcore.h \
91 $(top_srcdir)/cxcore/include/cxerror.h \
92 $(top_srcdir)/cxcore/include/cxtypes.h \
93 $(top_srcdir)/cxcore/include/cxmisc.h \
94 $(top_srcdir)/cxcore/include/cxcore.hpp \
95 $(top_srcdir)/cxcore/include/cvver.h \
96 $(top_srcdir)/cv/include/cv.h \
97 $(top_srcdir)/cv/include/cvcompat.h \
98 $(top_srcdir)/cv/include/cvtypes.h \
99 $(top_srcdir)/cv/include/cv.hpp \
100 $(top_srcdir)/cvaux/include/cvaux.h \
101 $(top_srcdir)/cvaux/include/cvmat.hpp \
102 $(top_srcdir)/cvaux/include/cvaux.hpp \
103 $(top_srcdir)/cvaux/include/cvvidsurv.hpp \
104 $(top_srcdir)/ml/include/ml.h \
105 $(top_srcdir)/otherlibs/highgui/highgui.h
108 $(top_builddir)/cxcore/src/.libs/lib_cxcore.a \
109 $(top_builddir)/cv/src/.libs/lib_cv.a \
110 $(top_builddir)/cvaux/src/.libs/lib_cvaux.a \
111 $(top_builddir)/ml/src/.libs/lib_ml.a \
112 $(top_builddir)/otherlibs/highgui/.libs/lib_highgui.a
114 FRAMEWORK_XLIBRARIES = -framework Carbon -framework QuickTime -framework QuartzCore
116 FRAMEWORK_DOCUMENTATION = \
117 $(top_srcdir)/docs/license.txt \
118 $(top_srcdir)/docs/index.htm \
119 $(top_srcdir)/docs/faq.htm \
120 $(top_srcdir)/docs/ref
122 FMWK_CC = g++ -dynamiclib -all_load -Wl,-single_module -Wl,-Y,100
124 framework: all clean-framework
125 @echo "Setting up framework directories..."
126 mkdir -p $(FRAMEWORK_NAME).framework
127 mkdir -p $(FRAMEWORK_NAME).framework/Versions
128 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)
129 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/Resources
130 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/Headers
131 mkdir -p $(FRAMEWORK_NAME).framework/Versions/$(FRAMEWORK_VERSION)/Documentation
132 @echo "Creating framework symlinks..."
133 ln -s $(FRAMEWORK_VERSION) $(FRAMEWORK_NAME).framework/Versions/Current
134 ln -s Versions/Current/Headers $(FRAMEWORK_NAME).framework/Headers
135 ln -s Versions/Current/Resources $(FRAMEWORK_NAME).framework/Resources
136 ln -s Versions/Current/Documentation $(FRAMEWORK_NAME).framework/Documentation
137 ln -s Versions/Current/$(FRAMEWORK_NAME) $(FRAMEWORK_NAME).framework/$(FRAMEWORK_NAME)
138 @echo "Building framework data..."
140 -arch $(FRAMEWORK_ARCH) \
141 -compatibility_version $(FRAMEWORK_COMPAT_VERSION) \
142 -current_version $(FRAMEWORK_CURRENT_VERSION) \
143 -install_name $(FRAMEWORK_INSTALL_NAME) \
144 -o $(FRAMEWORK_NAME).framework/Versions/Current/$(FRAMEWORK_NAME) \
145 $(FRAMEWORK_OFILES) $(FRAMEWORK_XLIBRARIES)
146 strip -x $(FRAMEWORK_NAME).framework/Versions/Current/$(FRAMEWORK_NAME)
147 cp $(FRAMEWORK_XHEADERS) $(FRAMEWORK_NAME).framework/Headers/
148 cp -r $(FRAMEWORK_DOCUMENTATION) $(FRAMEWORK_NAME).framework/Documentation/
149 cp $(top_srcdir)/autotools/darwin/Info.plist $(FRAMEWORK_NAME).framework/Resources/
152 rm -rf $(FRAMEWORK_NAME).framework