1# Copyright 2008 Lubomir Bourdev and Hailin Jin
2#
3# Distributed under the Boost Software License, Version 1.0.
4# (See accompanying file LICENSE_1_0.txt or copy at
5# http://www.boost.org/LICENSE_1_0.txt)
6
7.SUFFIXES: .cpp
8#CXX=/usr/local/gcc4/bin/g++
9#CXX=/usr/local/gcc411/bin/g++
10CXX=/usr/local/gcc430/bin/g++
11#CXX=g++
12#CXX='/cygdrive/c/Program Files/Intel/Compiler/C++/10.0.027/IA32/Bin/icl.exe'
13
14CXX_FLAGS=-Wall -DBOOST_GIL_USE_CONCEPT_CHECK #-DNDEBUG
15CXX_CHECKSUM_FLAGS=-Wall -DBOOST_GIL_NO_IO -DBOOST_GIL_USE_CONCEPT_CHECK #-DNDEBUG
16
17BOOST_INCLUDE_PATH=-I../../.. -I../../../../boost_libraries
18LIBJPEG_INCLUDE_PATH=-I../../../../lib/libjpeg
19LIBJPEG_LIB_PATH=-L../../../../lib/libjpeg
20LIBTIFF_INCLUDE_PATH=-I../../../../lib/libtiff
21LIBTIFF_LIB_PATH=-L../../../../lib/libtiff
22LIBPNG_INCLUDE_PATH=-I../../../../lib/libpng
23LIBPNG_LIB_PATH=-L../../../../lib/libpng
24LIBZ_LIB_PATH=-L../../../../lib/zlib
25
26all: performance channel_test pixel_test pixel_iterator_test image_checksum_test image_io_checksum_test
27.cpp.o:
28#	${CXX} ${CXX_FLAGS} ${BOOST_INCLUDE_PATH} ${LIBJPEG_INCLUDE_PATH} ${LIBTIFF_INCLUDE_PATH} ${LIBPNG_INCLUDE_PATH} -c $<
29	${CXX} ${CXX_CHECKSUM_FLAGS} ${BOOST_INCLUDE_PATH} -c $<
30clean:
31	-rm -f *.o *.exe
32performance: performance.o
33	${CXX} -o performance ${CXX_FLAGS} performance.o
34channel_test:	channel.o error_if.o
35	${CXX} -o channel_test ${CXX_CHECKSUM_FLAGS} channel.o error_if.o
36pixel_test:	pixel.o error_if.o
37	${CXX} -o pixel_test ${CXX_CHECKSUM_FLAGS} pixel.o error_if.o
38pixel_iterator_test:	pixel_iterator.o error_if.o
39	${CXX} -o pixel_iterator_test ${CXX_CHECKSUM_FLAGS} pixel_iterator.o error_if.o
40image_checksum_test:	image.o error_if.o sample_image.o
41	${CXX} -o image_checksum_test ${CXX_CHECKSUM_FLAGS} image.o error_if.o sample_image.o
42image_test:	image.o  error_if.o sample_image.o
43	${CXX} -o image_test ${CXX_FLAGS} image.o error_if.o sample_image.o ${LIBJPEG_LIB_PATH} -ljpeg ${LIBTIFF_LIB_PATH} -ltiff ${LIBPNG_LIB_PATH} -lpng ${LIBZ_LIB_PATH} -lz
44image_io_checksum_test:	image_io.o error_if.o
45	${CXX} -o image_io_checksum_test ${CXX_CHECKSUM_FLAGS} image_io.o error_if.o
46image_io_test:	image_io.o error_if.o
47	${CXX} -o image_io_test ${CXX_FLAGS} image_io.o error_if.o ${LIBJPEG_LIB_PATH} -ljpeg ${LIBTIFF_LIB_PATH} -ltiff ${LIBPNG_LIB_PATH} -lpng ${LIBZ_LIB_PATH} -lz
48run_all: channel_test pixel_test pixel_iterator_test image_checksum_test image_io_checksum_test
49	channel_test
50	pixel_test
51	pixel_iterator_test
52	image_checksum_test
53	image_io_checksum_test
54