BUILD_DIR?=../CERT2_0 # $(call source-to-object, source-file-list) source-to-object = $(subst .cc,.o,$(filter %.cc,$1)) \ $(subst .cpp,.o,$(filter %.cpp,$1)) \ $(subst .mm,.o,$(filter %.mm,$1)) \ $(subst .c,.o,$(filter %.c,$1)) INCLUDES=-I${BUILD_DIR}/CERTWrapper -I${BUILD_DIR}/CERTWrapper/Plugins -I${BUILD_DIR}/aligneyes -I${BUILD_DIR}/eyefinder -I${BUILD_DIR}/mp_auCoder -I${BUILD_DIR}/mptslidingwindow -I${BUILD_DIR}/featuredetector -I${BUILD_DIR}/eyefinder/EyeWeightsFiles -I${BUILD_DIR}/mp_auCoder/kernels-96x96 -I${BUILD_DIR}/mp_auCoder/threadpool -I${BUILD_DIR}/Misc -I${BUILD_DIR}/posedetector -I${BUILD_DIR}/posedetector/PoseWeightsFiles -I/usr/local/include -I/usr/local/boost_1_33_1-gcc4_0/include/boost-1_33_1 -I/usr/include/libxml2 -I${BUILD_DIR}/FeaturePointImprover -I${BUILD_DIR}/IntervalDetection VPATH=${BUILD_DIR}/CERTWrapper ${BUILD_DIR}/CERTWrapper/Plugins ${BUILD_DIR}/aligneyes ${BUILD_DIR}/eyefinder ${BUILD_DIR}/mp_auCoder ${BUILD_DIR}/mptslidingwindow ${BUILD_DIR}/eyefinder/EyeWeightsFiles ${BUILD_DIR}/mp_auCoder/kernels-96x96 ${BUILD_DIR}/featuredetector ${BUILD_DIR}/MLR ${BUILD_DIR}/Misc ${BUILD_DIR}/posedetector ${BUILD_DIR}/posedetector/PoseWeightsFiles ${BUILD_DIR}/FeaturePointImprover ${BUILD_DIR}/IntervalDetection KERNELS=${BUILD_DIR}/mp_auCoder/kernels-96x96 KERN_SOURCES=${shell cd ${KERNELS};ls kern*.cpp} #KERN_SOURCES=${shell ls ${KERNELS}/kern*.cpp} ifndef NOFEATURES FEATURE_SRCS=gprior.cpp featureDetector.cpp simplematrix.cpp displayCi.cpp objectWithFeatures.cpp visualobject.cpp featuredata_ser.cpp featuredata.cpp mp_FDEyes.cpp OWFProcessor.cpp FeatureAlignment.cpp FeatureAveraging.cpp FeatureImprover.cpp endif ifndef NOMLR MLR_SRCS=mp_MLR.cpp mp_BHAT.cpp endif POSE_SRCS=PoseDetector.cpp pose1_wts.cc pose2_wts.cc pose3_wts.cc pitch_1_v_2_wts.cc pitch_1_v_3_wts.cc pitch_2_v_3_wts.cc pose1_v_2_wts.cc pose1_v_3_wts.cc pose1_v_4_wts.cc pose1_v_5_wts.cc pose1_v_6_wts.cc pose1_v_7_wts.cc pose2_v_3_wts.cc pose2_v_4_wts.cc pose2_v_5_wts.cc pose2_v_6_wts.cc pose2_v_7_wts.cc pose3_v_4_wts.cc pose3_v_5_wts.cc pose3_v_6_wts.cc pose3_v_7_wts.cc pose4_v_5_wts.cc pose4_v_6_wts.cc pose4_v_7_wts.cc pose4_wts.cc pose5_v_6_wts.cc pose5_v_7_wts.cc pose5_wts.cc pose6_v_7_wts.cc pose6_wts.cc pose7_wts.cc pitch1_wts.cc pitch2_wts.cc pitch3_wts.cc #pose_1_v_2_wts.cc pose_1_v_3_wts.cc pose_2_v_3_wts.cc POST_2_0_SOURCES=waldweights1.cc rimage_ser.cpp mp_AUResults.cpp featuredata.cpp featuredata_ser.cpp ImageDirIterator.cpp ImageLoader.cpp PluginController.cpp PosePlugin.cpp PluginBase.cpp SVMPlugin.cpp VideoIterator.cpp CERT_Config.cpp ConfigParser_XML.cpp SimpleClassifier.cpp FeaturePlugin.cpp FacePlugin.cpp CERT_Arguments.cpp PatchPlugin.cpp StandardOutput.cpp CERT_filetypes.cpp FeatureImproverPlugin.cpp IntervalMean.cpp FeaturePointImprover.c crp.cpp tt.cpp IntervalCRP.cpp CERT_Scheduler.cpp CERT_Task.cpp CERT_Loader.cpp numberOfProcessors.cpp SOURCES=main.cpp mp_CERT.cpp mp_CERT_Public.cpp mp_rotateFace.cpp beyesobject.cpp eyefinder.cc eyefinderBinary.cc faceobject.cpp mp_eyefinderWrapper.cpp mp_SVMWeights.cpp mp_gabor.cpp mp_threadedGabor.cpp ci.cc convolve_linux.cc faceboxlist.cc gentleFace1.cc logger.cc mpeoh.cpp mpisearchFaceDetector.cc mptSlidingWindow.cpp mptSlidingWindowStream.cpp roi.cc rvimage.cpp square.cc lefteye_eye_dist_eye_centered.cc righteye_eye_dist_eye_centered.cc cascadeThreshAdjustor.cpp mptVersion.c certVersion.c ${POST_2_0_SOURCES} ${KERN_SOURCES} ${FEATURE_SRCS} ${MLR_SRCS} ${POSE_SRCS} OBJECTS=$(call source-to-object, ${SOURCES}) #${warning OBJECTS=${OBJECTS}} ifdef DEBUG COPTIMIZE_FLAGS=-g -O0 else COPTIMIZE_FLAGS=-O3 -DNDEBUG endif CFLAGSUSER=`Magick++-config --cppflags` CFLAGS=${INCLUDES} -Wall ${COPTIMIZE_FLAGS} -finline-functions -Wno-inline -fPIC -Wno-long-double -no-cpp-precomp CPPFLAGS=-c -DUSE_FEATURES ${INCLUDES} ${CFLAGS} #-ftemplate-depth-256 LDFLAGS=-lSystem -framework Accelerate #CC=${CXX} boost=-L/usr/local/boost_1_33_1-gcc4_0-32-UNIVERSAL/lib/ -lboost_filesystem -lboost_serialization -lboost_thread EXE=CERT all: exe #include ${MPT}/Build/common.mk exe: ${EXE} links ${EXE}: ${OBJECTS} ${CXX} $^ ${INCLUDES} -lxml2 -L/usr/local/fftw3-4.0/lib -lfftw3 ${boost} `Magick++-config --ldflags` `Magick++-config --libs` ${LDFLAGS} -o $@ links: featuredetector # If featuredetector needs to be rebuilt, assume the SVMWeights does # can't rely on it to work properly because the VPATH variable points to the source version of SVMWeights featuredetector: ln -f -s ${BUILD_DIR}/featuredetector ln -f -s ${BUILD_DIR}/mp_auCoder/SVMWeights clean: rm -f ${EXE} *.o SVMWeights featuredetector print-%: ; @$(error $* is $($*) ($(value $*)) (from $(origin $*))) $(filter-out print-%, $(MAKECMDGOALS)): $(filter print-%, $(MAKECMDGOALS))