Index: gmic-1.5.8.4/src/Makefile =================================================================== --- gmic-1.5.8.4.orig/src/Makefile +++ gmic-1.5.8.4/src/Makefile @@ -75,10 +75,10 @@ endif # Flags to enable 'beta' version. IS_BETA_CFLAGS = # Flags that are mandatory to compile 'gmic'. -MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/include -MANDATORY_LDFLAGS += -L$(USR)/lib +MANDATORY_CFLAGS += $(CFLAGS) -Dgmic_build -I$(USR)/include +MANDATORY_LDFLAGS += -L$(USR)/$(LIB) ifeq ($(CC),g++) MANDATORY_CFLAGS += -Wall -W MANDATORY_LDFLAGS += -lm endif @@ -94,9 +94,9 @@ endif DEBUG_CFLAGS = -Dcimg_verbosity=3 -g # Flags to enable optimizations. ifeq ($(CC),g++) -OPT_CFLAGS = -O3 -mtune=generic # -fno-tree-pre # -ffast-math +OPT_CFLAGS = -O3 # -mtune=generic # -fno-tree-pre # -ffast-math endif ifeq ($(CC),clang++) OPT_CFLAGS = -O1 endif @@ -121,15 +121,15 @@ endif # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). # This requires the presence of the X11 include and library files. # (package 'libx11-dev' on Debian). X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr -X11_LDFLAGS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr +X11_LDFLAGS = -L/usr/X11R6/$(LIB) -lX11 -lpthread #-lXrandr # Flags to enable fast display, using XShm. # This requires the presence of the X11 extension include and library files. # (package 'libx11-dev' on Debian). XSHM_CFLAGS = -Dcimg_use_xshm -XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext +XSHM_LDFLAGS = -L$(USR)/X11R6/$(LIB) -lXext # Flags to enable image display, using GDI32. # This requires the presence of the GDI32 include and library files. GDI32_CFLAGS = -Dcimg_display=2 -Dcimg_appname=\\\"gmic\\\" @@ -232,9 +232,9 @@ MINIMAL_UNIX_CFLAGS = $(MANDATORY_CFLAGS MINIMAL_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(PARALLEL_LDFLAGS) $(X11_LDFLAGS) \ ${TIFF_LDFLAGS} ${PNG_LDFLAGS} $(ZLIB_LDFLAGS) $(FFTW_LDFLAGS) # $(OPENCV_LDFLAGS) # Unix : Static build. -STATIC_PATH = /usr/lib/ +STATIC_PATH = /usr/$(LIB)/ STATIC_EXTRA = STATIC_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(CHECKIMAGE_CFLAGS) $(PARALLEL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(TIFF_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0 STATIC_UNIX_LDFLAGS = $(PARALLEL_LDFLAGS) \ $(STATIC_PATH)/libpng.a \ @@ -279,9 +279,9 @@ STD_LIB_CFLAGS = $(MANDATORY_CFLAGS) $(C STD_LIB_LDFLAGS = $(MANDATORY_LDFLAGS) $(PARALLEL_LDFLAGS) $(FFTW_LDFLAGS) # GMICol : Standard build. GMICOL_UNIX_CFLAGS = $(MANDATORY_CFLAGS) $(CHECKIMAGE_CFLAGS) $(PARALLEL_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(FFTW_CFLAGS) -Dcimg_display=0 -GMICOL_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(PARALLEL_LDFLAGS) $(PNG_LDFLAGS) $(JPEG_LDFLAGS) $(ZLIB_LDFLAGS) /usr/lib/x86_64-linux-gnu/libfftw3.a /usr/lib/x86_64-linux-gnu/libfftw3_threads.a +GMICOL_UNIX_LDFLAGS = $(MANDATORY_LDFLAGS) $(PARALLEL_LDFLAGS) $(PNG_LDFLAGS) $(JPEG_LDFLAGS) $(ZLIB_LDFLAGS) /usr/$(LIB)/libfftw3.a /usr/$(LIB)/libfftw3_threads.a #-------------------------- # Define Makefile entries. #-------------------------- @@ -307,9 +307,9 @@ else endif endif gimp: - $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" "STRIP_EXE=1" gmic_gimp + $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" gmic_gimp lib: $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS) $(OPT_LDFLAGS)" gmic_lib @@ -330,15 +330,15 @@ static: minimal: $(MAKE) "CFLAGS+=$(MINIMAL_UNIX_CFLAGS)" "LDFLAGS+=$(MINIMAL_UNIX_LDFLAGS)" gmic_cli_standard linux: - $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_cli_standard + $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" gmic_cli_standard linux_alltypes: - $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_cli_alltypes + $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" gmic_cli_alltypes custom: - $(MAKE) "CFLAGS=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(CUST_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_cli_alltypes + $(MAKE) "CFLAGS=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(CUST_UNIX_LDFLAGS)" gmic_cli_alltypes solaris: $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic_cli_standard @@ -415,13 +415,13 @@ install: ifneq ($(OS),Darwin) mkdir -p $(DESTDIR)$(USR)/share # mkdir -p $(DESTDIR)$(USR)/share/zart # cp -f ../zart/zart $(DESTDIR)$(USR)/bin/zart - mkdir -p $(DESTDIR)$(USR)/lib - cp -f libgmic.so $(DESTDIR)$(USR)/lib/libgmic.so.1.5.8 - ln -s libgmic.so.1.5.8 $(DESTDIR)$(USR)/lib/libgmic.so.1 -# ln -s libgmic.so.1.5.8 $(DESTDIR)$(USR)/lib/libgmic.so.1 - ln -s libgmic.so.1 $(DESTDIR)$(USR)/lib/libgmic.so + mkdir -p $(DESTDIR)$(USR)/$(LIB) + cp -f libgmic.so $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.5.8 + ln -s libgmic.so.1.5.8 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 +# ln -s libgmic.so.1.5.8 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 + ln -s libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so endif mkdir -p $(DESTDIR)$(USR)/share/man/ mkdir -p $(DESTDIR)$(USR)/share/man/man1/ mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ @@ -432,12 +432,12 @@ endif uninstall: rm -f $(DESTDIR)$(USR)/bin/gmic rm -f $(DESTDIR)$(USR)/include/gmic.h - rm -f $(DESTDIR)$(USR)/lib/libgmic.so.1.5.8 -# rm -f $(DESTDIR)$(USR)/lib/libgmic.so.1.5 - rm -f $(DESTDIR)$(USR)/lib/libgmic.so.1 - rm -f $(DESTDIR)$(USR)/lib/libgmic.so + rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.5.8 +# rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1.5 + rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 + rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz # rm -f $(DESTDIR)$(USR)/bin/zart