=== Modified Makefile for Profiling ===
<bigpre>
CIMG_FILES = CImg_demo
# Files which requires external libraries to run.
endif
# Flags to enable code debugging.
endif
menu:
@echo
@echo "CImg Library $(CIMG_VERSION) : Examples"
@echo "-----------------------------"
@echo " > linux : Linux/BSD target, X11 display, optimizations disabled."
@echo " > dlinux : Linux/BSD target, X11 display, debug mode."
@echo " > olinux : Linux/BSD target, X11 display, optimizations enabled."
@echo " > mlinux : Linus/BSD target, no display, minimal features, optimizations enabled."
@echo " > Mlinux : Linux/BSD target, X11 display, maximal features, optimizations enabled."
@echo
@echo " > solaris : Sun Solaris target, X11 display, optimizations disabled."
@echo " > dsolaris : Sun Solaris target, X11 display, debug mode."
@echo " > osolaris : Sun Solaris target, X11 display, optimizations enabled."
@echo " > msolaris : Sun Solaris target, no display, minimal features, optimizations enabled."
@echo " > Msolaris : Sun Solaris target, X11 display, maximal features, optimizations enabled."
@echo
@echo " > macosx : MacOSX target, X11 display, optimizations disabled."
@echo " > dmacosx : MacOSX target, X11 display, debug mode."
@echo " > omacosx : MacOSX target, X11 display, optimizations enabled."
@echo " > mmacosx : MacOSX target, no display, minimal features, optimizations enabled."
@echo " > Mmacosx : MacOSX target, X11 display, maximal features, optimizations enabled."
@echo
@echo " > windows : Windows target, GDI32 display, optimizations disabled."
@echo " > dwindows : Windows target, GDI32 display, debug mode."
@echo " > owindows : Windows target, GDI32 display, optimizations enabled."
@echo " > mwindows : Windows target, no display, minimal features, optimizations enabled."
@echo " > Mwindows : Windows target, GDI32 display, maximal features, optimizations enabled."
@echo
@echo " > clean : Clean generated files."
@echo
@echo "Choose your option :"
@read CHOICE; echo; $(MAKE) $$CHOICE; echo; echo "> Next time, you can bypass the menu by typing directly 'make $$CHOICE'"; echo;
all: $(CIMG_FILES)
clean:
endif
# Specific targets for the 'gmic_gimp' plug-in for GIMP.
gmic_gimp.o: gmic.cpp gmic_def.h
$(CC) -o gmic_gimp.o -c gmic.cpp -Dcimg_build -Dgmic_gimp -Dgmic_float_only $(CIMG_OPT_CFLAGS) $(CIMG_FFTW3_CFLAGS) $(CIMG_PNG_CFLAGS)
gmic_gimp: gmic_gimp.o gmic_gimp.cpp
$(CC) -o $(EXEPFX)gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dcimg_build `gimptool-2.0 --cflags` `gimptool-2.0 --libs` $(CIMG_GIMP_CFLAGS) $(CIMG_OPT_FLAGS) $(CIMG_FFTW3_LDFLAGS) $(CIMG_PNG_LDFLAGS) -lpthread
# Specific targets for 'gmic'.
gmic_def: gmic_def.gmic
cd ../../gmic/src && $(MAKE) def
gmic_bool.o: gmic.cpp
@echo
@echo "** Compiling 'gmic ($(CIMG_VERSION))' with '$(CCVER)'"
@echo
$(CC) -o gmic_bool.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_bool $(CFLAGS) $(CONF_CFLAGS)
gmic_uchar.o: gmic.cpp
$(CC) -o gmic_uchar.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_uchar $(CFLAGS) $(CONF_CFLAGS)
gmic_char.o: gmic.cpp
$(CC) -o gmic_char.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_char $(CFLAGS) $(CONF_CFLAGS)
gmic_ushort.o: gmic.cpp
$(CC) -o gmic_ushort.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_ushort $(CFLAGS) $(CONF_CFLAGS)
gmic_short.o: gmic.cpp
$(CC) -o gmic_short.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_short $(CFLAGS) $(CONF_CFLAGS)
gmic_uint.o: gmic.cpp
$(CC) -o gmic_uint.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_uint $(CFLAGS) $(CONF_CFLAGS)
gmic_int.o: gmic.cpp
$(CC) -o gmic_int.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_int $(CFLAGS) $(CONF_CFLAGS)
gmic_float.o: gmic.cpp
$(CC) -o gmic_float.o -c gmic.cpp -Dgmic_main -Dcimg_build -Dgmic_split_compilation -Dgmic_float $(CFLAGS) $(CONF_CFLAGS)
gmic_double.o: gmic.cpp
$(CC) -o gmic_double.o -c gmic.cpp -Dcimg_build -Dgmic_split_compilation -Dgmic_double $(CFLAGS) $(CONF_CFLAGS)
gmic: gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o gmic_def.h
$(CC) -o $(EXEPFX)gmic -Dcimg_build -Dgmic_split_compilation \
gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o \
gmic_uint.o gmic_int.o gmic_float.o gmic_double.o $(CFLAGS) $(CONF_CFLAGS) $(CONF_LDFLAGS) $(LDFLAGS)
gmic_minimal:
$(CC) -o $(EXEPFX)gmic gmic.cpp -Dgmic_main -Dgmic_float_only -Dcimg_build -Dcimg_use_fftw3 -Dcimg_use_png -Dcimg_display=1 -I/usr/X11R6/include -g -W -Wall -ansi -pedantic -L/usr/X11R6/lib -lX11 -lpthread -lfftw3 -lpng -lz
ifeq ($(STRIP_EXE),true)
strip $(EXEPFX)gmic
endif
# Linux/BSD/Mac OSX targets, with X11 display.