aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rwxr-xr-xMakefile.in52
1 files changed, 52 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
new file mode 100755
index 0000000..6f47b83
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,52 @@
+PD_DIR = @PD_DIR@
+PDP_DIR = @PDP_DIR@
+
+GEM_OPENCV_VERSION = @GEM_OPENCV_VERSION@
+
+# build flags
+
+INCLUDES = -I$(PD_DIR)/src -I. -I$(PDP_DIR)/include -I$(PD_DIR)/src
+CPPFLAGS = -fPIC -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math \
+ -Wall -W -Wno-unused -Wno-parentheses -Wno-switch \
+ -DGEM_OPENCV_VERSION=\"$(GEM_OPENCV_VERSION)\" -g
+
+UNAME := $(shell uname -s)
+ifeq ($(UNAME),Linux)
+ INCLUDES += `pkg-config --cflags opencv`
+ LDFLAGS = --export-dynamic -shared
+ LIBS = `pkg-config --libs opencv`
+ EXTENSION = pd_linux
+endif
+ifeq ($(UNAME),Darwin)
+ INCLUDES += -I/System/Library/Frameworks/OpenCV.framework/Headers/
+ LDFLAGS = -bundle -undefined dynamic_lookup
+ LIBS = -lm -framework OpenCV
+ EXTENSION = pd_darwin
+endif
+
+.SUFFIXES = $(EXTENSION)
+
+SOURCES = pdp_opencv_threshold.c pdp_opencv_edge.c pdp_opencv_distrans.c pdp_opencv_laplace.c pdp_opencv_motempl.c pdp_opencv_morphology.c pdp_opencv_haarcascade.c pdp_opencv_contours_convexity.c pdp_opencv_contours_boundingrect.c pdp_opencv_bgsubstract.c pdp_opencv_lk.c pdp_opencv_floodfill.c pdp_opencv_hist_compare.c pdp_opencv_dft.c pdp_opencv_knear.cc pdp_opencv_hu_moments.c pdp_opencv_hu_compare.cc pdp_opencv_pgh_compare.cc pdp_opencv_bgstats.cc pdp_opencv_athreshold.c pdp_opencv_hough_lines.cc pdp_opencv_channels.cc pdp_opencv_hough_circles.cc pdp_opencv_camshift.cc pdp_opencv_surf.cc
+SOURCES_OPT = @SOURCES_OPT@
+
+all: $(SOURCES:.c=.$(EXTENSION)) $(SOURCES:.cc=.$(EXTENSION)) $(SOURCES_OPT:.c=.$(EXTENSION)) $(SOURCES_OPT:.cc=.$(EXTENSION))
+
+%.$(EXTENSION): %.o
+ gcc $(LDFLAGS) -o $*.$(EXTENSION) $*.o $(LIBS)
+
+.cc.o:
+ g++ $(CPPFLAGS) $(INCLUDES) -o $*.o -c $*.cc
+
+.c.o:
+ gcc $(CPPFLAGS) $(INCLUDES) -o $*.o -c $*.c
+
+install:
+ cp -f --remove-destination *.pd $(PD_DIR)/doc/5.reference
+
+clean:
+ rm -f pdp_opencv*.o
+ rm -f pdp_opencv*.$(EXTENSION)
+
+distro: clean all
+ rm *.o
+