diff c/Makefile @ 4:6509f5b1d795

updated and added makefile to compile C++ code using opencv in its directory, whipped up simple test to read the pixels in BW images
author Nicolas Saunier <nico@confins.net>
date Fri, 23 Oct 2009 00:26:47 -0400
parents
children 59b7e3954178
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/c/Makefile	Fri Oct 23 00:26:47 2009 -0400
@@ -0,0 +1,47 @@
+BUILD_DIR=../bin
+
+CXX = g++
+
+LDFLAGS = -lm
+LDFLAGS += -lboost_program_options-mt -lboost_filesystem-mt -lboost_system-mt -lboost_unit_test_framework-mt
+LDFLAGS += -lfltk
+
+CFLAGS = -Wall -W -Wextra
+# -DUSE_OPENCV
+UNAME = $(shell uname)
+
+ifneq ($(OPENCV), 0)
+	CFLAGS += -DUSE_OPENCV
+	LDFLAGS += -lhighgui -lcxcore -lcv -lml
+endif
+
+ifeq ($(UNAME), Linux)
+ 	LINUX_BOOST_PREFIX = /usr/local
+	CFLAGS += -DLINUX
+	EXE_EXTENSION=''
+else # windows
+	MINGW_HOME = 'C:\MinGW'
+	LDFLAGS += -mconsole -mwindows -lole32 -lwsock32 -luuid
+	EXE_EXTENSION='.exe'
+endif
+
+ifeq ($(DEBUG), 1)
+	CFLAGS += -g -gstabs+ -DDEBUG
+else
+	CFLAGS += -O3 --fast-math
+	CFLAGS += -DNDEBUG
+endif
+
+ifeq ($(PROFILING), 1)
+	CFLAGS += -pg
+endif
+
+CXXFLAGS = $(INCLUDE) $(CFLAGS)
+
+
+default: main.o
+#	@echo "default"
+	@createdirectory.sh $(BUILD_DIR)
+	$(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/test-pixels $(LDFLAGS)
+
+#	$(CXX) $(CFLAGS) $(LIBS) $^ -o $(BUILD_DIR)/$@ $(LDFLAGS)
\ No newline at end of file