Lines 146-158
Link Here
|
146 |
# Flags to enable image display, using X11 |
146 |
# Flags to enable image display, using X11 |
147 |
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). |
147 |
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). |
148 |
# This requires the presence of the X11 include and library files. |
148 |
# This requires the presence of the X11 include and library files. |
149 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr |
149 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
150 |
X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr |
150 |
X11_LIBS = -lX11 -lpthread #-lXrandr |
151 |
|
151 |
|
152 |
# Flags to enable fast display, using XShm. |
152 |
# Flags to enable fast display, using XShm. |
153 |
# This requires the presence of the X11 extension include and library files. |
153 |
# This requires the presence of the X11 extension include and library files. |
154 |
XSHM_CFLAGS = -Dcimg_use_xshm |
154 |
XSHM_CFLAGS = -Dcimg_use_xshm |
155 |
XSHM_LIBS = -L$(USR)/X11R6/lib -lXext |
155 |
XSHM_LIBS = -lXext |
156 |
|
156 |
|
157 |
# Flags to enable image display, using GDI32. |
157 |
# Flags to enable image display, using GDI32. |
158 |
# This requires the presence of the GDI32 include and library files. |
158 |
# This requires the presence of the GDI32 include and library files. |
Lines 176-183
Link Here
|
176 |
|
176 |
|
177 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
177 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
178 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
178 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
179 |
MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include |
179 |
MINC2_CFLAGS = -Dcimg_use_minc2 |
180 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib |
180 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz |
181 |
|
181 |
|
182 |
# Flags to enable native support for downloading files from the network. |
182 |
# Flags to enable native support for downloading files from the network. |
183 |
# ( http://curl.haxx.se/libcurl/ ) |
183 |
# ( http://curl.haxx.se/libcurl/ ) |
Lines 191-201
Link Here
|
191 |
|
191 |
|
192 |
# Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library. |
192 |
# Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library. |
193 |
# This requires the presence of the GraphicsMagick++ include and library files. |
193 |
# This requires the presence of the GraphicsMagick++ include and library files. |
194 |
MAGICK_CFLAGS = -Dcimg_use_magick -I$(USR)/$(INCLUDE)/GraphicsMagick |
194 |
MAGICK_CFLAGS = |
195 |
ifeq ($(OS),Darwin) |
195 |
ifeq ($(OS),Darwin) |
196 |
MAGICK_LIBS = -L$(USR)/$(LIB) -lGraphicsMagick++ -lGraphicsMagick -llcms -ltiff -lfreetype -ljpeg -lpng -lbz2 -lxml2 -lz -lm -lltdl |
196 |
MAGICK_LIBS = |
197 |
else |
197 |
else |
198 |
MAGICK_LIBS = -lGraphicsMagick++ |
198 |
MAGICK_LIBS = |
199 |
endif |
199 |
endif |
200 |
|
200 |
|
201 |
# Flags to enable native support of EXR file format, using the OpenEXR library/ |
201 |
# Flags to enable native support of EXR file format, using the OpenEXR library/ |
Lines 316-322
Link Here
|
316 |
|
316 |
|
317 |
cli: |
317 |
cli: |
318 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
318 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
319 |
$(STRIP) gmic$(EXE) |
|
|
320 |
|
319 |
|
321 |
gimp: |
320 |
gimp: |
322 |
$(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS)" gmic_gimp |
321 |
$(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS)" gmic_gimp |
Lines 326-336
Link Here
|
326 |
|
325 |
|
327 |
gmicol: |
326 |
gmicol: |
328 |
$(MAKE) "CFLAGS+=$(STD_GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GMICOL_LIBS)" gmic |
327 |
$(MAKE) "CFLAGS+=$(STD_GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GMICOL_LIBS)" gmic |
329 |
$(STRIP) gmic$(EXE) |
|
|
330 |
|
328 |
|
331 |
static: |
329 |
static: |
332 |
$(MAKE) "CFLAGS+=$(STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STATIC_CLI_LIBS)" gmic |
330 |
$(MAKE) "CFLAGS+=$(STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STATIC_CLI_LIBS)" gmic |
333 |
$(STRIP) gmic$(EXE) |
|
|
334 |
|
331 |
|
335 |
debug: |
332 |
debug: |
336 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
333 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
Lines 346-366
Link Here
|
346 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
343 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
347 |
$(CC) -o libgmic.o -c gmic.cpp -fPIC $(CFLAGS) |
344 |
$(CC) -o libgmic.o -c gmic.cpp -fPIC $(CFLAGS) |
348 |
|
345 |
|
349 |
libgmic: libgmic.o gmic_use_lib.cpp |
346 |
libgmic: libgmic.o |
350 |
ar rcs libgmic.a libgmic.o |
347 |
$(AR) rcs libgmic.a libgmic.o |
351 |
ifeq ($(OS),Darwin) |
348 |
ifeq ($(OS),Darwin) |
352 |
$(CC) -shared -o libgmic.so libgmic.o $(LIBS) |
349 |
$(CC) $(LDFLAGS) -shared -o libgmic.so libgmic.o $(LIBS) |
353 |
else |
350 |
else |
354 |
$(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS) |
351 |
$(CC) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS) |
355 |
$(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic |
|
|
356 |
endif |
352 |
endif |
357 |
|
353 |
|
358 |
gmic_gimp.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
354 |
gmic_gimp.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
359 |
$(CC) -o gmic_gimp.o -c gmic.cpp -Dgmic_gimp $(CFLAGS) |
355 |
$(CC) -o gmic_gimp.o -c gmic.cpp -Dgmic_gimp $(CFLAGS) |
360 |
|
356 |
|
361 |
gmic_gimp: gmic_gimp.o gmic_gimp.cpp |
357 |
gmic_gimp: gmic_gimp.o gmic_gimp.cpp |
362 |
$(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) |
358 |
$(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(LDFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) |
363 |
$(STRIP) gmic_gimp$(EXE) |
|
|
364 |
|
359 |
|
365 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
360 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
366 |
$(CC) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LIBS) |
361 |
$(CC) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LIBS) |
Lines 436-455
Link Here
|
436 |
# Generate bash completion script (requires 'gmic' to be installed first). |
431 |
# Generate bash completion script (requires 'gmic' to be installed first). |
437 |
bashcompletion: |
432 |
bashcompletion: |
438 |
@mkdir -p ../resources |
433 |
@mkdir -p ../resources |
439 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
434 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
440 |
|
435 |
|
441 |
# Generate man page (requires 'gmic' to be installed first). |
436 |
# Generate man page (requires 'gmic' to be installed first). |
442 |
man: |
437 |
man: |
443 |
@mkdir -p ../man |
438 |
@mkdir -p ../man |
444 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
439 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
445 |
@gzip -f ../man/gmic.1 |
|
|
446 |
|
440 |
|
447 |
# Install/uninstall/clean procedures. |
441 |
# Install/uninstall/clean procedures. |
448 |
install: |
442 |
install-gimp: |
449 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
443 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
450 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
444 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
|
|
445 |
|
446 |
install-bin: |
451 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
447 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
452 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
448 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
|
|
449 |
|
450 |
install-lib: |
453 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
451 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
454 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
452 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
455 |
|
453 |
|
Lines 459-473
Link Here
|
459 |
cp -f libgmic.so $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.6 |
457 |
cp -f libgmic.so $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.6 |
460 |
ln -fs libgmic.so.1.6.6 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
458 |
ln -fs libgmic.so.1.6.6 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
461 |
ln -fs libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
459 |
ln -fs libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
462 |
cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/ |
|
|
463 |
endif |
460 |
endif |
|
|
461 |
|
462 |
install-zart: |
463 |
cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/ |
464 |
|
465 |
install-man: |
464 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
466 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
465 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
467 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
466 |
mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ |
468 |
cp -f ../man/gmic.1 $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
467 |
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
469 |
|
468 |
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
470 |
install-bash: |
469 |
if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi |
471 |
if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi |
470 |
if [ -d /opt/local/etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi |
|
|
471 |
|
472 |
|
472 |
uninstall: |
473 |
uninstall: |
473 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
474 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
Lines 477-484
Link Here
|
477 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
478 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
478 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
479 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
479 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
480 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
480 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
481 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
481 |
rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
|
|
482 |
|
482 |
|
483 |
distclean: clean |
483 |
distclean: clean |
484 |
|
484 |
|