Line
Link Here
|
0 |
-- gmic-1.6.6.1/src/Makefile |
0 |
++ gmic-1.6.6.1/src/Makefile |
Lines 93-99
Link Here
|
93 |
ifndef NO_SRIPDLIB |
93 |
ifndef NO_SRIPDLIB |
94 |
MANDATORY_CFLAGS += -std=c++11 |
94 |
MANDATORY_CFLAGS += -std=c++11 |
95 |
endif |
95 |
endif |
96 |
MANDATORY_LIBS += -L$(USR)/$(LIB) |
|
|
97 |
ifeq ($(notdir $(CC)),g++) |
96 |
ifeq ($(notdir $(CC)),g++) |
98 |
MANDATORY_CFLAGS += -Wall -W |
97 |
MANDATORY_CFLAGS += -Wall -W |
99 |
MANDATORY_LIBS += -lm |
98 |
MANDATORY_LIBS += -lm |
Lines 146-158
Link Here
|
146 |
# Flags to enable image display, using X11 |
145 |
# Flags to enable image display, using X11 |
147 |
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). |
146 |
# (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. |
147 |
# 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 |
148 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
150 |
X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr |
149 |
X11_LIBS = -lX11 -lpthread #-lXrandr |
151 |
|
150 |
|
152 |
# Flags to enable fast display, using XShm. |
151 |
# Flags to enable fast display, using XShm. |
153 |
# This requires the presence of the X11 extension include and library files. |
152 |
# This requires the presence of the X11 extension include and library files. |
154 |
XSHM_CFLAGS = -Dcimg_use_xshm |
153 |
XSHM_CFLAGS = -Dcimg_use_xshm |
155 |
XSHM_LIBS = -L$(USR)/X11R6/lib -lXext |
154 |
XSHM_LIBS = -lXext |
156 |
|
155 |
|
157 |
# Flags to enable image display, using GDI32. |
156 |
# Flags to enable image display, using GDI32. |
158 |
# This requires the presence of the GDI32 include and library files. |
157 |
# This requires the presence of the GDI32 include and library files. |
Lines 176-183
Link Here
|
176 |
|
175 |
|
177 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
176 |
# 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 ) |
177 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
179 |
MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include |
178 |
MINC2_CFLAGS = -Dcimg_use_minc2 |
180 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib |
179 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz |
181 |
|
180 |
|
182 |
# Flags to enable native support for downloading files from the network. |
181 |
# Flags to enable native support for downloading files from the network. |
183 |
# ( http://curl.haxx.se/libcurl/ ) |
182 |
# ( http://curl.haxx.se/libcurl/ ) |
Lines 316-322
Link Here
|
316 |
|
315 |
|
317 |
cli: |
316 |
cli: |
318 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
317 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
319 |
$(STRIP) gmic$(EXE) |
|
|
320 |
|
318 |
|
321 |
gimp: |
319 |
gimp: |
322 |
$(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS)" gmic_gimp |
320 |
$(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS)" gmic_gimp |
Lines 326-336
Link Here
|
326 |
|
324 |
|
327 |
gmicol: |
325 |
gmicol: |
328 |
$(MAKE) "CFLAGS+=$(STD_GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GMICOL_LIBS)" gmic |
326 |
$(MAKE) "CFLAGS+=$(STD_GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GMICOL_LIBS)" gmic |
329 |
$(STRIP) gmic$(EXE) |
|
|
330 |
|
327 |
|
331 |
static: |
328 |
static: |
332 |
$(MAKE) "CFLAGS+=$(STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STATIC_CLI_LIBS)" gmic |
329 |
$(MAKE) "CFLAGS+=$(STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STATIC_CLI_LIBS)" gmic |
333 |
$(STRIP) gmic$(EXE) |
|
|
334 |
|
330 |
|
335 |
debug: |
331 |
debug: |
336 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
332 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
Lines 346-369
Link Here
|
346 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
342 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
347 |
$(CC) -o libgmic.o -c gmic.cpp -fPIC $(CFLAGS) |
343 |
$(CC) -o libgmic.o -c gmic.cpp -fPIC $(CFLAGS) |
348 |
|
344 |
|
349 |
libgmic: libgmic.o gmic_use_lib.cpp |
345 |
libgmic: libgmic.o |
350 |
ar rcs libgmic.a libgmic.o |
346 |
$(AR) rcs libgmic.a libgmic.o |
351 |
ifeq ($(OS),Darwin) |
347 |
ifeq ($(OS),Darwin) |
352 |
$(CC) -shared -o libgmic.so libgmic.o $(LIBS) |
348 |
$(CC) $(LDFLAGS) -shared -o libgmic.so libgmic.o $(LIBS) |
353 |
else |
349 |
else |
354 |
$(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS) |
350 |
$(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 |
351 |
endif |
357 |
|
352 |
|
358 |
gmic_gimp.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
353 |
gmic_gimp.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
359 |
$(CC) -o gmic_gimp.o -c gmic.cpp -Dgmic_gimp $(CFLAGS) |
354 |
$(CC) -o gmic_gimp.o -c gmic.cpp -Dgmic_gimp $(CFLAGS) |
360 |
|
355 |
|
361 |
gmic_gimp: gmic_gimp.o gmic_gimp.cpp |
356 |
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) |
357 |
$(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 |
|
358 |
|
365 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
359 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
366 |
$(CC) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LIBS) |
360 |
$(CC) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LDFLAGS) $(LIBS) |
367 |
|
361 |
|
368 |
gmic_stdlib.h: |
362 |
gmic_stdlib.h: |
369 |
@echo "> Retrieve G'MIC Standard Library...\r" |
363 |
@echo "> Retrieve G'MIC Standard Library...\r" |
Lines 436-473
Link Here
|
436 |
# Generate bash completion script (requires 'gmic' to be installed first). |
430 |
# Generate bash completion script (requires 'gmic' to be installed first). |
437 |
bashcompletion: |
431 |
bashcompletion: |
438 |
@mkdir -p ../resources |
432 |
@mkdir -p ../resources |
439 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
433 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
440 |
|
434 |
|
441 |
# Generate man page (requires 'gmic' to be installed first). |
435 |
# Generate man page (requires 'gmic' to be installed first). |
442 |
man: |
436 |
man: |
443 |
@mkdir -p ../man |
437 |
@mkdir -p ../man |
444 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
438 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
445 |
@gzip -f ../man/gmic.1 |
|
|
446 |
|
439 |
|
447 |
# Install/uninstall/clean procedures. |
440 |
# Install/uninstall/clean procedures. |
448 |
install: |
441 |
install-gimp: |
449 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
442 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
450 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
443 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
|
|
444 |
|
445 |
install-bin: |
451 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
446 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
452 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
447 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
|
|
448 |
|
449 |
install-lib: |
453 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
450 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
454 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
451 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
455 |
|
|
|
456 |
ifneq ($(OS),Darwin) |
452 |
ifneq ($(OS),Darwin) |
457 |
mkdir -p $(DESTDIR)$(USR)/share |
453 |
mkdir -p $(DESTDIR)$(USR)/share |
458 |
mkdir -p $(DESTDIR)$(USR)/$(LIB) |
454 |
mkdir -p $(DESTDIR)$(USR)/$(LIB) |
459 |
cp -f libgmic.so $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.6 |
455 |
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 |
456 |
ln -fs libgmic.so.1.6.6 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
461 |
ln -fs libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
457 |
ln -fs libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
462 |
cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/ |
|
|
463 |
endif |
458 |
endif |
|
|
459 |
|
460 |
install-zart: |
461 |
cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/ |
462 |
|
463 |
install-man: |
464 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
464 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
465 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
465 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
466 |
mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ |
466 |
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 |
467 |
|
468 |
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
468 |
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 |
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 |
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 |
|
470 |
|
472 |
uninstall: |
471 |
uninstall: |
473 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
472 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
Lines 477-484
Link Here
|
477 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
476 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
478 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
477 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
479 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
478 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
480 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
479 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
481 |
rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
|
|
482 |
|
480 |
|
483 |
distclean: clean |
481 |
distclean: clean |
484 |
|
482 |
|