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