Lines 103-109
Link Here
|
103 |
ifndef NO_SRIPDLIB |
103 |
ifndef NO_SRIPDLIB |
104 |
MANDATORY_CFLAGS += -std=c++11 |
104 |
MANDATORY_CFLAGS += -std=c++11 |
105 |
endif |
105 |
endif |
106 |
MANDATORY_LIBS += -L$(USR)/$(LIB) |
|
|
107 |
ifeq ($(notdir $(CXX)),g++) |
106 |
ifeq ($(notdir $(CXX)),g++) |
108 |
MANDATORY_CFLAGS += -Wall -W |
107 |
MANDATORY_CFLAGS += -Wall -W |
109 |
MANDATORY_LIBS += -lm |
108 |
MANDATORY_LIBS += -lm |
Lines 164-177
Link Here
|
164 |
X11_CFLAGS = -Dcimg_display=0 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
163 |
X11_CFLAGS = -Dcimg_display=0 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
165 |
X11_LIBS = -lpthread #`pkg-config --libs xrandr || echo -lXrandr` |
164 |
X11_LIBS = -lpthread #`pkg-config --libs xrandr || echo -lXrandr` |
166 |
else |
165 |
else |
167 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" `pkg-config --cflags x11 || echo -I/usr/X11R6/include` #-Dcimg_use_xrandr |
166 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
168 |
X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #`pkg-config --libs xrandr || echo -lXrandr` |
167 |
X11_LIBS = -lX11 -lpthread #-lXrandr |
169 |
endif |
168 |
endif |
170 |
endif |
169 |
endif |
171 |
# Flags to enable fast display, using XShm. |
170 |
# Flags to enable fast display, using XShm. |
172 |
# This requires the presence of the X11 extension include and library files. |
171 |
# This requires the presence of the X11 extension include and library files. |
173 |
XSHM_CFLAGS = -Dcimg_use_xshm `pkg-config --cflags xcb-shm` |
172 |
XSHM_CFLAGS = -Dcimg_use_xshm |
174 |
XSHM_LIBS = `pkg-config --libs xcb-shm || echo -L$(USR)/X11R6/lib -lXext` |
173 |
XSHM_LIBS = -lXext |
175 |
|
174 |
|
176 |
# Flags to enable image display, using GDI32. |
175 |
# Flags to enable image display, using GDI32. |
177 |
# This requires the presence of the GDI32 include and library files. |
176 |
# This requires the presence of the GDI32 include and library files. |
Lines 205-212
Link Here
|
205 |
|
204 |
|
206 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
205 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
207 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
206 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
208 |
MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include |
207 |
MINC2_CFLAGS = -Dcimg_use_minc2 |
209 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib |
208 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz |
210 |
|
209 |
|
211 |
# Flags to enable native support for downloading files from the network. |
210 |
# Flags to enable native support for downloading files from the network. |
212 |
# ( http://curl.haxx.se/libcurl/ ) |
211 |
# ( http://curl.haxx.se/libcurl/ ) |
Lines 340-346
Link Here
|
340 |
|
339 |
|
341 |
cli: |
340 |
cli: |
342 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
341 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
343 |
$(STRIP) gmic$(EXE) |
|
|
344 |
|
342 |
|
345 |
cli_s: |
343 |
cli_s: |
346 |
ifeq ($(OS),Darwin) |
344 |
ifeq ($(OS),Darwin) |
Lines 356-366
Link Here
|
356 |
|
354 |
|
357 |
gmicol: |
355 |
gmicol: |
358 |
$(MAKE) "CFLAGS+=$(STD_GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GMICOL_LIBS)" gmic |
356 |
$(MAKE) "CFLAGS+=$(STD_GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GMICOL_LIBS)" gmic |
359 |
$(STRIP) gmic$(EXE) |
|
|
360 |
|
357 |
|
361 |
static: |
358 |
static: |
362 |
$(MAKE) "CFLAGS+=$(STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STATIC_CLI_LIBS)" gmic |
359 |
$(MAKE) "CFLAGS+=$(STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STATIC_CLI_LIBS)" gmic |
363 |
$(STRIP) gmic$(EXE) |
|
|
364 |
|
360 |
|
365 |
debug: |
361 |
debug: |
366 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
362 |
$(MAKE) "CFLAGS+=$(STD_CLI_CFLAGS) $(DEBUG_CFLAGS)" "LIBS+=$(STD_CLI_LIBS)" gmic |
Lines 376-388
Link Here
|
376 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
372 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
377 |
$(CXX) -o libgmic.o -c gmic.cpp -fPIC $(CFLAGS) |
373 |
$(CXX) -o libgmic.o -c gmic.cpp -fPIC $(CFLAGS) |
378 |
|
374 |
|
379 |
libgmic: libgmic.o gmic_use_lib.cpp |
375 |
libgmic: libgmic.o |
380 |
ar rcs libgmic.a libgmic.o |
376 |
$(AR) rcs libgmic.a libgmic.o |
381 |
ifeq ($(OS),Darwin) |
377 |
ifeq ($(OS),Darwin) |
382 |
$(CXX) -shared -o libgmic.so libgmic.o $(LIBS) |
378 |
$(CXX) $(LDFLAGS) -shared -o libgmic.so libgmic.o $(LIBS) |
383 |
else |
379 |
else |
384 |
$(CXX) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS) |
380 |
$(CXX) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS) |
385 |
$(CXX) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic |
|
|
386 |
endif |
381 |
endif |
387 |
|
382 |
|
388 |
gmic_gimp.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
383 |
gmic_gimp.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
Lines 396-407
Link Here
|
396 |
$(CXX) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(subst /opt/local,/tmp/skl/Gimp.app/Contents/Resources,$(shell gimptool-2.0$(EXE) --libs) $(LIBS)) |
391 |
$(CXX) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(subst /opt/local,/tmp/skl/Gimp.app/Contents/Resources,$(shell gimptool-2.0$(EXE) --libs) $(LIBS)) |
397 |
endif |
392 |
endif |
398 |
else |
393 |
else |
399 |
$(CXX) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) |
394 |
$(CXX) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(LDFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) |
400 |
endif |
395 |
endif |
401 |
$(STRIP) gmic_gimp$(EXE) |
|
|
402 |
|
396 |
|
403 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
397 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
404 |
$(CXX) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LIBS) |
398 |
$(CXX) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LDFLAGS) $(LIBS) |
405 |
|
399 |
|
406 |
gmic_stdlib.h: |
400 |
gmic_stdlib.h: |
407 |
@echo -n "> Retrieve G'MIC Standard Library..." |
401 |
@echo -n "> Retrieve G'MIC Standard Library..." |
Lines 474-493
Link Here
|
474 |
# Generate bash completion script (requires 'gmic' to be installed first). |
468 |
# Generate bash completion script (requires 'gmic' to be installed first). |
475 |
bashcompletion: |
469 |
bashcompletion: |
476 |
@mkdir -p ../resources |
470 |
@mkdir -p ../resources |
477 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
471 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
478 |
|
472 |
|
479 |
# Generate man page (requires 'gmic' to be installed first). |
473 |
# Generate man page (requires 'gmic' to be installed first). |
480 |
man: |
474 |
man: |
481 |
@mkdir -p ../man |
475 |
@mkdir -p ../man |
482 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
476 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
483 |
@gzip -f ../man/gmic.1 |
|
|
484 |
|
477 |
|
485 |
# Install/uninstall/clean procedures. |
478 |
# Install/uninstall/clean procedures. |
486 |
install: |
479 |
install-gimp: |
487 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
480 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
488 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
481 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
|
|
482 |
|
483 |
install-bin: |
489 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
484 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
490 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
485 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
|
|
486 |
|
487 |
install-lib: |
491 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
488 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
492 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
489 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
493 |
|
490 |
|
Lines 497-511
Link Here
|
497 |
cp -f libgmic.so $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.9 |
494 |
cp -f libgmic.so $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.6.9 |
498 |
ln -fs libgmic.so.1.6.9 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
495 |
ln -fs libgmic.so.1.6.9 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
499 |
ln -fs libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
496 |
ln -fs libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
500 |
cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/ |
|
|
501 |
endif |
497 |
endif |
|
|
498 |
|
499 |
install-zart: |
500 |
cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/ |
501 |
|
502 |
install-man: |
502 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
503 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
503 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
504 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
504 |
mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ |
505 |
cp -f ../man/gmic.1 $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
505 |
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
506 |
|
506 |
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
507 |
install-bash: |
507 |
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 |
508 |
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 |
508 |
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 |
|
|
509 |
|
509 |
|
510 |
uninstall: |
510 |
uninstall: |
511 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
511 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
Lines 515-522
Link Here
|
515 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
515 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
516 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
516 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
517 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
517 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
518 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
518 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
519 |
rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
|
|
520 |
|
519 |
|
521 |
distclean: clean |
520 |
distclean: clean |
522 |
|
521 |
|