1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
|
diff -rupN FreeImage_3_17_0_orig/Makefile.gnu FreeImage_3_17_0_new/Makefile.gnu
--- FreeImage_3_17_0_orig/Makefile.gnu 2015-03-08 18:04:00.000000000 +0200
+++ FreeImage_3_17_0_new/Makefile.gnu 2015-08-22 14:16:36.068525956 +0300
@@ -5,17 +5,19 @@ include Makefile.srcs
# General configuration variables:
DESTDIR ?= /
-INCDIR ?= $(DESTDIR)/usr/include
-INSTALLDIR ?= $(DESTDIR)/usr/lib
+INCDIR ?= $(DESTDIR)/include
+INSTALLDIR ?= $(DESTDIR)/lib
# Converts cr/lf to just lf
DOS2UNIX = dos2unix
-LIBRARIES = -lstdc++
+LIBRARIES = -lgnustl_shared -lndk-missing_1
+LDFLAGS = -L$(ndkMissing_dir)/lib
MODULES = $(SRCS:.c=.o)
MODULES := $(MODULES:.cpp=.o)
-CFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden
+CFLAGS = $(user_CFLAGS)
+CFLAGS += -fPIC -fexceptions -fvisibility=hidden
# OpenJPEG
CFLAGS += -DOPJ_STATIC
# LibRaw
@@ -23,28 +25,27 @@ CFLAGS += -DNO_LCMS
# LibJXR
CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
CFLAGS += $(INCLUDE)
-CXXFLAGS ?= -O3 -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+CXXFLAGS = $(user_CXXFLAGS)
+CXXFLAGS += -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
# LibJXR
CXXFLAGS += -D__ANSI__
CXXFLAGS += $(INCLUDE)
-ifeq ($(shell sh -c 'uname -m 2>/dev/null || echo not'),x86_64)
- CFLAGS += -fPIC
- CXXFLAGS += -fPIC
-endif
-
TARGET = freeimage
STATICLIB = lib$(TARGET).a
SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
LIBNAME = lib$(TARGET).so
-VERLIBNAME = $(LIBNAME).$(VER_MAJOR)
+VERLIBNAME = lib$(TARGET)_$(VER_MAJOR).so
HEADER = Source/FreeImage.h
default: all
-all: dist
+all: foo dist
+
+foo:
+ echo "my CFLAGS = " $(CFLAGS)
dist: FreeImage
mkdir -p Dist
@@ -71,12 +72,11 @@ $(SHAREDLIB): $(MODULES)
install:
install -d $(INCDIR) $(INSTALLDIR)
- install -m 644 -o root -g root $(HEADER) $(INCDIR)
- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR)
- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR)
+ install -m 644 $(HEADER) $(INCDIR)
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
- ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
-# ldconfig
+ ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME)
clean:
rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
diff -rupN FreeImage_3_17_0_orig/Makefile.gnu~ FreeImage_3_17_0_new/Makefile.gnu~
--- FreeImage_3_17_0_orig/Makefile.gnu~ 1970-01-01 02:00:00.000000000 +0200
+++ FreeImage_3_17_0_new/Makefile.gnu~ 2015-08-22 14:16:36.068525956 +0300
@@ -0,0 +1,82 @@
+# Linux makefile for FreeImage
+
+# This file can be generated by ./gensrclist.sh
+include Makefile.srcs
+
+# General configuration variables:
+DESTDIR ?= /
+INCDIR ?= $(DESTDIR)/include
+INSTALLDIR ?= $(DESTDIR)/lib
+
+# Converts cr/lf to just lf
+DOS2UNIX = dos2unix
+
+LIBRARIES = -lgnustl_shared -lndk-missing
+LDFLAGS = -L$(ndkMissing_dir)/lib
+
+MODULES = $(SRCS:.c=.o)
+MODULES := $(MODULES:.cpp=.o)
+CFLAGS = $(user_CFLAGS)
+CFLAGS += -fPIC -fexceptions -fvisibility=hidden
+# OpenJPEG
+CFLAGS += -DOPJ_STATIC
+# LibRaw
+CFLAGS += -DNO_LCMS
+# LibJXR
+CFLAGS += -DDISABLE_PERF_MEASUREMENT -D__ANSI__
+CFLAGS += $(INCLUDE)
+CXXFLAGS = $(user_CXXFLAGS)
+CXXFLAGS += -fPIC -fexceptions -fvisibility=hidden -Wno-ctor-dtor-privacy
+# LibJXR
+CXXFLAGS += -D__ANSI__
+CXXFLAGS += $(INCLUDE)
+
+TARGET = freeimage
+STATICLIB = lib$(TARGET).a
+SHAREDLIB = lib$(TARGET)-$(VER_MAJOR).$(VER_MINOR).so
+LIBNAME = lib$(TARGET).so
+VERLIBNAME = $(LIBNAME)
+HEADER = Source/FreeImage.h
+
+
+
+default: all
+
+all: foo dist
+
+foo:
+ echo "my CFLAGS = " $(CFLAGS)
+
+dist: FreeImage
+ mkdir -p Dist
+ cp *.a Dist/
+ cp *.so Dist/
+ cp Source/FreeImage.h Dist/
+
+dos2unix:
+ @$(DOS2UNIX) $(SRCS) $(INCLS)
+
+FreeImage: $(STATICLIB) $(SHAREDLIB)
+
+.c.o:
+ $(CC) $(CFLAGS) -c $< -o $@
+
+.cpp.o:
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+$(STATICLIB): $(MODULES)
+ $(AR) r $@ $(MODULES)
+
+$(SHAREDLIB): $(MODULES)
+ $(CC) -s -shared -Wl,-soname,$(VERLIBNAME) $(LDFLAGS) -o $@ $(MODULES) $(LIBRARIES)
+
+install:
+ install -d $(INCDIR) $(INSTALLDIR)
+ install -m 644 $(HEADER) $(INCDIR)
+ install -m 644 $(STATICLIB) $(INSTALLDIR)
+ install -m 755 $(SHAREDLIB) $(INSTALLDIR)
+ ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME)
+
+clean:
+ rm -f core Dist/*.* u2dtmp* $(MODULES) $(STATICLIB) $(SHAREDLIB) $(LIBNAME)
+
diff -rupN FreeImage_3_17_0_orig/Source/LibJXR/common/include/wmspecstring.h FreeImage_3_17_0_new/Source/LibJXR/common/include/wmspecstring.h
--- FreeImage_3_17_0_orig/Source/LibJXR/common/include/wmspecstring.h 2015-03-02 01:50:58.000000000 +0200
+++ FreeImage_3_17_0_new/Source/LibJXR/common/include/wmspecstring.h 2015-08-22 14:16:36.084525640 +0300
@@ -286,7 +286,9 @@ extern "C" {
#if defined(_WINDOWS_)
/* Windows Internal */
+#if defined _WIN32
#define __volatile __$volatile
+#endif
#define __nonvolatile __$nonvolatile
#define __deref_volatile __deref __volatile
#define __deref_nonvolatile __deref __nonvolatile
diff -rupN FreeImage_3_17_0_orig/Source/LibRawLite/internal/libraw_x3f.cpp FreeImage_3_17_0_new/Source/LibRawLite/internal/libraw_x3f.cpp
--- FreeImage_3_17_0_orig/Source/LibRawLite/internal/libraw_x3f.cpp 2014-08-31 23:45:02.000000000 +0300
+++ FreeImage_3_17_0_new/Source/LibRawLite/internal/libraw_x3f.cpp 2015-08-22 14:16:36.092525482 +0300
@@ -625,7 +625,7 @@ static x3f_huffman_t *new_huffman(x3f_hu
I->output.file = NULL;
if (infile == NULL) {
- I->error = "No infile";
+ I->error = const_cast<char*>("No infile");
return x3f;
}
|