forked from fusesource/jansi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.common
171 lines (146 loc) · 7.41 KB
/
Makefile.common
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
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# os=Default is meant to be generic unix/linux
known_targets := Linux-x86 Linux-x86_64 Linux-arm Linux-armv6 Linux-armv7 Linux-android-arm Linux-ppc64 Mac-x86 Mac-x86_64 Mac-arm64 DragonFly-x86_64 FreeBSD-x86_64 OpenBSD-x86_64 Windows-x86 Windows-x86_64 SunOS-sparcv9 HPUX-ia64_32
target := $(OS_NAME)-$(OS_ARCH)
ifeq (,$(findstring $(strip $(target)),$(known_targets)))
target := Default
endif
# cross-compilation toolchain prefix (e.g. "arm-linux-gnueabi-")
CROSS_PREFIX :=
Default_CC := $(CROSS_PREFIX)gcc
Default_STRIP := $(CROSS_PREFIX)strip
Default_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -fvisibility=hidden
Default_LINKFLAGS := -shared
Default_LIBNAME := libjansi.so
Default_JANSI_FLAGS :=
Linux-x86_CC := $(CROSS_PREFIX)gcc
Linux-x86_STRIP := $(CROSS_PREFIX)strip
Linux-x86_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -m32 -fvisibility=hidden
Linux-x86_LINKFLAGS := -shared -static-libgcc -lutil
Linux-x86_LIBNAME := libjansi.so
Linux-x86_JANSI_FLAGS :=
Linux-x86_64_CC := $(CROSS_PREFIX)gcc
Linux-x86_64_STRIP := $(CROSS_PREFIX)strip
Linux-x86_64_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -m64 -fvisibility=hidden
Linux-x86_64_LINKFLAGS := -shared -static-libgcc -lutil
Linux-x86_64_LIBNAME := libjansi.so
Linux-x86_64_JANSI_FLAGS :=
Linux-arm_CC := $(CROSS_PREFIX)gcc
Linux-arm_STRIP := $(CROSS_PREFIX)strip
Linux-arm_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -mfloat-abi=softfp -mfpu=vfp -fvisibility=hidden
Linux-arm_LINKFLAGS := -shared -static-libgcc -lutil
Linux-arm_LIBNAME := libjansi.so
Linux-arm_JANSI_FLAGS :=
Linux-armv6_CC := $(CROSS_PREFIX)gcc
Linux-armv6_STRIP := $(CROSS_PREFIX)strip
Linux-armv6_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -mfloat-abi=hard -mfpu=vfp -fPIC -fvisibility=hidden
Linux-armv6_LINKFLAGS := -shared -static-libgcc -lutil
Linux-armv6_LIBNAME := libjansi.so
Linux-armv6_JANSI_FLAGS :=
Linux-armv7_CC := $(CROSS_PREFIX)gcc
Linux-armv7_STRIP := $(CROSS_PREFIX)strip
Linux-armv7_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -mfloat-abi=hard -mfpu=vfp -fPIC -fvisibility=hidden
Linux-armv7_LINKFLAGS := -shared -static-libgcc -lutil
Linux-armv7_LIBNAME := libjansi.so
Linux-armv7_JANSI_FLAGS :=
Linux-arm64_CC := $(CROSS_PREFIX)gcc
Linux-arm64_STRIP := $(CROSS_PREFIX)strip
Linux-arm64_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -mfloat-abi=hard -mfpu=vfp -fPIC -fvisibility=hidden
Linux-arm64_LINKFLAGS := -shared -static-libgcc -lutil
Linux-arm64_LIBNAME := libjansi.so
Linux-arm64_JANSI_FLAGS :=
Linux-ppc64_CC := $(CROSS_PREFIX)gcc
Linux-ppc64_STRIP := $(CROSS_PREFIX)strip
Linux-ppc64_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -fvisibility=hidden
Linux-ppc64_LINKFLAGS := -shared -static-libgcc -lutil
Linux-ppc64_LIBNAME := libjansi.so
Linux-ppc64_JANSI_FLAGS :=
DragonFly-x86_64_CC := $(CROSS_PREFIX)cc
DragonFly-x86_64_STRIP := $(CROSS_PREFIX)strip
DragonFly-x86_64_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -O2 -fPIC -fvisibility=hidden
DragonFly-x86_64_LINKFLAGS := -shared
DragonFly-x86_64_LIBNAME := libjansi.so
DragonFly-x86_64_JANSI_FLAGS :=
FreeBSD-x86_CC := $(CROSS_PREFIX)gcc
FreeBSD-x86_STRIP := $(CROSS_PREFIX)strip
FreeBSD-x86_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -fvisibility=hidden
FreeBSD-x86_LINKFLAGS := -shared
FreeBSD-x86_LIBNAME := libjansi.so
FreeBSD-x86_JANSI_FLAGS :=
FreeBSD-x86_64_CC := $(CROSS_PREFIX)gcc
FreeBSD-x86_64_STRIP := $(CROSS_PREFIX)strip
FreeBSD-x86_64_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -fvisibility=hidden
FreeBSD-x86_64_LINKFLAGS := -shared
FreeBSD-x86_64_LIBNAME := libjansi.so
FreeBSD-x86_64_JANSI_FLAGS :=
OpenBSD-x86_64_CC := $(CROSS_PREFIX)gcc
OpenBSD-x86_64_STRIP := $(CROSS_PREFIX)strip
OpenBSD-x86_64_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -fvisibility=hidden
OpenBSD-x86_64_LINKFLAGS := -shared
OpenBSD-x86_64_LIBNAME := libjansi.so
OpenBSD-x86_64_JANSI_FLAGS :=
SunOS-sparcv9_CC := $(CROSS_PREFIX)gcc
SunOS-sparcv9_STRIP := $(CROSS_PREFIX)strip
SunOS-sparcv9_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -O2s -fPIC -m64 -fvisibility=hidden
SunOS-sparcv9_LINKFLAGS := -shared -static-libgcc
SunOS-sparcv9_LIBNAME := libjansi.so
SunOS-sparcv9_JANSI_FLAGS :=
HPUX-ia64_32_CC := cc
HPUX-ia64_32_STRIP := strip
HPUX-ia64_32_CCFLAGS := -Itarget/inc -Itarget/inc/unix +Osize +z -Bhidden
HPUX-ia64_32_LINKFLAGS := -b
HPUX-ia64_32_LIBNAME := libjansi.so
HPUX-ia64_32_JANSI_FLAGS :=
Mac-x86_CC := gcc
Mac-x86_STRIP := strip -x
Mac-x86_CCFLAGS := -I$(JAVA_HOME)/include -Itarget/inc -Itarget/inc/unix -Os -fPIC -mmacosx-version-min=10.4 -fvisibility=hidden
Mac-x86_LINKFLAGS := -dynamiclib
Mac-x86_LIBNAME := libjansi.jnilib
Mac-x86_JANSI_FLAGS := -DJANSI_ENABLE_LOCKING_STYLE=0
Mac-x86_64_CC := gcc -arch $(OS_ARCH)
Mac-x86_64_STRIP := strip -x
MAC_SDK := /Developer/SDKs/MacOSX10.10.sdk
ifeq ($(wildcard MAC_SDK),)
MAC_SDK := /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
endif
Mac-x86_64_CCFLAGS := -I$(MAC_SDK)/System/Library/Frameworks/JavaVM.framework/Headers -Itarget/inc -Itarget/inc/unix -Os -fPIC -mmacosx-version-min=10.6 -fvisibility=hidden
Mac-x86_64_LINKFLAGS := -dynamiclib
Mac-x86_64_LIBNAME := libjansi.jnilib
Mac-x86_64_JANSI_FLAGS :=
Mac-arm64_CC := $(CROSS_PREFIX)clang -v
Mac-arm64_STRIP := $(CROSS_PREFIX)strip -x
MAC_SDK := /usr/local/osxcross/SDK/MacOSX11.3.sdk/
Mac-arm64_CCFLAGS := -I$(MAC_SDK)/System/Library/Frameworks/JavaVM.framework/Headers -Itarget/inc -Itarget/inc/unix -Os -fPIC -mmacosx-version-min=11.0 -fvisibility=hidden
Mac-arm64_LINKFLAGS := -shared
Mac-arm64_LIBNAME := libjansi.jnilib
Mac-arm64_JANSI_FLAGS :=
Windows-x86_CC := $(CROSS_PREFIX)gcc
Windows-x86_STRIP := $(CROSS_PREFIX)strip
Windows-x86_CCFLAGS := -D_JNI_IMPLEMENTATION_ -Itarget/inc -Itarget/inc/windows -Os
Windows-x86_LINKFLAGS := -Wl,--kill-at -shared -static-libgcc
Windows-x86_LIBNAME := jansi.dll
Windows-x86_JANSI_FLAGS :=
Windows-x86_64_CC := $(CROSS_PREFIX)gcc
Windows-x86_64_STRIP := $(CROSS_PREFIX)strip
Windows-x86_64_CCFLAGS := -D_JNI_IMPLEMENTATION_ -Itarget/inc -Itarget/inc/windows -Os
Windows-x86_64_LINKFLAGS := -Wl,--kill-at -shared -static-libgcc
Windows-x86_64_LIBNAME := jansi.dll
Windows-x86_64_JANSI_FLAGS :=
CC := $($(target)_CC)
STRIP := $($(target)_STRIP)
CCFLAGS := $($(target)_CCFLAGS)
LINKFLAGS := $($(target)_LINKFLAGS)
LIBNAME := $($(target)_LIBNAME)
CCFLAGS := $(CCFLAGS)