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
|
--- native/Makefile.orig 2009-12-30 20:13:34.000000000 +1300
+++ native/Makefile 2009-12-30 20:21:39.000000000 +1300
@@ -54,7 +54,6 @@
LIBSFX=.so
ARSFX=.a
JNISFX=$(LIBSFX)
-CC=gcc
LD=gcc
LIBS=
# Default to Sun recommendations for JNI compilation
@@ -67,10 +65,10 @@
COUT=-o $@
CINCLUDES=$(JAVA_INCLUDES) -I"$(JAVAH)" -I$(FFI_BUILD)/include
CDEFINES=-D_REENTRANT
-PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
-CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
+PCFLAGS=-Wall -Wno-unused -Wno-parentheses
+CFLAGS+=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
-DVERSION='"$(VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
-LDFLAGS=-o $@ -shared
+LDFLAGS+= -o $@ -shared
ifeq ($(DYNAMIC_LIBFFI),true)
CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)
@@ -109,7 +107,7 @@
ifneq ($(MINGW),)
CC = $(MINGW) -m64 -mno-cygwin
LD = $(CC)
-LDFLAGS=-o $@ -shared
+LDFLAGS+= -o $@ -shared
LIBS= -lmingwex -lpsapi -lkernel32 -lmsvcrt
FFI_CONFIG += --host=x86_64-pc-mingw32
else
@@ -129,14 +127,14 @@
ARCH=$(shell uname -m | sed 's/i.86/i386/g')
PCFLAGS+=-fPIC
CDEFINES+=-DHAVE_PROTECTION
-LDFLAGS+=-Wl,-soname,$@
+LDFLAGS+= -Wl,-soname,$(shell basename $@)
endif
ifeq ($(OS),freebsd)
ARCH=$(shell uname -m | sed 's/i.86/i386/g')
PCFLAGS+=-fPIC
CINCLUDES+=-I/usr/X11R6/include
-LDFLAGS=-o $@ -shared
+LDFLAGS+=-o $@ -shared
CDEFINES+=-DHAVE_PROTECTION -DFFI_MMAP_EXEC_WRIT
endif
@@ -144,7 +142,7 @@
ARCH=$(shell uname -m | sed 's/i.86/i386/g')
PCFLAGS+=-fPIC
CINCLUDES+=-I/usr/X11R6/include
-LDFLAGS=-o $@ -shared
+LDFLAGS+= -o $@ -shared
CDEFINES+=-DHAVE_PROTECTION -DFFI_MMAP_EXEC_WRIT
endif
@@ -191,7 +189,7 @@
endif
PCFLAGS+=$(ISYSROOT) -x objective-c
CDEFINES+=-DTARGET_RT_MAC_CFM=0 -DFFI_MMAP_EXEC_WRIT
-LDFLAGS=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
+LDFLAGS+=$(ARCHFLAGS) -dynamiclib -o $@ -framework JavaVM \
-compatibility_version $(shell echo ${VERSION}|sed 's/^\([0-9][0-9]*\).*/\1/g') \
-current_version $(VERSION) \
-mmacosx-version-min=10.3 \
|