1 --- FreeImage/Makefile.gnu Tue Mar 10 09:04:00 2015
2 +++ FreeImage/Makefile_.gnu Tue May 24 02:22:10 2022
4 # General configuration variables:
6 INCDIR ?= $(DESTDIR)/usr/include
7 -INSTALLDIR ?= $(DESTDIR)/usr/lib
8 +INSTALLDIR ?= $(DESTDIR)/usr/lib/MACH64
9 +PKGCFGDIR ?= $(DESTDIR)/usr/lib/MACH64/pkgconfig
11 # Converts cr/lf to just lf
14 MODULES = $(SRCS:.c=.o)
15 MODULES := $(MODULES:.cpp=.o)
16 CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
18 -CFLAGS += -DOPJ_STATIC
22 -CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
24 -CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
26 -CXXFLAGS += -D__ANSI__
27 -CXXFLAGS += $(INCLUDE)
28 +override CFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libjpeg libjxr libraw libpng libtiff-4 libwebp libwebpmux zlib)
29 +override CXXFLAGS += $(INCLUDE) -D__ANSI__ -I/usr/include/jxrlib $(shell pkg-config --cflags OpenEXR libopenjp2 libjpeg libjxr libraw libpng libtiff-4 libwebp libwebpmux zlib)
30 +override LDFLAGS += $(shell pkg-config --libs OpenEXR libopenjp2 libjpeg libjxr libraw libpng libtiff-4 libwebp libwebpmux zlib)
32 ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
35 + override CFLAGS += -fPIC
36 + override CXXFLAGS += -fPIC
43 $(SHAREDLIB): $(MODULES)
44 - $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
45 + $(CC) -shared -Wl,-soname,$(VERLIBNAME) -o $@ $(MODULES) $(LIBRARIES) $(LDFLAGS)
48 - install -d $(INCDIR) $(INSTALLDIR)
49 - install -m 644 -o root -g root $(HEADER) $(INCDIR)
50 - install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
51 - install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
52 + ginstall -c -d $(INCDIR) $(PKGCFGDIR)
53 + ginstall -c -m 644 $(HEADER) $(INCDIR)
54 + ginstall -c -m 755 $(SHAREDLIB) $(INSTALLDIR)
55 + ginstall -c -m 644 libfreeimage.pc $(PKGCFGDIR)
56 ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
57 ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)