1 #
2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
117 ##########################################################################################
118
119 LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java)
120
121 LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
122 -I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
123 -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
124 -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
125
126 # Make it possible to override this variable
127 LIBJAVA_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers
128
129 ifeq ($(OPENJDK_TARGET_OS), macosx)
130 BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
131 BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
132 endif
133
134 ifeq ($(OPENJDK_TARGET_OS), solaris)
135 ifneq ($(OPENJDK_TARGET_CPU), x86_64)
136 LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
137 endif
138 endif
139
140 ifeq ($(OPENJDK_TARGET_OS), linux)
141 ifeq ($(OPENJDK_TARGET_CPU), x86_64)
142 BUILD_LIBJAVA_Bits.c_CFLAGS := $(C_O_FLAG_NORM)
143 endif
144 endif
145
146 $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
147 LIBRARY := java, \
148 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
149 SRC := $(LIBJAVA_SRC_DIRS), \
150 OPTIMIZATION := HIGH, \
151 CFLAGS := $(CFLAGS_JDKLIB) \
152 $(LIBJAVA_CFLAGS), \
153 System.c_CFLAGS := $(VERSION_CFLAGS), \
154 jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
155 DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
156 MAPFILE := $(LIBJAVA_MAPFILE), \
157 LDFLAGS := $(LDFLAGS_JDKLIB) \
158 $(call SET_SHARED_LIBRARY_ORIGIN), \
159 LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
160 LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \
161 -export:getLastErrorString \
162 -export:getErrorString -delayload:shell32.dll, \
|
1 #
2 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # This code is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License version 2 only, as
7 # published by the Free Software Foundation. Oracle designates this
8 # particular file as subject to the "Classpath" exception as provided
9 # by Oracle in the LICENSE file that accompanied this code.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
117 ##########################################################################################
118
119 LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java)
120
121 LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
122 -I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
123 -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
124 -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
125
126 # Make it possible to override this variable
127 LIBJAVA_MAPFILE ?= $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers
128
129 ifeq ($(OPENJDK_TARGET_OS), macosx)
130 BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c
131 BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
132 endif
133
134 ifeq ($(OPENJDK_TARGET_OS), solaris)
135 ifneq ($(OPENJDK_TARGET_CPU), x86_64)
136 LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
137 endif
138 endif
139
140 $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
141 LIBRARY := java, \
142 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
143 SRC := $(LIBJAVA_SRC_DIRS), \
144 OPTIMIZATION := HIGH, \
145 CFLAGS := $(CFLAGS_JDKLIB) \
146 $(LIBJAVA_CFLAGS), \
147 System.c_CFLAGS := $(VERSION_CFLAGS), \
148 jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \
149 DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \
150 MAPFILE := $(LIBJAVA_MAPFILE), \
151 LDFLAGS := $(LDFLAGS_JDKLIB) \
152 $(call SET_SHARED_LIBRARY_ORIGIN), \
153 LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \
154 LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \
155 -export:getLastErrorString \
156 -export:getErrorString -delayload:shell32.dll, \
|