aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/cimg/files/patch-examples__Makefile
blob: c264cd82e13b799eea57f6e1051ed96b06876515 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
--- examples/Makefile.orig  2015-02-06 11:10:43.000000000 +0100
+++ examples/Makefile   2015-02-07 19:42:00.000000000 +0100
@@ -85,8 +85,8 @@
 # Set correct variables and paths
 #---------------------------------
 CIMG_VERSION = 1.6.0
-X11PATH      = /usr/X11R6
-CC           = g++
+#X11PATH      = $(X11PATH)
+CC           = $(CXX)
 EXEPFX       =
 CCVER       = $(CC)
 ifeq ($(CC),g++)
@@ -100,7 +100,7 @@
 CFLAGS       = -I..
 LIBS         =
 else
-CFLAGS       = -I.. -Wall -W
+CFLAGS       = -I.. -Wall -W $(CPPFLAGS)
 LIBS         = -lm
 endif
 
@@ -124,12 +124,12 @@
 
 # Flags to enable code optimization by the compiler.
 ifeq ($(CC),g++)
-CIMG_OPT_CFLAGS = -O2 -mtune=generic
+CIMG_OPT_CFLAGS = -mtune=generic
 else
 ifeq ($(CC),icpc)
 CIMG_OPT_CFLAGS = -fast
 else
-CIMG_OPT_CFLAGS = -O2
+CIMG_OPT_CFLAGS =
 endif
 endif
 
@@ -141,7 +141,7 @@
 endif
 
 # Flags to enable OpenCV support.
-CIMG_OPENCV_CFLAGS = -Dcimg_use_opencv -I/usr/include/opencv
+CIMG_OPENCV_CFLAGS = -Dcimg_use_opencv -I$(LOCALBASE)/include/opencv
 CIMG_OPENCV_LIBS = -lopencv_core -lopencv_highgui
 #CIMG_OPENCV_LIBS = -lcv -lhighgui    #-> Use this for OpenCV < 2.2.0
 
@@ -152,7 +152,7 @@
 # (X11 is used by CImg to handle display windows)
 # !!! For 64bits systems : replace -L$(X11PATH)/lib by -L$(X11PATH)/lib64 !!!
 CIMG_X11_CFLAGS = -I$(X11PATH)/include
-CIMG_X11_LIBS = -L$(X11PATH)/lib -lpthread -lX11
+CIMG_X11_LIBS = -L$(X11PATH)/lib -lX11 $(PTHREAD_LIBS)
 
 # Flags to enable fast image display, using the XSHM library (when using X11).
 # !!! Seems to randomly crash when used on MacOSX and 64bits systems, so use it only when necessary !!!
@@ -182,7 +182,7 @@
 # Flags to enable native support for TIFF image files, using the TIFF library.
 # ( http://www.libtiff.org/ )
 CIMG_TIFF_CFLAGS = -Dcimg_use_tiff
-CIMG_TIFF_LIBS = -ltiff
+CIMG_TIFF_LIBS = -ltiff -ltiffxx
 
 # Flags to enable native support for MINC2 image files, using the MINC2 library.
 # ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide )
@@ -191,12 +191,12 @@
 
 # Flags to enable native support for EXR image files, using the OpenEXR library.
 # ( http://www.openexr.com/ )
-CIMG_EXR_CFLAGS = -Dcimg_use_openexr -I/usr/include/OpenEXR
+CIMG_EXR_CFLAGS = -Dcimg_use_openexr -I$(LOCALBASE)/include/OpenEXR
 CIMG_EXR_LIBS = -lIlmImf -lHalf
 
 # Flags to enable native support for various video files, using the FFMPEG library.
 # ( http://www.ffmpeg.org/ )
-CIMG_FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -I/usr/include/libavcodec -I/usr/include/libavformat -I/usr/include/libswscale -I/usr/include/ffmpeg
+CIMG_FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -I$(LOCALBASE)/include/libavcodec -I$(LOCALBASE)/include/libavformat -I$(LOCALBASE)/include/libswscale -I$(LOCALBASE)/include/ffmpeg
 CIMG_FFMPEG_LIBS = -lavcodec -lavformat -lswscale
 
 # Flags to enable native support for compressed .cimgz files, using the Zlib library.
@@ -204,10 +204,10 @@
 CIMG_ZLIB_CFLAGS = -Dcimg_use_zlib
 CIMG_ZLIB_LIBS = -lz
 
-# Flags to enable native support of most classical image file formats, using the Magick++ library.
+# Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library.
 # ( http://www.imagemagick.org/Magick++/ )
-CIMG_MAGICK_CFLAGS = -Dcimg_use_magick `Magick++-config --cppflags` `Magick++-config --cxxflags`
-CIMG_MAGICK_LIBS = `Magick++-config --ldflags` `Magick++-config --libs`
+CIMG_MAGICK_CFLAGS = -Dcimg_use_magick `GraphicsMagick++-config --cppflags` `GraphicsMagick++-config --cxxflags`
+CIMG_MAGICK_LIBS = `GraphicsMagick++-config --ldflags` `GraphicsMagick++-config --libs`
 
 # Flags to enable faster Discrete Fourier Transform computation, using the FFTW3 library
 # ( http://www.fftw.org/ )
@@ -220,14 +220,17 @@
 
 # Flags to enable the use of LAPACK routines for matrix computation
 # ( http://www.netlib.org/lapack/ )
-CIMG_LAPACK_CFLAGS = -Dcimg_use_lapack
-CIMG_LAPACK_LIBS = -lblas -lg2c -llapack
+#CIMG_LAPACK_CFLAGS = -Dcimg_use_lapack
+#CIMG_LAPACK_LIBS = -lblas -llapack
 
 # Flags to enable the use of the Board library
 # ( http://libboard.sourceforge.net/ )
-CIMG_BOARD_CFLAGS = -Dcimg_use_board -I/usr/include/board
+CIMG_BOARD_CFLAGS = -Dcimg_use_board -I$(LOCALBASE)/include/board
 CIMG_BOARD_LIBS = -lboard
 
+# Flags to compile on FreeBSD
+CIMG_FREEBSD_LDFLAGS = -ansi -ffast-math  -I$(X11PATH)/include $(EXTRA_FLAGS) -lX11 -L$(X11PATH)/lib
+
 # Flags to compile on Sun Solaris
 CIMG_SOLARIS_LIBS = -R$(X11PATH)/lib -lrt -lnsl -lsocket
 
@@ -372,6 +375,7 @@
 $(CIMG_ZLIB_CFLAGS) \
 $(CIMG_OPENCV_CFLAGS) \
 $(CIMG_MAGICK_CFLAGS) \
+$(CIMG_LAPACK_CFLAGS) \
 $(CIMG_FFTW3_CFLAGS)" \
 "CONF_LIBS = \
 $(CIMG_X11_LIBS) \
@@ -382,6 +386,7 @@
 $(CIMG_PNG_LIBS) \
 $(CIMG_JPEG_LIBS) \
 $(CIMG_ZLIB_LIBS) \
+$(CIMG_LAPACK_LIBS) \
 $(CIMG_OPENCV_LIBS) \
 $(CIMG_MAGICK_LIBS) \
 $(CIMG_FFTW3_LIBS)" \