Lines 127-133
MANDATORY_LIBS = `pkg-config --libs zlib || echo -lz`
Link Here
|
127 |
ifndef NO_SRIPDLIB |
127 |
ifndef NO_SRIPDLIB |
128 |
MANDATORY_CFLAGS += -std=c++11 |
128 |
MANDATORY_CFLAGS += -std=c++11 |
129 |
endif |
129 |
endif |
130 |
MANDATORY_LIBS += -L$(USR)/$(LIB) |
|
|
131 |
ifeq ($(notdir $(CXX)),g++) |
130 |
ifeq ($(notdir $(CXX)),g++) |
132 |
MANDATORY_CFLAGS += -Wall -Wextra |
131 |
MANDATORY_CFLAGS += -Wall -Wextra |
133 |
MANDATORY_LIBS += -lm |
132 |
MANDATORY_LIBS += -lm |
Lines 188-201
ifeq (,$(wildcard /usr/X11R6))
Link Here
|
188 |
X11_CFLAGS = -Dcimg_display=0 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
187 |
X11_CFLAGS = -Dcimg_display=0 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
189 |
X11_LIBS = -lpthread #`pkg-config --libs xrandr || echo -lXrandr` |
188 |
X11_LIBS = -lpthread #`pkg-config --libs xrandr || echo -lXrandr` |
190 |
else |
189 |
else |
191 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" `pkg-config --cflags x11 || echo -I/usr/X11R6/include` #-Dcimg_use_xrandr |
190 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #`pkg-config --cflags x11 || echo -I/usr/X11R6/include` #-Dcimg_use_xrandr |
192 |
X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #`pkg-config --libs xrandr || echo -lXrandr` |
191 |
X11_LIBS = -lX11 -lpthread #`pkg-config --libs xrandr || echo -lXrandr` |
193 |
endif |
192 |
endif |
194 |
endif |
193 |
endif |
195 |
# Flags to enable fast display, using XShm. |
194 |
# Flags to enable fast display, using XShm. |
196 |
# This requires the presence of the X11 extension include and library files. |
195 |
# This requires the presence of the X11 extension include and library files. |
197 |
XSHM_CFLAGS = -Dcimg_use_xshm `pkg-config --cflags xcb-shm` |
196 |
XSHM_CFLAGS = -Dcimg_use_xshm #`pkg-config --cflags xcb-shm` |
198 |
XSHM_LIBS = `pkg-config --libs xcb-shm || echo -L$(USR)/X11R6/lib -lXext` |
197 |
XSHM_LIBS = -lXext |
199 |
|
198 |
|
200 |
# Flags to enable image display, using GDI32. |
199 |
# Flags to enable image display, using GDI32. |
201 |
# This requires the presence of the GDI32 include and library files (Windows only). |
200 |
# This requires the presence of the GDI32 include and library files (Windows only). |
Lines 229-236
TIFF_LIBS = `pkg-config --libs libtiff-4 || echo -ltiff`
Link Here
|
229 |
|
228 |
|
230 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
229 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
231 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
230 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
232 |
MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include |
231 |
MINC2_CFLAGS = -Dcimg_use_minc2 |
233 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib |
232 |
MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz |
234 |
|
233 |
|
235 |
# Flags to enable native support for downloading files from the network. |
234 |
# Flags to enable native support for downloading files from the network. |
236 |
# ( http://curl.haxx.se/libcurl/ ) |
235 |
# ( http://curl.haxx.se/libcurl/ ) |
Lines 402-408
endif
Link Here
|
402 |
|
401 |
|
403 |
cli: |
402 |
cli: |
404 |
$(MAKE) "CFLAGS+=$(GMIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" gmic |
403 |
$(MAKE) "CFLAGS+=$(GMIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_CLI_LIBS)" gmic |
405 |
$(STRIP) gmic$(EXE) |
|
|
406 |
|
404 |
|
407 |
cli_s: |
405 |
cli_s: |
408 |
ifeq ($(OS),Darwin) |
406 |
ifeq ($(OS),Darwin) |
Lines 418-424
gimp:
Link Here
|
418 |
|
416 |
|
419 |
gmicol: |
417 |
gmicol: |
420 |
$(MAKE) "CFLAGS+=$(GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMICOL_LIBS)" gmic |
418 |
$(MAKE) "CFLAGS+=$(GMICOL_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMICOL_LIBS)" gmic |
421 |
$(STRIP) gmic$(EXE) |
|
|
422 |
|
419 |
|
423 |
lib: |
420 |
lib: |
424 |
$(MAKE) "CFLAGS+=$(GMIC_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_LIB_LIBS)" libgmic |
421 |
$(MAKE) "CFLAGS+=$(GMIC_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_LIB_LIBS)" libgmic |
Lines 432-438
native:
Link Here
|
432 |
|
429 |
|
433 |
static: |
430 |
static: |
434 |
$(MAKE) "CFLAGS+=$(GMIC_STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_STATIC_CLI_LIBS)" gmic |
431 |
$(MAKE) "CFLAGS+=$(GMIC_STATIC_CLI_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_STATIC_CLI_LIBS)" gmic |
435 |
$(STRIP) gmic$(EXE) |
|
|
436 |
|
432 |
|
437 |
staticlibc: |
433 |
staticlibc: |
438 |
$(MAKE) "CFLAGS+=$(GMIC_STATIC_LIBC_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_STATIC_LIBC_LIBS)" libcgmicstatic |
434 |
$(MAKE) "CFLAGS+=$(GMIC_STATIC_LIBC_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(GMIC_STATIC_LIBC_LIBS)" libcgmicstatic |
Lines 448-460
endif
Link Here
|
448 |
|
444 |
|
449 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
445 |
libgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
450 |
$(CXX) -o libgmic.o -c gmic.cpp $(PIC) $(CFLAGS) |
446 |
$(CXX) -o libgmic.o -c gmic.cpp $(PIC) $(CFLAGS) |
451 |
libgmic: libgmic.o use_libgmic.cpp |
447 |
libgmic: libgmic.o #use_libgmic.cpp |
452 |
ar rcs libgmic.a libgmic.o |
448 |
$(AR) rcs libgmic.a libgmic.o |
453 |
ifeq ($(OS),Darwin) |
449 |
ifeq ($(OS),Darwin) |
454 |
$(CXX) -shared -o libgmic.so libgmic.o $(LIBS) |
450 |
$(CXX) -shared -o libgmic.so libgmic.o $(LIBS) |
455 |
else |
451 |
else |
456 |
$(CXX) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS) |
452 |
$(CXX) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so libgmic.o $(LIBS) |
457 |
$(CXX) -o use_libgmic use_libgmic.cpp -L. -lgmic $(LIBS) |
|
|
458 |
endif |
453 |
endif |
459 |
|
454 |
|
460 |
libcgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
455 |
libcgmic.o: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
Lines 498-509
else
Link Here
|
498 |
$(CXX) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(subst -L/opt/local,-L/tmp/skl/Gimp.app/Contents/Resources,$(shell gimptool-2.0$(EXE) --libs) $(CFLAGS) $(LIBS)) |
493 |
$(CXX) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` $(subst -L/opt/local,-L/tmp/skl/Gimp.app/Contents/Resources,$(shell gimptool-2.0$(EXE) --libs) $(CFLAGS) $(LIBS)) |
499 |
endif |
494 |
endif |
500 |
else |
495 |
else |
501 |
$(CXX) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o -Dgmic_gimp `gimptool-2.0$(EXE) --cflags` `gimptool-2.0$(EXE) --libs` $(CFLAGS) $(LIBS) |
496 |
$(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) |
502 |
endif |
497 |
endif |
503 |
$(STRIP) gmic_gimp$(EXE) |
|
|
504 |
|
498 |
|
505 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
499 |
gmic: gmic.cpp gmic.h gmic_stdlib.h CImg.h |
506 |
$(CXX) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LIBS) |
500 |
$(CXX) -o gmic gmic.cpp -Dgmic_main $(CFLAGS) $(LDFLAGS) $(LIBS) |
507 |
|
501 |
|
508 |
gmic_stdlib.h: |
502 |
gmic_stdlib.h: |
509 |
@echo -n "> Retrieve G'MIC Standard Library..." |
503 |
@echo -n "> Retrieve G'MIC Standard Library..." |
Lines 576-596
stdlib:
Link Here
|
576 |
# Generate bash completion script (requires 'gmic' to be installed first). |
570 |
# Generate bash completion script (requires 'gmic' to be installed first). |
577 |
bashcompletion: |
571 |
bashcompletion: |
578 |
@mkdir -p ../resources |
572 |
@mkdir -p ../resources |
579 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
573 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
580 |
|
574 |
|
581 |
# Generate man page (requires 'gmic' to be installed first). |
575 |
# Generate man page (requires 'gmic' to be installed first). |
582 |
man: |
576 |
man: |
583 |
@mkdir -p ../man |
577 |
@mkdir -p ../man |
584 |
@\gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
578 |
@./gmic -v - gmic_stdlib.gmic raw:gmic_stdlib.gmic,uchar -__help man 2> ../man/gmic.1 |
585 |
@gzip -f ../man/gmic.1 |
|
|
586 |
|
579 |
|
587 |
# Install/uninstall/clean procedures. |
580 |
# Install/uninstall/clean procedures. |
588 |
install: |
581 |
install-gimp: |
589 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
582 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
590 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
583 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
591 |
cp -f ../resources/gmic_film_cluts.gmz $(DESTDIR)$(PLUGINDIR)/ |
584 |
cp -f ../resources/gmic_film_cluts.gmz $(DESTDIR)$(PLUGINDIR)/ |
|
|
585 |
|
586 |
install-bin: |
592 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
587 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
593 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
588 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
|
|
589 |
|
590 |
install-lib: |
594 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
591 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
595 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
592 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
596 |
cp -f gmic_libc.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
593 |
cp -f gmic_libc.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
Lines 604-618
ifneq ($(OS),Darwin)
Link Here
|
604 |
cp -f libcgmic.so $(DESTDIR)$(USR)/$(LIB)/libcgmic.so.1.7.2 |
601 |
cp -f libcgmic.so $(DESTDIR)$(USR)/$(LIB)/libcgmic.so.1.7.2 |
605 |
ln -fs libcgmic.so.1.7.2 $(DESTDIR)$(USR)/$(LIB)/libcgmic.so.1 |
602 |
ln -fs libcgmic.so.1.7.2 $(DESTDIR)$(USR)/$(LIB)/libcgmic.so.1 |
606 |
ln -fs libcgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libcgmic.so |
603 |
ln -fs libcgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libcgmic.so |
607 |
cp -f ../zart/zart $(DESTDIR)$(USR)/$(BIN)/ |
|
|
608 |
endif |
604 |
endif |
|
|
605 |
|
606 |
install-man: |
609 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
607 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
610 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
608 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
611 |
mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ |
609 |
cp -f ../man/gmic.1 $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
612 |
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
610 |
|
613 |
cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
611 |
install-bash: |
614 |
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 |
612 |
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 |
615 |
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 |
|
|
616 |
|
613 |
|
617 |
uninstall: |
614 |
uninstall: |
618 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
615 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
Lines 625-632
uninstall:
Link Here
|
625 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libcgmic.so.1 |
622 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libcgmic.so.1 |
626 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libcgmic$(SO) |
623 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libcgmic$(SO) |
627 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
624 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
628 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
625 |
rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
629 |
rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
|
|
630 |
|
626 |
|
631 |
distclean: clean |
627 |
distclean: clean |
632 |
|
628 |
|