Lines 81-90
Link Here
|
81 |
|
81 |
|
82 |
# Flags that are mandatory to compile 'gmic'. |
82 |
# Flags that are mandatory to compile 'gmic'. |
83 |
MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/$(INCLUDE) |
83 |
MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/$(INCLUDE) |
84 |
MANDATORY_LIBS += -L$(USR)/$(LIB) |
|
|
85 |
ifeq ($(CC),g++) |
84 |
ifeq ($(CC),g++) |
86 |
MANDATORY_CFLAGS += -Wall -W |
85 |
MANDATORY_CFLAGS += -Wall -W |
87 |
MANDATORY_LIBS += -lm |
86 |
MANDATORY_LIBS = -lm |
88 |
endif |
87 |
endif |
89 |
MANDATORY_CFLAGS+=$(IS_BETA_CFLAGS) |
88 |
MANDATORY_CFLAGS+=$(IS_BETA_CFLAGS) |
90 |
ifeq ($(OS),Unix) |
89 |
ifeq ($(OS),Unix) |
Lines 129-142
Link Here
|
129 |
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). |
128 |
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). |
130 |
# This requires the presence of the X11 include and library files. |
129 |
# This requires the presence of the X11 include and library files. |
131 |
# (package 'libx11-dev' on Debian). |
130 |
# (package 'libx11-dev' on Debian). |
132 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr |
131 |
X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
133 |
X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr |
132 |
X11_LIBS = -lX11 -lpthread #-lXrandr |
134 |
|
133 |
|
135 |
# Flags to enable fast display, using XShm. |
134 |
# Flags to enable fast display, using XShm. |
136 |
# This requires the presence of the X11 extension include and library files. |
135 |
# This requires the presence of the X11 extension include and library files. |
137 |
# (package 'libx11-dev' on Debian). |
136 |
# (package 'libx11-dev' on Debian). |
138 |
XSHM_CFLAGS = -Dcimg_use_xshm |
137 |
XSHM_CFLAGS = -Dcimg_use_xshm |
139 |
XSHM_LIBS = -L$(USR)/X11R6/lib -lXext |
138 |
XSHM_LIBS = -lXext |
140 |
|
139 |
|
141 |
# Flags to enable image display, using GDI32. |
140 |
# Flags to enable image display, using GDI32. |
142 |
# This requires the presence of the GDI32 include and library files. |
141 |
# This requires the presence of the GDI32 include and library files. |
Lines 171-177
Link Here
|
171 |
# This requires the presence of the FFMPEG include and library files. |
170 |
# This requires the presence of the FFMPEG include and library files. |
172 |
# (packages 'libavcodec-dev', 'libavutil-dev', 'libavformat-dev' and 'libswscale-dev' on Debian). |
171 |
# (packages 'libavcodec-dev', 'libavutil-dev', 'libavformat-dev' and 'libswscale-dev' on Debian). |
173 |
FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -I$(USR)/$(INCLUDE)/libavcodec -I$(USR)/$(INCLUDE)/libavformat -I$(USR)/$(INCLUDE)/libswscale -I$(USR)/$(INCLUDE)/ffmpeg |
172 |
FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -I$(USR)/$(INCLUDE)/libavcodec -I$(USR)/$(INCLUDE)/libavformat -I$(USR)/$(INCLUDE)/libswscale -I$(USR)/$(INCLUDE)/ffmpeg |
174 |
FFMPEG_LIBS = -lavcodec -lavformat -lswscale |
173 |
FFMPEG_LIBS = -lavcodec -lavformat -lavutil -lswscale |
175 |
|
174 |
|
176 |
# Flags to enable native support for compressed .cimgz files, using the Zlib library. |
175 |
# Flags to enable native support for compressed .cimgz files, using the Zlib library. |
177 |
# This requires the presence of the Zlib include and library files. |
176 |
# This requires the presence of the Zlib include and library files. |
Lines 182-195
Link Here
|
182 |
# Flags to enable native support of webcams, using the OpenCV library. |
181 |
# Flags to enable native support of webcams, using the OpenCV library. |
183 |
# This requires the presence of the OpenCV include and library files. |
182 |
# This requires the presence of the OpenCV include and library files. |
184 |
# (package 'libcv3-2-dev' on Debian). |
183 |
# (package 'libcv3-2-dev' on Debian). |
185 |
ifeq ($(OS),Darwin) |
|
|
186 |
OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/$(INCLUDE) -I$(USR)/$(INCLUDE)/opencv |
187 |
OPENCV_LIBS = `pkg-config opencv --libs` #-> Use this for OpenCV 2.2.0 ! |
184 |
OPENCV_LIBS = `pkg-config opencv --libs` #-> Use this for OpenCV 2.2.0 ! |
188 |
else |
|
|
189 |
OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/$(INCLUDE) -I$(USR)/$(INCLUDE)/opencv |
190 |
# OPENCV_LIBS = -lcv -lhighgui |
191 |
OPENCV_LIBS = -lopencv_core -lopencv_highgui #-> Use this for OpenCV >= 2.2.0 ! |
192 |
endif |
193 |
|
185 |
|
194 |
# Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library. |
186 |
# Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library. |
195 |
# This requires the presence of the GraphicsMagick++ include and library files. |
187 |
# This requires the presence of the GraphicsMagick++ include and library files. |
Lines 348-369
Link Here
|
348 |
gmic_lib.o: gmic.cpp |
340 |
gmic_lib.o: gmic.cpp |
349 |
$(CC) -o gmic_lib.o -c gmic.cpp -fPIC $(CFLAGS) |
341 |
$(CC) -o gmic_lib.o -c gmic.cpp -fPIC $(CFLAGS) |
350 |
gmic_lib: gmic_lib.o |
342 |
gmic_lib: gmic_lib.o |
351 |
ar rcs libgmic.a gmic_lib.o |
343 |
$(AR) rcs libgmic.a gmic_lib.o |
352 |
ifneq ($(OS),Darwin) |
344 |
ifneq ($(OS),Darwin) |
353 |
$(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS) |
345 |
$(CC) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS) |
354 |
$(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LIBS) |
346 |
$(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LIBS) |
355 |
else |
347 |
else |
356 |
$(CC) -shared -o libgmic.so gmic_lib.o $(LIBS) |
348 |
$(CC) $(LDFLAGS) -shared -o libgmic.so gmic_lib.o $(LIBS) |
357 |
endif |
349 |
endif |
358 |
|
350 |
|
359 |
gmic_gimp.o: gmic.cpp CImg.h |
351 |
gmic_gimp.o: gmic.cpp CImg.h |
360 |
$(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp |
352 |
$(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp |
361 |
gmic_gimp : gmic_gimp.o gmic_gimp.cpp |
353 |
gmic_gimp : gmic_gimp.o gmic_gimp.cpp |
362 |
$(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) |
354 |
$(CC) `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(LDFLAGS) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --libs` $(LIBS) |
363 |
strip gmic_gimp$(EXE) |
|
|
364 |
|
355 |
|
365 |
gmic: gmic.cpp gmic.h CImg.h |
356 |
gmic: gmic.cpp gmic.h CImg.h |
366 |
$(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_main $(LIBS) |
357 |
$(CC) $(CFLAGS) -Dgmic_main $(LDFLAGS) -o gmic gmic.cpp $(LIBS) |
367 |
|
358 |
|
368 |
gmic_def.h: gmic_def.gmic |
359 |
gmic_def.h: gmic_def.gmic |
369 |
@echo "#ifndef gmic_gimp" > gmic_def.h |
360 |
@echo "#ifndef gmic_gimp" > gmic_def.h |