gmic-1.5.2.2-makefile.patch 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. --- gmic-1.5.2.2/src/Makefile
  2. +++ gmic-1.5.2.2/src/Makefile
  3. @@ -77,7 +77,7 @@
  4. # Flags that are mandatory to compile 'gmic'.
  5. MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/include
  6. -MANDATORY_LDFLAGS += -L$(USR)/lib
  7. +MANDATORY_LDFLAGS +=
  8. ifeq ($(IS_GCC),yes)
  9. MANDATORY_CFLAGS += -Wall -W
  10. MANDATORY_LDFLAGS += -lm
  11. @@ -85,28 +85,20 @@
  12. MANDATORY_CFLAGS+=$(IS_BETA_CFLAGS)
  13. # Flags to enable debugging.
  14. -DEBUG_CFLAGS = -Dcimg_use_vt100 -Dcimg_verbosity=3 -g
  15. -
  16. -# Flags to enable optimizations.
  17. -ifeq ($(IS_GCC),yes)
  18. -OPT_CFLAGS = -O3 # -fno-tree-pre # -ffast-math
  19. -endif
  20. -ifeq ($(CC),icc)
  21. -OPT_CFLAGS = -O3 -ipo -no-prec-div -override-limits
  22. -endif
  23. +DEBUG_CFLAGS = -Dcimg_use_vt100 -Dcimg_verbosity=3
  24. # Flags to enable image display, using X11
  25. # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).
  26. # This requires the presence of the X11 include and library files.
  27. # (package 'libx11-dev' on Debian).
  28. -X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr
  29. -X11_LDFLAGS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr
  30. +X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr
  31. +X11_LDFLAGS = -lX11 -lpthread #-lXrandr
  32. # Flags to enable fast display, using XShm.
  33. # This requires the presence of the X11 extension include and library files.
  34. # (package 'libx11-dev' on Debian).
  35. XSHM_CFLAGS = -Dcimg_use_xshm
  36. -XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext
  37. +XSHM_LDFLAGS = -lXext
  38. # Flags to enable image display, using GDI32.
  39. # This requires the presence of the GDI32 include and library files.
  40. @@ -152,14 +144,8 @@
  41. # Flags to enable native support of webcams, using the OpenCV library.
  42. # This requires the presence of the OpenCV include and library files.
  43. # (package 'libcv3-2-dev' on Debian).
  44. -ifeq ($(OS),Darwin)
  45. OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv
  46. OPENCV_LDFLAGS = `pkg-config opencv --libs` #-> Use this for OpenCV 2.2.0 !
  47. -else
  48. -OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv
  49. -# OPENCV_LDFLAGS = -lcv -lhighgui
  50. -OPENCV_LDFLAGS = -lopencv_core -lopencv_highgui #-> Use this for OpenCV >= 2.2.0 !
  51. -endif
  52. # Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library.
  53. # This requires the presence of the GraphicsMagick++ include and library files.
  54. @@ -287,10 +273,10 @@
  55. endif
  56. gimp:
  57. - $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" "STRIP_EXE=1" gmic_gimp
  58. + $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" gmic_gimp
  59. lib:
  60. - $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS) $(OPT_LDFLAGS)" gmic_lib
  61. + $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS) $(OPT_LDFLAGS)" gmic_lib
  62. zart: lib
  63. ifneq ($(OS),Darwin)
  64. @@ -313,10 +299,10 @@
  65. $(MAKE) "CFLAGS+=$(DEBUG_UNIX_CFLAGS)" "LDFLAGS+=$(DEBUG_UNIX_LDFLAGS)" gmic_minimal
  66. linux:
  67. - $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic
  68. + $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_UNIX_LDFLAGS)" gmic_gmic
  69. custom:
  70. - $(MAKE) "CFLAGS=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(CUST_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic
  71. + $(MAKE) "CFLAGS+=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(CUST_UNIX_LDFLAGS)" gmic_gmic
  72. solaris:
  73. $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic_gmic
  74. @@ -346,7 +332,6 @@
  75. $(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp -Dgmic_float_only
  76. gmic_gimp : gmic_gimp.o gmic_gimp.cpp
  77. $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LDFLAGS)
  78. - strip gmic_gimp$(EXE)
  79. gmic_minimal: gmic.cpp
  80. $(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_float_only -Dgmic_main $(LDFLAGS)
  81. @@ -371,7 +356,6 @@
  82. $(CC) -o gmic_double.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_double
  83. gmic_gmic: gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o gmic_def.h
  84. $(CC) -o gmic gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o $(LDFLAGS)
  85. - strip gmic$(EXE)
  86. def:
  87. @echo "#ifndef gmic_gimp" > gmic_def.h