Austin Schuh | 8c794d5 | 2019-03-03 21:17:37 -0800 | [diff] [blame] | 1 | # |
| 2 | # File : Makefile |
| 3 | # ( Makefile for GNU 'make' utility ) |
| 4 | # |
| 5 | # Description : Makefile for compiling CImg-based code on Unix. |
| 6 | # This file is a part of the CImg Library project. |
| 7 | # ( http://cimg.eu ) |
| 8 | # |
| 9 | # Copyright : David Tschumperle |
| 10 | # ( http://tschumperle.users.greyc.fr/ ) |
| 11 | # |
| 12 | # License : CeCILL v2.0 |
| 13 | # ( http://www.cecill.info/licences/Licence_CeCILL_V2-en.html ) |
| 14 | # |
| 15 | # This software is governed by the CeCILL license under French law and |
| 16 | # abiding by the rules of distribution of free software. You can use, |
| 17 | # modify and/ or redistribute the software under the terms of the CeCILL |
| 18 | # license as circulated by CEA, CNRS and INRIA at the following URL |
| 19 | # "http://www.cecill.info". |
| 20 | # |
| 21 | # As a counterpart to the access to the source code and rights to copy, |
| 22 | # modify and redistribute granted by the license, users are provided only |
| 23 | # with a limited warranty and the software's author, the holder of the |
| 24 | # economic rights, and the successive licensors have only limited |
| 25 | # liability. |
| 26 | # |
| 27 | # In this respect, the user's attention is drawn to the risks associated |
| 28 | # with loading, using, modifying and/or developing or reproducing the |
| 29 | # software by the user in light of its specific status of free software, |
| 30 | # that may mean that it is complicated to manipulate, and that also |
| 31 | # therefore means that it is reserved for developers and experienced |
| 32 | # professionals having in-depth computer knowledge. Users are therefore |
| 33 | # encouraged to load and test the software's suitability as regards their |
| 34 | # requirements in conditions enabling the security of their systems and/or |
| 35 | # data to be ensured and, more generally, to use and operate it in the |
| 36 | # same conditions as regards security. |
| 37 | # |
| 38 | # The fact that you are presently reading this means that you have had |
| 39 | # knowledge of the CeCILL license and that you accept its terms. |
| 40 | # |
| 41 | |
| 42 | #------------------------------------------------------- |
| 43 | # Define the list of files to be compiled |
| 44 | # (name of the source files without the .cpp extension) |
| 45 | #------------------------------------------------------- |
| 46 | |
| 47 | # Files which do not necessarily require external libraries to run. |
| 48 | FILES = CImg_demo \ |
| 49 | captcha \ |
| 50 | curve_editor2d \ |
| 51 | dtmri_view3d \ |
| 52 | edge_explorer2d \ |
| 53 | fade_images \ |
| 54 | gaussian_fit1d \ |
| 55 | generate_loop_macros \ |
| 56 | hough_transform2d \ |
| 57 | image_registration2d \ |
| 58 | image2ascii \ |
| 59 | image_surface3d \ |
| 60 | jawbreaker \ |
| 61 | mcf_levelsets2d \ |
| 62 | mcf_levelsets3d \ |
| 63 | odykill \ |
| 64 | pde_heatflow2d \ |
| 65 | pde_TschumperleDeriche2d \ |
| 66 | plotter1d \ |
| 67 | radon_transform2d \ |
| 68 | scene3d \ |
| 69 | spherical_function3d \ |
| 70 | tetris \ |
| 71 | tron \ |
| 72 | tutorial \ |
| 73 | wavelet_atrous \ |
| 74 | use_chlpca \ |
| 75 | use_draw_gradient \ |
| 76 | use_nlmeans \ |
| 77 | use_skeleton \ |
| 78 | use_RGBclass \ |
| 79 | |
| 80 | # Files which requires external libraries to run. |
| 81 | EXTRA_FILES = use_tiff_stream use_jpeg_buffer |
| 82 | |
| 83 | #--------------------------------- |
| 84 | # Set correct variables and paths |
| 85 | #--------------------------------- |
| 86 | VERSION = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c4 | head -c3) |
| 87 | VERSION1 = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c4 | head -c1) |
| 88 | VERSION2 = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c3 | head -c1) |
| 89 | VERSION3 = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c2 | head -c1) |
| 90 | SVERSION=$(VERSION1).$(VERSION2).$(VERSION3) |
| 91 | |
| 92 | X11PATH = /usr/X11R6 |
| 93 | |
| 94 | EXE_PRE = |
| 95 | EXE_EXT = |
| 96 | ifeq ($(MSYSTEM),MINGW32) |
| 97 | EXE_EXT = .exe |
| 98 | endif |
| 99 | ifeq ($(MSYSTEM),MINGW64) |
| 100 | EXE_EXT = .exe |
| 101 | endif |
| 102 | |
| 103 | ifeq ($(shell echo $(notdir $(CXX)) | head -c3),g++) |
| 104 | IS_GCC = 1 |
| 105 | endif |
| 106 | ifeq ($(shell echo $(notdir $(CXX)) | head -c7),clang++) |
| 107 | IS_CLANG = 1 |
| 108 | endif |
| 109 | ifeq ($(shell echo $(notdir $(CXX)) | head -c4),icpc) |
| 110 | IS_ICPC = 1 |
| 111 | endif |
| 112 | |
| 113 | CXXVER = $(CXX) |
| 114 | CFLAGS = -I.. -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label |
| 115 | LIBS = -lm |
| 116 | ifdef IS_GCC |
| 117 | CXXVER = $(shell $(CXX) -v 2>&1 | tail -n 1) |
| 118 | endif |
| 119 | ifdef IS_CLANG |
| 120 | CXXVER = $(shell $(CXX) -v 2>&1 | head -n 1) |
| 121 | endif |
| 122 | ifdef IS_ICPC |
| 123 | CXXVER = $(shell $(CXX) -v 2>&1) |
| 124 | CFLAGS = -I.. |
| 125 | LIBS = |
| 126 | endif |
| 127 | |
| 128 | #-------------------------------------------------- |
| 129 | # Set compilation flags allowing to customize CImg |
| 130 | #-------------------------------------------------- |
| 131 | |
| 132 | # Flags to enable strict code standards |
| 133 | ifeq ($(notdir $(CXX)),icpc) |
| 134 | ANSI_CFLAGS = -std=c++11 |
| 135 | else |
| 136 | ANSI_CFLAGS = -std=c++11 -pedantic |
| 137 | endif |
| 138 | |
| 139 | # Flags to enable code debugging. |
| 140 | DEBUG_CFLAGS = -Dcimg_verbosity=3 -Dcimg_strict_warnings -g -fsanitize=address |
| 141 | |
| 142 | # Flags to enable color output messages. |
| 143 | # (requires a VT100 compatible terminal) |
| 144 | VT100_CFLAGS = -Dcimg_use_vt100 |
| 145 | |
| 146 | # Flags to enable code optimization by the compiler. |
| 147 | OPT_CFLAGS = -Ofast |
| 148 | ifdef IS_GCC |
| 149 | OPT_CFLAGS = -Ofast -mtune=generic |
| 150 | endif |
| 151 | ifdef IS_ICPC |
| 152 | OPT_CFLAGS = -fast |
| 153 | endif |
| 154 | |
| 155 | # Flags to enable OpenMP support. |
| 156 | OPENMP_DEFINE = -Dcimg_use_openmp -fopenmp |
| 157 | OPENMP_INCDIR = |
| 158 | OPENMP_CFLAGS = $(OPENMP_DEFINE) $(OPENMP_INCDIR) |
| 159 | ifdef IS_ICPC |
| 160 | OPENMP_CFLAGS = #-Dcimg_use_openmp -openmp -i-static # -> Seems to bug the compiler! |
| 161 | endif |
| 162 | ifdef IS_CLANG |
| 163 | OPENMP_CFLAGS = |
| 164 | endif |
| 165 | |
| 166 | # Flags to enable OpenCV support. |
| 167 | OPENCV_DEFINE = -Dcimg_use_opencv |
| 168 | OPENCV_INCDIR = $(shell pkg-config opencv --cflags || echo -I/usr/include/opencv) -I/usr/include/opencv |
| 169 | OPENCV_CFLAGS = $(OPENCV_DEFINE) $(OPENCV_INCDIR) |
| 170 | OPENCV_LIBS = $(shell pkg-config opencv --libs || echo -lopencv_core -lopencv_highgui) |
| 171 | |
| 172 | # Flags used to disable display capablities of CImg |
| 173 | NODISPLAY_CFLAGS = -Dcimg_display=0 |
| 174 | |
| 175 | # Flags to enable the use of the X11 library. |
| 176 | # (X11 is used by CImg to handle display windows) |
| 177 | X11_DEFINE = -Dcimg_display=1 |
| 178 | X11_INCDIR = $(shell pkg-config --cflags x11 || echo -I/usr/X11R6/include) |
| 179 | X11_CFLAGS = $(X11_DEFINE) $(X11_INCDIR) |
| 180 | X11_LIBS = $(shell pkg-config --libs x11 || echo -L/usr/X11R6/lib -lX11) -lpthread |
| 181 | |
| 182 | # Flags to enable fast image display, using the XSHM library (when using X11). |
| 183 | # !!! Seems to randomly crash when used on MacOSX and 64bits systems, so use it only when necessary !!! |
| 184 | XSHM_CFLAGS = # -Dcimg_use_xshm $(shell pkg-config --cflags xcb-shm) |
| 185 | XSHM_LIBS = # $(shell pkg-config --libs xcb-shm || echo -L$(USR)/X11R6/lib -lXext) |
| 186 | |
| 187 | # Flags to enable GDI32 display (Windows native). |
| 188 | GDI32_DEFINE = -mwindows |
| 189 | GDI32_INCDIR = |
| 190 | GDI32_CFLAGS = $(GDI32_DEFINE) $(GDI32_INCDIR) |
| 191 | GDI32_LIBS = -lgdi32 |
| 192 | |
| 193 | # Flags to enable screen mode switching, using the XRandr library (when using X11). |
| 194 | # ( http://www.x.org/wiki/Projects/XRandR ) |
| 195 | # !!! Not supported by the X11 server on MacOSX, so do not use it on MacOSX !!! |
| 196 | XRANDR_DEFINE = -Dcimg_use_xrandr |
| 197 | XRANDR_INCDIR = |
| 198 | XRANDR_CFLAGS = $(XRANDR_DEFINE) $(XRANDR_INCDIR) |
| 199 | XRANDR_LIBS = -lXrandr |
| 200 | |
| 201 | # Flags to enable native support for PNG image files, using the PNG library. |
| 202 | # ( http://www.libpng.org/ ) |
| 203 | PNG_DEFINE = -Dcimg_use_png |
| 204 | PNG_INCDIR = |
| 205 | PNG_CFLAGS = $(PNG_DEFINE) $(PNG_INCDIR) |
| 206 | PNG_LIBS = -lpng -lz |
| 207 | |
| 208 | # Flags to enable native support for JPEG image files, using the JPEG library. |
| 209 | # ( http://www.ijg.org/ ) |
| 210 | JPEG_DEFINE = -Dcimg_use_jpeg |
| 211 | JPEG_INCDIR = |
| 212 | JPEG_CFLAGS = $(JPEG_DEFINE) $(JPEG_INCDIR) |
| 213 | JPEG_LIBS = -ljpeg |
| 214 | |
| 215 | # Flags to enable native support for TIFF image files, using the TIFF library. |
| 216 | # ( http://www.libtiff.org/ ) |
| 217 | TIFF_DEFINE = -Dcimg_use_tiff |
| 218 | TIFF_INCDIR = |
| 219 | TIFF_CFLAGS = $(TIFF_DEFINE) $(TIFF_INCDIR) |
| 220 | TIFF_LIBS = -ltiff |
| 221 | |
| 222 | # Flags to enable native support for MINC2 image files, using the MINC2 library. |
| 223 | # ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
| 224 | MINC2_DEFINE = -Dcimg_use_minc2 |
| 225 | MINC2_INCDIR = -I${HOME}/local/include |
| 226 | MINC2_CFLAGS = $(MINC2_DEFINE) $(MINC2_INCDIR) |
| 227 | MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib |
| 228 | |
| 229 | # Flags to enable native support for EXR image files, using the OpenEXR library. |
| 230 | # ( http://www.openexr.com/ ) |
| 231 | OPENEXR_DEFINE = -Dcimg_use_openexr |
| 232 | OPENEXR_INCDIR = -I/usr/include/OpenEXR |
| 233 | OPENEXR_CFLAGS = $(OPENEXR_DEFINE) $(OPENEXR_INCDIR) |
| 234 | OPENEXR_LIBS = -lIlmImf -lHalf |
| 235 | |
| 236 | # Flags to enable native support for various video files, using the FFMPEG library. |
| 237 | # ( http://www.ffmpeg.org/ ) |
| 238 | FFMPEG_DEFINE = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS |
| 239 | FFMPEG_INCDIR = -I/usr/include/libavcodec -I/usr/include/libavformat -I/usr/include/libswscale -I/usr/include/ffmpeg |
| 240 | FFMPEG_CFLAGS = $(FFMPEG_DEFINE) $(FFMPEG_INCDIR) |
| 241 | FFMPEG_LIBS = -lavcodec -lavformat -lswscale |
| 242 | |
| 243 | # Flags to enable native support for compressed .cimgz files, using the Zlib library. |
| 244 | # ( http://www.zlib.net/ ) |
| 245 | ZLIB_DEFINE = -Dcimg_use_zlib |
| 246 | ZLIB_INCDIR = $(shell pkg-config --cflags zlib || echo -I$(USR)/$(INCLUDE)) |
| 247 | ZLIB_CFLAGS = $(ZLIB_DEFINE) $(ZLIB_INCDIR) |
| 248 | ZLIB_LIBS = $(shell pkg-config --libs zlib || echo -lz) |
| 249 | |
| 250 | # Flags to enable native support for downloading files from the network. |
| 251 | # ( http://curl.haxx.se/libcurl/ ) |
| 252 | CURL_DEFINE = -Dcimg_use_curl |
| 253 | CURL_INCDIR = |
| 254 | CURL_CFLAGS = $(CURL_DEFINE) |
| 255 | CURL_LIBS = -lcurl |
| 256 | |
| 257 | # Flags to enable native support of most classical image file formats, using the Magick++ library. |
| 258 | # ( http://www.imagemagick.org/Magick++/ ) |
| 259 | MAGICK_DEFINE = -Dcimg_use_magick |
| 260 | MAGICK_INCDIR = $(shell pkg-config --cflags GraphicsMagick++ || echo -I$(USR)/$(INCLUDE)/GraphicsMagick) |
| 261 | MAGICK_CFLAGS = $(MAGICK_DEFINE) $(MAGICK_INCDIR) |
| 262 | MAGICK_LIBS = $(shell pkg-config --libs GraphicsMagick++ || echo -lGraphicsMagick++) |
| 263 | |
| 264 | # Flags to enable faster Discrete Fourier Transform computation, using the FFTW3 library |
| 265 | # ( http://www.fftw.org/ ) |
| 266 | FFTW3_DEFINE = -Dcimg_use_fftw3 |
| 267 | FFTW3_INCDIR = |
| 268 | FFTW3_CFLAGS = $(FFTW3_DEFINE) $(FFTW3_INCDIR) |
| 269 | ifeq ($(OSTYPE),msys) |
| 270 | FFTW3_LIBS = -lfftw3-3 |
| 271 | else |
| 272 | FFTW3_LIBS = -lfftw3 -lfftw3_threads |
| 273 | endif |
| 274 | |
| 275 | # Flags to enable the use of LAPACK routines for matrix computation |
| 276 | # ( http://www.netlib.org/lapack/ ) |
| 277 | LAPACK_DEFINE = -Dcimg_use_lapack |
| 278 | LAPACK_INCDIR = |
| 279 | LAPACK_CFLAGS = $(LAPACK_DEFINE) $(LAPACK_INCDIR) |
| 280 | LAPACK_LIBS = -lblas -llapack |
| 281 | |
| 282 | # Flags to enable the use of the Board library |
| 283 | # ( https://github.com/c-koi/libboard ) |
| 284 | BOARD_DEFINE = -Dcimg_use_board |
| 285 | BOARD_INCDIR = -I/usr/include/board |
| 286 | BOARD_CFLAGS = $(BOARD_DEFINE) $(BOARD_INCDIR) |
| 287 | BOARD_LIBS = -lboard |
| 288 | |
| 289 | # Flags to compile on Sun Solaris |
| 290 | SOLARIS_LIBS = -R$(X11PATH)/lib -lrt -lnsl -lsocket |
| 291 | |
| 292 | # Flags to compile GIMP plug-ins. |
| 293 | ifeq ($(MSYSTEM),MINGW32) |
| 294 | GIMP_CFLAGS = -mwindows |
| 295 | endif |
| 296 | |
| 297 | #------------------------- |
| 298 | # Define Makefile entries |
| 299 | #------------------------- |
| 300 | .cpp: |
| 301 | @echo |
| 302 | @echo "** Compiling '$* ($(SVERSION))' with '$(CXXVER)'" |
| 303 | @echo |
| 304 | $(CXX) -o $(EXE_PRE)$*$(EXE_EXT) $< $(CFLAGS) $(CONF_CFLAGS) $(LIBS) $(CONF_LIBS) |
| 305 | ifeq ($(STRIP_EXE),true) |
| 306 | strip $(EXE_PRE)$*$(EXE_EXT) |
| 307 | endif |
| 308 | menu: |
| 309 | @echo |
| 310 | @echo "CImg Library $(SVERSION) : Examples" |
| 311 | @echo "-----------------------------" |
| 312 | @echo " > linux : Linux/BSD target, X11 display, optimizations disabled." |
| 313 | @echo " > dlinux : Linux/BSD target, X11 display, debug mode." |
| 314 | @echo " > olinux : Linux/BSD target, X11 display, optimizations enabled." |
| 315 | @echo " > mlinux : Linus/BSD target, no display, minimal features, optimizations enabled." |
| 316 | @echo " > Mlinux : Linux/BSD target, X11 display, maximal features, optimizations enabled." |
| 317 | @echo |
| 318 | @echo " > solaris : Sun Solaris target, X11 display, optimizations disabled." |
| 319 | @echo " > dsolaris : Sun Solaris target, X11 display, debug mode." |
| 320 | @echo " > osolaris : Sun Solaris target, X11 display, optimizations enabled." |
| 321 | @echo " > msolaris : Sun Solaris target, no display, minimal features, optimizations enabled." |
| 322 | @echo " > Msolaris : Sun Solaris target, X11 display, maximal features, optimizations enabled." |
| 323 | @echo |
| 324 | @echo " > macosx : MacOSX target, X11 display, optimizations disabled." |
| 325 | @echo " > dmacosx : MacOSX target, X11 display, debug mode." |
| 326 | @echo " > omacosx : MacOSX target, X11 display, optimizations enabled." |
| 327 | @echo " > mmacosx : MacOSX target, no display, minimal features, optimizations enabled." |
| 328 | @echo " > Mmacosx : MacOSX target, X11 display, maximal features, optimizations enabled." |
| 329 | @echo |
| 330 | @echo " > windows : Windows target, GDI32 display, optimizations disabled." |
| 331 | @echo " > dwindows : Windows target, GDI32 display, debug mode." |
| 332 | @echo " > owindows : Windows target, GDI32 display, optimizations enabled." |
| 333 | @echo " > mwindows : Windows target, no display, minimal features, optimizations enabled." |
| 334 | @echo " > Mwindows : Windows target, GDI32 display, maximal features, optimizations enabled." |
| 335 | @echo |
| 336 | @echo " > clean : Clean generated files." |
| 337 | @echo |
| 338 | @echo "Choose your option :" |
| 339 | @read CHOICE; echo; $(MAKE) $$CHOICE; echo; echo "> Next time, you can bypass the menu by typing directly 'make $$CHOICE'"; echo; |
| 340 | |
| 341 | all: $(FILES) |
| 342 | |
| 343 | clean: |
| 344 | rm -rf *.exe *.o *.obj *~ \#* $(FILES) $(EXTRA_FILES) |
| 345 | ifneq ($(EXE_PRE),) |
| 346 | rm -f $(EXE_PRE)* |
| 347 | endif |
| 348 | |
| 349 | # Custom user-defined target |
| 350 | custom: |
| 351 | @$(MAKE) \ |
| 352 | "CONF_CFLAGS = \ |
| 353 | $(ANSI_CFLAGS) \ |
| 354 | $(VT100_CFLAGS) \ |
| 355 | $(TIFF_CFLAGS) \ |
| 356 | $(X11_CFLAGS) \ |
| 357 | $(LAPACK_CFLAGS) \ |
| 358 | $(XSHM_CFLAGS)" \ |
| 359 | "CONF_LIBS = \ |
| 360 | $(X11_LIBS) \ |
| 361 | $(TIFF_LIBS) \ |
| 362 | $(LAPACK_LIBS) \ |
| 363 | $(XSHM_LIBS)" \ |
| 364 | all $(EXTRA_FILES) |
| 365 | |
| 366 | # Linux/BSD/Mac OSX targets, with X11 display. |
| 367 | |
| 368 | #A target for Travis-CI |
| 369 | travis: |
| 370 | @$(MAKE) \ |
| 371 | "CONF_CFLAGS = \ |
| 372 | $(ANSI_CFLAGS) \ |
| 373 | $(VT100_CFLAGS) \ |
| 374 | $(X11_CFLAGS) \ |
| 375 | $(FFTW3_CFLAGS) \ |
| 376 | $(PNG_CFLAGS) \ |
| 377 | $(JPEG_CFLAGS) \ |
| 378 | $(ZLIB_CFLAGS) \ |
| 379 | $(CURL_CFLAGS) \ |
| 380 | $(XSHM_CFLAGS)" \ |
| 381 | "CONF_LIBS = \ |
| 382 | $(X11_LIBS) \ |
| 383 | $(FFTW3_LIBS) \ |
| 384 | $(PNG_LIBS) \ |
| 385 | $(JPEG_LIBS) \ |
| 386 | $(ZLIB_LIBS) \ |
| 387 | $(CURL_LIBS) \ |
| 388 | $(XSHM_LIBS)" \ |
| 389 | all |
| 390 | |
| 391 | linux: |
| 392 | @$(MAKE) \ |
| 393 | "CONF_CFLAGS = \ |
| 394 | $(ANSI_CFLAGS) \ |
| 395 | $(VT100_CFLAGS) \ |
| 396 | $(X11_CFLAGS) \ |
| 397 | $(XSHM_CFLAGS)" \ |
| 398 | "CONF_LIBS = \ |
| 399 | $(X11_LIBS) \ |
| 400 | $(XSHM_LIBS)" \ |
| 401 | all |
| 402 | |
| 403 | dlinux: |
| 404 | @$(MAKE) \ |
| 405 | "CONF_CFLAGS = \ |
| 406 | $(ANSI_CFLAGS) \ |
| 407 | $(DEBUG_CFLAGS) \ |
| 408 | $(VT100_CFLAGS) \ |
| 409 | $(X11_CFLAGS) \ |
| 410 | $(XSHM_CFLAGS)" \ |
| 411 | "CONF_LIBS = \ |
| 412 | $(X11_LIBS) \ |
| 413 | $(XSHM_LIBS)" \ |
| 414 | all |
| 415 | |
| 416 | olinux: |
| 417 | @$(MAKE) \ |
| 418 | "CONF_CFLAGS = \ |
| 419 | $(ANSI_CFLAGS) \ |
| 420 | $(OPT_CFLAGS) \ |
| 421 | $(OPENMP_CFLAGS) \ |
| 422 | $(VT100_CFLAGS) \ |
| 423 | $(X11_CFLAGS) \ |
| 424 | $(XSHM_CFLAGS)" \ |
| 425 | "CONF_LIBS = \ |
| 426 | $(X11_LIBS) \ |
| 427 | $(XSHM_LIBS)" \ |
| 428 | "STRIP_EXE=true" \ |
| 429 | all |
| 430 | |
| 431 | mlinux: |
| 432 | @$(MAKE) \ |
| 433 | "CONF_CFLAGS = \ |
| 434 | $(ANSI_CFLAGS) \ |
| 435 | $(NODISPLAY_CFLAGS) \ |
| 436 | $(OPT_CFLAGS)" \ |
| 437 | "STRIP_EXE=true" \ |
| 438 | all |
| 439 | |
| 440 | Mlinux: |
| 441 | @$(MAKE) \ |
| 442 | "CONF_CFLAGS = \ |
| 443 | $(OPT_CFLAGS) \ |
| 444 | $(VT100_CFLAGS) \ |
| 445 | $(X11_CFLAGS) \ |
| 446 | $(XSHM_CFLAGS) \ |
| 447 | $(XRANDR_CFLAGS) \ |
| 448 | $(TIFF_CFLAGS) \ |
| 449 | $(OPENEXR_CFLAGS) \ |
| 450 | $(PNG_CFLAGS) \ |
| 451 | $(JPEG_CFLAGS) \ |
| 452 | $(ZLIB_CFLAGS) \ |
| 453 | $(CURL_CFLAGS) \ |
| 454 | $(OPENCV_CFLAGS) \ |
| 455 | $(MAGICK_CFLAGS) \ |
| 456 | $(FFTW3_CFLAGS)" \ |
| 457 | "CONF_LIBS = \ |
| 458 | $(X11_LIBS) \ |
| 459 | $(XSHM_LIBS) \ |
| 460 | $(XRANDR_LIBS) \ |
| 461 | $(TIFF_LIBS) -ltiffxx \ |
| 462 | $(OPENEXR_LIBS) \ |
| 463 | $(PNG_LIBS) \ |
| 464 | $(JPEG_LIBS) \ |
| 465 | $(ZLIB_LIBS) \ |
| 466 | $(CURL_LIBS) \ |
| 467 | $(OPENCV_LIBS) \ |
| 468 | $(MAGICK_LIBS) \ |
| 469 | $(FFTW3_LIBS)" \ |
| 470 | "STRIP_EXE=true" \ |
| 471 | all $(EXTRA_FILES) |
| 472 | |
| 473 | # Sun Solaris targets, with X11 display. |
| 474 | solaris: |
| 475 | @$(MAKE) \ |
| 476 | "CONF_CFLAGS = \ |
| 477 | $(ANSI_CFLAGS) \ |
| 478 | $(VT100_CFLAGS) \ |
| 479 | $(X11_CFLAGS) \ |
| 480 | $(XSHM_CFLAGS)" \ |
| 481 | "CONF_LIBS = \ |
| 482 | $(SOLARIS_LIBS) \ |
| 483 | $(X11_LIBS) \ |
| 484 | $(XSHM_LIBS)" \ |
| 485 | all |
| 486 | |
| 487 | dsolaris: |
| 488 | @$(MAKE) \ |
| 489 | "CONF_CFLAGS = \ |
| 490 | $(ANSI_CFLAGS) \ |
| 491 | $(DEBUG_CFLAGS) \ |
| 492 | $(VT100_CFLAGS) \ |
| 493 | $(X11_CFLAGS) \ |
| 494 | $(XSHM_CFLAGS)" \ |
| 495 | "CONF_LIBS = \ |
| 496 | $(SOLARIS_LIBS) \ |
| 497 | $(X11_LIBS) \ |
| 498 | $(XSHM_LIBS)" \ |
| 499 | all |
| 500 | |
| 501 | osolaris: |
| 502 | @$(MAKE) \ |
| 503 | "CONF_CFLAGS = \ |
| 504 | $(ANSI_CFLAGS) \ |
| 505 | $(OPT_CFLAGS) \ |
| 506 | $(VT100_CFLAGS) \ |
| 507 | $(X11_CFLAGS) \ |
| 508 | $(XSHM_CFLAGS)" \ |
| 509 | "CONF_LIBS = \ |
| 510 | $(SOLARIS_LIBS) \ |
| 511 | $(X11_LIBS) \ |
| 512 | $(XSHM_LIBS)" \ |
| 513 | "STRIP_EXE=true" \ |
| 514 | all |
| 515 | |
| 516 | msolaris: |
| 517 | @$(MAKE) \ |
| 518 | "CONF_CFLAGS = \ |
| 519 | $(ANSI_CFLAGS) \ |
| 520 | $(NODISPLAY_CFLAGS) \ |
| 521 | $(OPT_CFLAGS)" \ |
| 522 | "STRIP_EXE=true" \ |
| 523 | all |
| 524 | |
| 525 | Msolaris: |
| 526 | @$(MAKE) \ |
| 527 | "CONF_CFLAGS = \ |
| 528 | $(OPT_CFLAGS) \ |
| 529 | $(VT100_CFLAGS) \ |
| 530 | $(X11_CFLAGS) \ |
| 531 | $(XSHM_CFLAGS) \ |
| 532 | $(XRANDR_CFLAGS) \ |
| 533 | $(TIFF_CFLAGS) \ |
| 534 | $(MINC2_CFLAGS) \ |
| 535 | $(OPENEXR_CFLAGS) \ |
| 536 | $(PNG_CFLAGS) \ |
| 537 | $(JPEG_CFLAGS) \ |
| 538 | $(ZLIB_CFLAGS) \ |
| 539 | $(OPENCV_CFLAGS) \ |
| 540 | $(MAGICK_CFLAGS) \ |
| 541 | $(FFTW3_CFLAGS)" \ |
| 542 | "CONF_LIBS = \ |
| 543 | $(SOLARIS_LIBS) \ |
| 544 | $(X11_LIBS) \ |
| 545 | $(XSHM_LIBS) \ |
| 546 | $(XRANDR_LIBS) \ |
| 547 | $(TIFF_LIBS) \ |
| 548 | $(MINC2_LIBS) \ |
| 549 | $(OPENEXR_LIBS) \ |
| 550 | $(PNG_LIBS) \ |
| 551 | $(JPEG_LIBS) \ |
| 552 | $(ZLIB_LIBS) \ |
| 553 | $(OPENCV_LIBS) \ |
| 554 | $(MAGICK_LIBS) \ |
| 555 | $(FFTW3_LIBS)" \ |
| 556 | "STRIP_EXE=true" \ |
| 557 | all $(EXTRA_FILES) |
| 558 | |
| 559 | # MacOsX targets, with X11 display. |
| 560 | macosx: |
| 561 | @$(MAKE) \ |
| 562 | "CONF_CFLAGS = \ |
| 563 | $(ANSI_CFLAGS) \ |
| 564 | $(VT100_CFLAGS) \ |
| 565 | $(X11_CFLAGS)" \ |
| 566 | "CONF_LIBS = \ |
| 567 | $(X11_LIBS)" \ |
| 568 | all |
| 569 | |
| 570 | dmacosx: |
| 571 | @$(MAKE) \ |
| 572 | "CONF_CFLAGS = \ |
| 573 | $(ANSI_CFLAGS) \ |
| 574 | $(DEBUG_CFLAGS) \ |
| 575 | $(VT100_CFLAGS) \ |
| 576 | $(X11_CFLAGS)" \ |
| 577 | "CONF_LIBS = \ |
| 578 | $(X11_LIBS)" \ |
| 579 | all |
| 580 | |
| 581 | omacosx: |
| 582 | @$(MAKE) \ |
| 583 | "CONF_CFLAGS = \ |
| 584 | $(ANSI_CFLAGS) \ |
| 585 | $(OPT_CFLAGS) \ |
| 586 | $(VT100_CFLAGS) \ |
| 587 | $(X11_CFLAGS)" \ |
| 588 | "CONF_LIBS = \ |
| 589 | $(X11_LIBS)" \ |
| 590 | all |
| 591 | |
| 592 | mmacosx: |
| 593 | @$(MAKE) \ |
| 594 | "CONF_CFLAGS = \ |
| 595 | $(ANSI_CFLAGS) \ |
| 596 | $(NODISPLAY_CFLAGS) \ |
| 597 | $(OPT_CFLAGS)" \ |
| 598 | all |
| 599 | |
| 600 | Mmacosx: |
| 601 | @$(MAKE) \ |
| 602 | "CONF_CFLAGS = \ |
| 603 | $(OPT_CFLAGS) \ |
| 604 | $(VT100_CFLAGS) \ |
| 605 | $(X11_CFLAGS) \ |
| 606 | $(TIFF_CFLAGS) \ |
| 607 | $(MINC2_CFLAGS) \ |
| 608 | $(OPENEXR_CFLAGS) \ |
| 609 | $(PNG_CFLAGS) \ |
| 610 | $(JPEG_CFLAGS) \ |
| 611 | $(ZLIB_CFLAGS) \ |
| 612 | $(OPENCV_CFLAGS) \ |
| 613 | $(MAGICK_CFLAGS) \ |
| 614 | $(FFTW3_CFLAGS)" \ |
| 615 | "CONF_LIBS = \ |
| 616 | $(X11_LIBS) \ |
| 617 | $(TIFF_LIBS) \ |
| 618 | $(MINC2_LIBS) \ |
| 619 | $(OPENEXR_LIBS) \ |
| 620 | $(PNG_LIBS) \ |
| 621 | $(JPEG_LIBS) \ |
| 622 | $(ZLIB_LIBS) \ |
| 623 | $(OPENCV_LIBS) \ |
| 624 | $(MAGICK_LIBS) \ |
| 625 | $(FFTW3_LIBS)" \ |
| 626 | all $(EXTRA_FILES) |
| 627 | |
| 628 | # Windows targets, with GDI32 display. |
| 629 | windows: |
| 630 | @$(MAKE) \ |
| 631 | "CONF_CFLAGS = " \ |
| 632 | "CONF_LIBS = \ |
| 633 | $(GDI32_LIBS)" \ |
| 634 | all |
| 635 | |
| 636 | dwindows: |
| 637 | @$(MAKE) \ |
| 638 | "CONF_CFLAGS = \ |
| 639 | $(DEBUG_CFLAGS)" \ |
| 640 | "CONF_LIBS = \ |
| 641 | $(GDI32_LIBS)" \ |
| 642 | all |
| 643 | |
| 644 | owindows: |
| 645 | @$(MAKE) \ |
| 646 | "CONF_CFLAGS = \ |
| 647 | $(OPT_CFLAGS)" \ |
| 648 | "CONF_LIBS = \ |
| 649 | $(GDI32_LIBS)" \ |
| 650 | "STRIP_EXE=true" \ |
| 651 | all |
| 652 | |
| 653 | mwindows: |
| 654 | @$(MAKE) \ |
| 655 | "CONF_CFLAGS = \ |
| 656 | $(NODISPLAY_CFLAGS) \ |
| 657 | $(OPT_CFLAGS)" \ |
| 658 | "STRIP_EXE=true" \ |
| 659 | all |
| 660 | |
| 661 | Mwindows: |
| 662 | @$(MAKE) \ |
| 663 | "CONF_CFLAGS = \ |
| 664 | $(OPT_CFLAGS) \ |
| 665 | $(TIFF_CFLAGS) \ |
| 666 | $(PNG_CFLAGS) \ |
| 667 | $(JPEG_CFLAGS) \ |
| 668 | $(ZLIB_CFLAGS) \ |
| 669 | $(OPENCV_CFLAGS) \ |
| 670 | $(FFTW3_CFLAGS)" \ |
| 671 | "CONF_LIBS = \ |
| 672 | $(GDI32_LIBS) \ |
| 673 | $(TIFF_LIBS) \ |
| 674 | $(PNG_LIBS) \ |
| 675 | $(JPEG_LIBS) \ |
| 676 | $(ZLIB_LIBS) \ |
| 677 | $(OPENCV_LIBS) \ |
| 678 | $(FFTW3_LIBS)" \ |
| 679 | "STRIP_EXE=true" \ |
| 680 | all $(EXTRA_FILES) |
| 681 | |
| 682 | # End of makefile |