提交 c58afece 编写于 作者: L lana

Merge

......@@ -166,3 +166,6 @@ b88fc3359dc7edabfa8a228855d8cebf8843c055 jdk8-b40
cf5c1f6fbc5ba14163fe0ef8eb8601b33f951372 jdk8-b42
b3246687c3695dff6f461bb407f9db88f7d072e7 jdk8-b43
db471a7af03168e4441c245b1d9976f720a7cb77 jdk8-b44
b92353a01aa049bc508fc56f0347d5934b7c4390 jdk8-b45
8d2ed9d58453c8049715a72a6d26b6b66b37a94c jdk8-b46
00b22b23269a57d0bb46c57753be2fe9a9d2c1a3 jdk8-b47
......@@ -215,7 +215,7 @@ define SetupJVMTIDemo
# Param 5 = libs for posix
# Param 6 = libs for winapi
# Param 7 = libs for solaris
BUILD_DEMO_JVMTI_$1_EXTRA_SRC:= $$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/demo/jvmti/$1) \
BUILD_DEMO_JVMTI_$1_EXTRA_SRC:= $$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/demo/jvmti/$1) \
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/,$2))
BUILD_DEMO_JVMTI_$1_EXTRA_INC:=$$(addprefix -I,$$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
BUILD_DEMO_JVMTI_$1_LANG:=C
......@@ -227,18 +227,26 @@ define SetupJVMTIDemo
$1_EXTRA_CXX:=$(LIBCXX)
BUILD_DEMO_JVMTI_$1_O_FLAG:=$(CXX_O_FLAG_NORM)
endif
$1_CXXFLAGS:=$(CXXFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH),waiters-sparc)
$1_FILTER:=-xregs=no%appl
$1_CXXFLAGS:=$$(filter-out $$($1_FILTER),$$($1_CXXFLAGS))
endif
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1,\
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
LANG:=$$(BUILD_DEMO_JVMTI_$1_LANG),\
CFLAGS:=$(CFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\
CXXFLAGS:=$(CXXFLAGS_JDKLIB) $$(BUILD_DEMO_JVMTI_$1_O_FLAG) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3,\
CXXFLAGS:=$$($1_CXXFLAGS),\
LDFLAGS:=$(LDFLAGS_JDKLIB),\
LDFLAGS_SUFFIX:=$$($1_EXTRA_CXX),\
LDFLAGS_SUFFIX_posix:=$5,\
LDFLAGS_SUFFIX_winapi:=$6,\
LDFLAGS_SUFFIX_solaris:=-lc $7,\
BIN:=$(JDK_OUTPUTDIR)/newdemoobjs/jvmti/$1,\
LIB:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX)))
OBJECT_DIR:=$(JDK_OUTPUTDIR)/newdemoobjs/jvmti/$1,\
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib,\
LIBRARY:=$1))
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1,\
SRC:=$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC),\
......@@ -262,7 +270,7 @@ define SetupJVMTIDemo
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/$1.jar
endif
BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/jvmti/$1/lib/$(LIBRARY_PREFIX)$1$(SHARED_LIBRARY_SUFFIX) \
BUILD_DEMOS += $$(BUILD_DEMO_JVMTI_$1) \
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/src.zip \
$(JDK_OUTPUTDIR)/newdemo/jvmti/$1/README.txt
endef
......@@ -274,7 +282,7 @@ $(eval $(call SetupJVMTIDemo,heapViewer, agent_util))
# hprof contains error messages using __FILE__ macro. These expand to the absolute path
# in the new build system and relative in the old, causing the binaries to differ.
$(eval $(call SetupJVMTIDemo,hprof, java_crw_demo,\
-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/npt,C,\
-I$(JDK_TOPDIR)/src/share/npt -I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/npt,C,\
-ldl,ws2_32.lib winmm.lib,-lsocket -lnsl))
$(eval $(call SetupJVMTIDemo,minst, agent_util java_crw_demo))
......@@ -349,7 +357,7 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/newdemo/README
##################################################################################################
ifeq ($(PLATFORM), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller/% : $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
$(MKDIR) -p $(@D)
......@@ -386,8 +394,9 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER,\
CFLAGS:=$(CFLAGS_JDKLIB) $(C_O_FLAG_NORM) $(SHARED_LIBRARY_FLAGS) \
-I$(JDK_OUTPUTDIR)/newdemoclasses/jni/Poller, \
LDFLAGS:=$(LDFLAGS_JDKLIB), \
BIN:=$(JDK_OUTPUTDIR)/newdemoobjs/jni/Poller,\
LIB:=$(JDK_OUTPUTDIR)/newdemoobjs/$(LIBRARY_PREFIX)Poller$(SHARED_LIBRARY_SUFFIX)))
OBJECT_DIR:=$(JDK_OUTPUTDIR)/newdemoobjs/jni/Poller,\
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/newdemoobjs, \
LIBRARY:=Poller))
#
# We can only compile native code after jar has been build (since we depend on generated .h files)
......
......@@ -45,7 +45,7 @@ EXCLUDES += com/sun/pept \
com/sun/tools/example/debug/gui \
com/oracle/security
ifeq ($(PLATFORM)-$(ARCH_DATA_MODEL),windows-64)
ifeq ($(OPENJDK_TARGET_OS)-$(ARCH_DATA_MODEL),windows-64)
EXCLUDES += sun/security/pkcs11
endif
......@@ -61,7 +61,7 @@ ifndef OPENJDK
EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
endif
ifneq ($(PLATFORM),solaris)
ifneq ($(OPENJDK_TARGET_OS),solaris)
# Exclude Solaris nio and two security related files in src/share/classes
EXFILES += SolarisAclFileAttributeView.java \
SolarisFileStore.java \
......@@ -71,37 +71,34 @@ ifneq ($(PLATFORM),solaris)
SolarisUserDefinedFileAttributeView.java \
SolarisWatchService.java \
SolarisAclFileAttributeView.java \
SolarisFileStore.java \
SolarisFileSystem.java \
SolarisFileSystemProvider.java \
SolarisUserDefinedFileAttributeView.java \
SolarisNativeDispatcher.java \
SolarisWatchService.java \
SolarisLoginModule.java \
SolarisSystem.java \
sun/nio/ch/EventPortSelectorImpl.java \
sun/nio/ch/EventPortSelectorProvider.java \
sun/nio/ch/EventPortWrapper.java \
sun/tools/attach/SolarisAttachProvider.java \
sun/tools/attach/SolarisVirtualMachine.java
endif
# In the old build, this isn't excluded on macosx, even though it probably
# should be.
ifneq ($(PLATFORM),macosx)
ifneq ($(OPENJDK_TARGET_OS),macosx)
EXFILES+=WrapperGenerator.java
endif
ifneq ($(PLATFORM),windows)
ifneq ($(OPENJDK_TARGET_OS),windows)
# Exclude Window security related files in src/share/classes
EXFILES+=NTLoginModule.java \
NTSystem.java
endif
ifeq ($(PLATFORM),windows)
ifeq ($(OPENJDK_TARGET_OS),windows)
# Don't build GTK L&F on Windows
EXCLUDES+= com/sun/java/swing/plaf/gtk
endif
ifneq ($(PLATFORM),linux)
ifneq ($(OPENJDK_TARGET_OS),linux)
EXFILES+=sun/tools/attach/LinuxAttachProvider.java \
sun/tools/attach/LinuxVirtualMachine.java \
sun/nio/fs/LinuxDosFileAttributeView.java \
......@@ -113,7 +110,7 @@ ifneq ($(PLATFORM),linux)
sun/nio/fs/LinuxWatchService.java
endif
ifneq ($(PLATFORM),macosx)
ifneq ($(OPENJDK_TARGET_OS),macosx)
EXFILES+=sun/nio/fs/BsdFileStore.java \
sun/nio/fs/BsdFileSystem.java \
sun/nio/fs/BsdFileSystemProvider.java \
......@@ -137,11 +134,11 @@ ifdef OPENJDK
endif
# Used on windows and macosx
ifeq (,$(filter $(PLATFORM), windows macosx))
ifeq (,$(filter $(OPENJDK_TARGET_OS), windows macosx))
EXFILES+=sun/awt/AWTCharset.java
endif
ifneq ($(PLATFORM), macosx)
ifneq ($(OPENJDK_TARGET_OS), macosx)
#
# Not in rt.jar on solaris and linux...(windows not checked)
# in rt.jar on macosx ??
......@@ -192,7 +189,7 @@ endif
# Exclude another implicitly not included file.
EXFILES+=sun/util/locale/AsciiUtil.java
ifeq (,$(filter $(PLATFORM), solaris macosx))
ifeq (,$(filter $(OPENJDK_TARGET_OS), solaris macosx))
#
# only solaris and macosx
#
......@@ -205,7 +202,7 @@ EXFILES+=-linux-arm.java \
-linux-ppc.java
# TODO: Is this necessary?
ifeq ($(PLATFORM), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
EXFILES+=sun/nio/ch/AbstractPollSelectorImpl.java \
sun/nio/ch/DevPollArrayWrapper.java \
sun/nio/ch/DevPollSelectorImpl.java \
......@@ -248,18 +245,24 @@ include CopyIntoClasses.gmk
ifndef OPENJDK
CLOSED_SRC_DIRS:=$(JDK_TOPDIR)/src/closed/share/classes \
$(JDK_TOPDIR)/src/closed/$(LEGACY_HOST_OS_API)/classes
$(JDK_TOPDIR)/src/closed/$(LEGACY_OPENJDK_TARGET_OS_API)/classes
endif
MACOSX_SRC_DIRS :=
ifeq ($(PLATFORM),macosx)
ifeq ($(OPENJDK_TARGET_OS),macosx)
MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/classes
# this files are duplicated in MACOSX_SRC_DIRS
EXFILES+= $(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/java2d/BackBufferCapsProvider.java \
$(JDK_TOPDIR)/src/solaris/classes/java/net/DefaultInterface.java \
$(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java
$(JDK_TOPDIR)/src/solaris/classes/java/lang/ClassLoaderHelper.java
# JObjC.jar contains 1.5 byte-code...so skip it here :-(
# MACOSX_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/jobjc/src
# EXCLUDES+= tests/java/com/apple/jobjc
EXCLUDES+= com/apple/jobjc
endif
# The exception handling of swing beaninfo
......@@ -272,7 +275,7 @@ $(JDK_OUTPUTDIR)/classes/javax/swing/beaninfo/images/%.gif: $(JDK_TOPDIR)/make/t
$(eval $(call SetupJavaCompilation,BUILD_JDK,\
SETUP:=GENERATE_JDKBYTECODE,\
SRC:=$(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes \
$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes \
$(MACOSX_SRC_DIRS) \
$(JDK_OUTPUTDIR)/gensrc \
$(JDK_OUTPUTDIR)/gensrc_swing/javax/swing/beaninfo \
......@@ -297,7 +300,7 @@ JDK_BASE_HEADER_CLASSES:=java.lang.Integer \
JDK_BASE_HEADER_JAVA_FILES:=$(patsubst %,$(JDK_TOPDIR)/src/share/classes/%.java,\
$(subst .,/,$(JDK_BASE_HEADER_CLASSES)))
ifeq ($(PLATFORM),windows)
ifeq ($(OPENJDK_TARGET_OS),windows)
JDK_BASE_HEADER_CLASSES_WINDOWS:=sun.nio.ch.PollArrayWrapper
JDK_BASE_HEADER_CLASSES+=$(JDK_BASE_HEADER_CLASSES_WINDOWS)
JDK_BASE_HEADER_JAVA_FILES+=$(patsubst %,$(JDK_TOPDIR)/src/windows/classes/%.java,\
......@@ -348,6 +351,53 @@ $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS),macosx)
#
# JObjC.jar is compiled with BOOT_JAVAC which (may) not support the "-h" flag.
# so we first compile classes with BOOT_JAVAC and then with JDK_JAVAC :-(
#
$(eval $(call SetupJavaCompiler,GENERATE_15BYTECODE,\
JAVAC:=$(JAVAC),\
FLAGS:=-source 1.5 -target 1.5 -g -bootclasspath $(BOOT_RTJAR) -cp $(JDK_OUTPUTDIR)/../langtools/dist/lib/classes.jar $(DISABLE_WARNINGS),\
SERVER_DIR:=$(JAVAC_SERVERS),\
SERVER_JVM:=$(SERVER_JAVA),\
MODE:=$(JAVAC_USE_MODE),\
USE_DEPS:=$(JAVAC_USE_DEPS)))
$(eval $(call SetupJavaCompilation,BUILD_JOBJC_JAR,\
SETUP:=GENERATE_15BYTECODE,\
SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
$(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
$(JDK_OUTPUTDIR)/gensrc, \
INCLUDES := com/apple/jobjc,\
EXCLUDES := tests/java/com/apple/jobjc,\
BIN:=$(JDK_OUTPUTDIR)/jobjc_classes,\
JAR:=$(JDK_OUTPUTDIR)/lib/JObjC.jar, \
JARINDEX := true))
$(BUILD_JOBJC_JAR) : $(BUILD_JDK)
JARS += $(JDK_OUTPUTDIR)/lib/JObjC.jar
$(eval $(call SetupJavaCompilation,BUILD_JOBJC_HEADERS_JAR,\
SETUP:=GENERATE_JDKBYTECODE,\
SRC:=$(JDK_TOPDIR)/src/macosx/native/jobjc/src/core/java \
$(JDK_TOPDIR)/src/macosx/native/jobjc/src/runtime-additions/java \
$(JDK_OUTPUTDIR)/gensrc, \
INCLUDES := com/apple/jobjc,\
EXCLUDES := tests/java/com/apple/jobjc,\
BIN:=$(JDK_OUTPUTDIR)/jobjc_classes_headers,\
JAR:=$(JDK_OUTPUTDIR)/jobjc_classes_headers/dummy.jar, \
HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers))
$(BUILD_JOBJC_HEADERS_JAR) : $(BUILD_JDK)
JARS += $(JDK_OUTPUTDIR)/jobjc_classes_headers/dummy.jar
endif
##########################################################################################
# copy with -a to preserve timestamps so dependencies down the line aren't messed up
all: $(BUILD_JDK) $(JARS) $(COPY_EXTRA) $(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
$(JDK_OUTPUTDIR)/classes/_the.jdk.base.headers
......
......@@ -32,17 +32,25 @@ include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# Build tools
include Tools.gmk
BUILD_LAUNCHERS=
define SetupLauncher
# TODO: Fix mapfile on solaris. Won't work with ld as linker.
# Parameter 1 is the name of the launcher (java,javac,jar...)
# Parameter 2 are extra CFLAGS
# Parameter 3 are extra LDFLAGS
# Parameter 4 are extra LDFLAGS_SUFFIX_posix
# Parameter 5 are extra LDFLAGS_SUFFIX_winapi
$1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/jli.lib
# Parameter 2 is extra CFLAGS
# Parameter 3 is extra LDFLAGS
# Parameter 4 is extra LDFLAGS_SUFFIX_posix
# Parameter 5 is extra LDFLAGS_SUFFIX_winapi
# Parameter 6 is optional Windows JLI library (full path)
# Parameter 7 is optional Windows resource (RC) flags
# Parameter 8 is optional Windows version resource file (.rc)
# Parameter 9 is different output dir
# Parameter 10 is FULL DEBUG SYMBOLS (set value to turn OFF, since most(all) seems to have it)
$1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib
ifneq ($6,)
$1_WINDOWS_JLI_LIB:=$6
endif
......@@ -51,33 +59,73 @@ define SetupLauncher
$1_VERSION_INFO_RESOURCE:=$8
endif
$1_LDFLAGS := $3
ifeq ($(OPENJDK_TARGET_OS), macosx)
$1_LDFLAGS += -F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
endif
$1_LDFLAGS_SUFFIX :=
ifeq ($(USE_EXTERNAL_LIBZ), true)
$1_LDFLAGS_SUFFIX += -lz
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
$1_LDFLAGS_SUFFIX += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices \
-sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/Info-cmdline.plist
endif
$1_OUTPUT_DIR_ARG:=$9
ifeq (,$$($1_OUTPUT_DIR_ARG))
$1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin
endif
$1_DEBUG_SYMBOLS:=yes
ifneq (,$(10))
$1_DEBUG_SYMBOLS:=
endif
$1_OPTIMIZATION:= LOW
# TODO: maybe it's better to move this if-statement out of this function
ifeq ($(1),java)
$1_OPTIMIZATION:=HIGH
endif
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
SRC:=$(JDK_TOPDIR)/src/share/bin,\
INCLUDE_FILES:=main.c,\
LANG:=C,\
CFLAGS:=$(CFLAGS_JDKEXE) $(C_O_FLAG_NORM) \
OPTIMIZATION :=$$($1_OPTIMIZATION), \
CFLAGS:=$(CFLAGS_JDKEXE) \
-I$(JDK_TOPDIR)/src/share/bin \
-I$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin \
-I$(JDK_TOPDIR)/src/$(PLATFORM)/bin \
-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
-DFULL_VERSION='"$(FULL_VERSION)"' \
-DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-DLIBARCHNAME='"$(ARCH)"' \
-DLAUNCHER_NAME='"openjdk"' \
-DLAUNCHER_NAME='"java"' \
-DPROGNAME='"$1"' $(DPACKAGEPATH) \
$2,\
CFLAGS_linux:=-fPIC,\
CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\
LDFLAGS:=$(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_ORIGIN,../lib/$(LIBARCH)/jli) \
$(call SET_SHARED_LIBRARY_ORIGIN,../jre/lib/$(LIBARCH)/jli) \
$3,\
$$($1_LDFLAGS),\
MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(ARCH), \
LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX),\
LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\
LDFLAGS_SUFFIX_posix:=$4 -lc,\
LDFLAGS_SUFFIX_winapi:=$$($1_WINDOWS_JLI_LIB) \
$(JDK_OUTPUTDIR)/objs/java.lib advapi32.lib $5,\
BIN:=$(JDK_OUTPUTDIR)/objs/$1_objs,\
EXE:=$(JDK_OUTPUTDIR)/objs/$1$(EXE_SUFFIX),\
$(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\
LDFLAGS_SUFFIX_solaris := -lthread $(LIBDL), \
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs,\
OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG),\
PROGRAM:=$1,\
DEBUG_SYMBOLS:=$$($1_DEBUG_SYMBOLS),\
VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
RC_FLAGS:=$(RC_FLAGS)\
/D "JDK_FNAME=$1$(EXE_SUFFIX)" \
......@@ -86,13 +134,22 @@ define SetupLauncher
$7,\
MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest)
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/$1$(EXE_SUFFIX)
BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
ifeq ($(OPENJDK_TARGET_OS),macosx)
$$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a
endif
ifeq ($(OPENJDK_TARGET_OS),windows)
$$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
$$($1_WINDOWS_JLI_LIB)
endif
endef
##########################################################################################
XLIBS:=-lX11
ifeq ($(PLATFORM),macosx)
XLIBS:=$(X_LIBS) -lX11
ifeq ($(OPENJDK_TARGET_OS),macosx)
DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
XLIBS:=
endif
......@@ -108,17 +165,17 @@ $(eval $(call SetupLauncher,java,\
$(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
$(JDK_TOPDIR)/src/windows/resource/java.rc))
ifeq ($(HOST_OS),windows)
ifeq ($(OPENJDK_TARGET_OS),windows)
$(eval $(call SetupLauncher,javaw,\
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
$(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
$(JDK_TOPDIR)/src/windows/resource/java.rc))
endif
ifeq ($(PLATFORM),solaris)
ifeq ($(OPENJDK_TARGET_OS),solaris)
THREAD_LIB:=-lthread
endif
ifeq ($(PLATFORM),linux)
ifeq ($(OPENJDK_TARGET_OS),linux)
THREAD_LIB:=-lpthread
endif
......@@ -271,7 +328,7 @@ $(eval $(call SetupLauncher,rmiregistry,\
$(eval $(call SetupLauncher,jcmd,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
ifeq ($(PLATFORM),windows)
ifeq ($(OPENJDK_TARGET_OS),windows)
$(eval $(call SetupLauncher,kinit,\
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
......@@ -286,8 +343,10 @@ endif
# The order of the object files on the link command line affects the size of the resulting
# binary (at least on linux) which causes the size to differ between old and new build.
ifeq ($(USE_EXTERNAL_LIBZ), true)
UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
UNPACKEXE_ZIPOBJS := -lz
else
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
......@@ -299,27 +358,31 @@ UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
endif
$(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX): $(UNPACKEXE_ZIPOBJS)
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
UNPACKEXE_CFLAGS += -xregs=no%appl
endif
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
EXCLUDE_FILES:=jni.cpp,\
LANG:=C,\
CFLAGS:=$(CXXFLAGS_JDKEXE) $(CXX_O_FLAG_NORM) \
-DFULL \
-I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5,\
OPTIMIZATION := LOW, \
CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\
-DFULL, \
CFLAGS_release:=-DPRODUCT,\
CFLAGS_linux:=-fPIC,\
CFLAGS_solaris := -KPIC, \
CFLAGS_macosx := -fPIC, \
MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \
LDFLAGS:=$(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX:=$(UNPACKEXE_ZIPOBJS) $(LIBCXX),\
LDFLAGS_SUFFIX_solaris:=-lc,\
BIN:=$(JDK_OUTPUTDIR)/objs/unpackexe,\
EXE:=$(JDK_OUTPUTDIR)/objs/unpack200$(EXE_SUFFIX),\
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe,\
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/bin,\
PROGRAM:=unpack200,\
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
RC_FLAGS:=$(RC_FLAGS)\
/D "JDK_FNAME=unpack200.exe" \
......@@ -327,7 +390,13 @@ $(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
/D "JDK_FTYPE=0x1L",\
MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX)
ifneq ($(USE_EXTERNAL_LIBZ), true)
$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS)
endif
BUILD_LAUNCHERS += $(BUILD_UNPACKEXE)
##########################################################################################
......@@ -335,7 +404,7 @@ BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin/unpack200$(EXE_SUFFIX)
BUILD_JEXEC :=
BUILD_JEXEC_SRC :=
BUILD_JEXEC_INC :=
BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/jexec$(EXE_SUFFIX)
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)
#
# UNHANDLED:
......@@ -345,30 +414,30 @@ BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/jexec$(EXE_SUFFIX)
#
# jdk/make/java/Makefile
#
ifeq ($(PLATFORM), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifeq ($(ARCH_DATA_MODEL), 32)
BUILD_JEXEC := 1
endif
endif
ifeq ($(PLATFORM), linux)
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_JEXEC := 1
endif # PLATFORM
endif # OPENJDK_TARGET_OS
#
# jdk/make/java/jexec/Makefile
#
ifeq ($(BUILD_JEXEC), 1)
ifeq ($(PLATFORM),windows)
else ifeq ($(PLATFORM),macosx)
ifeq ($(OPENJDK_TARGET_OS),windows)
else ifeq ($(OPENJDK_TARGET_OS),macosx)
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
else
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
endif
ifeq ($(PLATFORM), linux)
BUILD_JEXEC_DST := $(JDK_OUTPUTDIR)/lib/jexec$(EXE_SUFFIX)
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
endif
endif
......@@ -382,13 +451,15 @@ ifneq ($(BUILD_JEXEC_SRC),)
SRC:=$(BUILD_JEXEC_SRC),\
INCLUDE_FILES:=jexec.c,\
LANG:=C,\
CFLAGS:=$(CFLAGS_JDKEXE) $(C_O_FLAG_NORM) \
OPTIMIZATION := LOW, \
CFLAGS:=$(CFLAGS_JDKEXE)\
$(BUILD_JEXEC_INC), \
LDFLAGS:=$(LDFLAGS_JDKEXE), \
BIN:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
EXE:=$(BUILD_JEXEC_DST)))
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\
PROGRAM:=jexec))
BUILD_LAUNCHERS += $(BUILD_JEXEC_DST)
BUILD_LAUNCHERS += $(BUILD_JEXEC)
endif
##########################################################################################
......@@ -397,10 +468,10 @@ endif
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
#
JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin/java-rmi.cgi
ifeq ($(PLATFORM), linux)
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
ifeq ($(PLATFORM), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifeq ($(ARCH_DATA_MODEL), 32)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
......@@ -413,12 +484,13 @@ endif
# images bin dir. This weird behavior is mimicked here in the converted makefiles for
# now. Should probably just be deleted.
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
ifeq ($(HOST_OS_API),winapi)
ifeq ($(OPENJDK_TARGET_OS_API),winapi)
$(eval $(call SetupLauncher,java-rmi,\
-DEXPAND_CLASSPATH_WILDCARDS,\
$(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(ARCH))))
$(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(ARCH)),\
,,,,,$(JDK_OUTPUTDIR)/objs))
$(JAVA_RMI_CGI): $(JDK_OUTPUTDIR)/objs/java-rmi$(EXE_SUFFIX)
$(JAVA_RMI_CGI): $(BUILD_LAUNCHER_java-rmi)
$(MKDIR) -p $(@D)
$(CP) $< $@
......@@ -432,11 +504,6 @@ endif
##########################################################################################
$(JDK_OUTPUTDIR)/bin/% : $(JDK_OUTPUTDIR)/objs/%
$(ECHO) Copying $(@F)
$(MKDIR) -p $(@D)
$(CP) $< $@
$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
all: $(BUILD_LAUNCHERS)
......
......@@ -25,12 +25,12 @@
INCLUDEDIR = $(JDK_OUTPUTDIR)/include
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM)
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
ifeq ($(PLATFORM), windows)
PLATFORM_INCLUDE = $(INCLUDEDIR)/win32
else ifeq ($(PLATFORM), macosx)
PLATFORM_INCLUDE = $(INCLUDEDIR)/darwin
ifeq ($(OPENJDK_TARGET_OS), windows)
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
else ifeq ($(OPENJDK_TARGET_OS), macosx)
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
endif
#
......@@ -42,15 +42,15 @@ H_TARGET_FILES =$(INCLUDEDIR)/jdwpTransport.h \
$(INCLUDEDIR)/jvmticmlr.h \
$(INCLUDEDIR)/classfile_constants.h \
$(INCLUDEDIR)/jawt.h \
$(PLATFORM_INCLUDE)/jni_md.h \
$(PLATFORM_INCLUDE)/jawt_md.h
$(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
$(MKDIR) -p $(@D)
$(RM) -f $@
$(CP) $< $@
$(PLATFORM_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/javavm/export/%.h
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/javavm/export/%.h
$(MKDIR) -p $(@D)
$(RM) -f $@
$(CP) $< $@
......@@ -83,6 +83,13 @@ $(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
$(CP) $< $@
$(CHMOD) 644 $@
# this file has different permissions...don't know why...
$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
$(MKDIR) -p $(@D)
$(RM) -f $@
$(CP) $< $@
$(CHMOD) 644 $@
$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
$(MKDIR) -p $(@D)
$(RM) -f $@
......@@ -121,9 +128,13 @@ COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
#
# Copy flavormap.properties, cursor.properties and cursors gif files to LIBDIR
#
PLATFORM_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
ifneq ($(OPENJDK_TARGET_OS), macosx)
OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib
else
OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
endif
$(LIBDIR)/flavormap.properties: $(PLATFORM_LIB_SRC)/flavormap.properties
$(LIBDIR)/flavormap.properties: $(OPENJDK_TARGET_OS_LIB_SRC)/flavormap.properties
$(MKDIR) -p $(@D)
$(RM) -f $@
$(CP) $< $@
......@@ -131,9 +142,9 @@ $(LIBDIR)/flavormap.properties: $(PLATFORM_LIB_SRC)/flavormap.properties
COPY_FILES += $(LIBDIR)/flavormap.properties
CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
CURSORS_PLATFORM_LIB_SRC = $(PLATFORM_LIB_SRC)/images/cursors
CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib/images/cursors
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_PLATFORM_LIB_SRC)/cursors.properties
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
$(MKDIR) -p $(@D)
$(RM) -f $@
$(CP) $< $@
......@@ -141,11 +152,11 @@ $(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_PLATFORM_LIB_SRC)/cursors.prop
COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
ifeq ($(PLATFORM), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
else # PLATFORM
else # OPENJDK_TARGET_OS
CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
endif # PLATFORM
endif # OPENJDK_TARGET_OS
CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
......@@ -157,7 +168,7 @@ COPY_FILES += $(CURSORS_TARGET_FILES)
##########################################################################################
CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
CONTENT_TYPES_SRC=$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib
$(LIBDIR)/content-types.properties: $(CONTENT_TYPES_SRC)/content-types.properties
$(MKDIR) -p $(@D)
......@@ -179,9 +190,9 @@ COPY_FILES += $(LIBDIR)/calendars.properties
##########################################################################################
ifeq ($(PLATFORM),windows)
ifeq ($(OPENJDK_TARGET_OS),windows)
TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/lib
TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/lib
$(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
$(MKDIR) -p $(@D)
......@@ -233,7 +244,7 @@ COPY_FILES += $(ICCPROFILE_TARGET_FILES)
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifdef OPENJDK
ifeq ($(PLATFORM), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
FREETYPE_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
else
ifeq ($(USING_SYSTEM_FT_LIB), false)
......@@ -243,7 +254,7 @@ ifdef OPENJDK
$(FREETYPE_LIB): $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(CP) $(FREETYPE2_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
ifeq ($(BUILD_OS), windows)
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
......@@ -254,7 +265,7 @@ endif
# Copy msvcr100.dll on windows
ifeq ($(PLATFORM),windows)
ifeq ($(OPENJDK_TARGET_OS),windows)
MSVCRNN_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCRNN_DLL))
$(MSVCRNN_TARGET): $(MSVCRNN_DLL)
$(MKDIR) -p $(@D)
......@@ -286,14 +297,14 @@ else
JVMCFG_ARCH := $(ARCH)
endif
ifeq ($(PLATFORM),macosx)
ifeq ($(OPENJDK_TARGET_OS),macosx)
ifeq ($(JVMCFG_ARCH),amd64)
JVMCFG_ARCH := x86_64
endif
JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib
else
JVMCFG_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/$(JVMCFG_ARCH)/jvm.cfg
JVMCFG_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/$(JVMCFG_ARCH)/jvm.cfg
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib/$(LIBARCH)
endif
......@@ -353,15 +364,15 @@ COPY_FILES += $(JVMCFG)
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security
PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
ifeq ($(PLATFORM), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-solaris
endif
ifeq ($(PLATFORM), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-windows
endif
ifeq ($(PLATFORM), macosx)
ifeq ($(OPENJDK_TARGET_OS), macosx)
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-macosx
endif
......@@ -453,7 +464,7 @@ $(SHARED_FONTS_DST_DIR)/fonts.dir : $(JDK_TOPDIR)/src/solaris/classes/sun/awt/mo
COPY_FILES += $(SHARED_FONTS_DST) $(SHARED_FONTS_DST_DIR)/fonts.dir
ifeq ($(PLATFORM), linux)
ifeq ($(OPENJDK_TARGET_OS), linux)
# The oblique fonts are only needed/wanted on Linux.
......@@ -532,11 +543,13 @@ $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
$(CHMOD) 755 $@
$(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(ARCH)/libjdgaSUNW%.so
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
$(CHMOD) 755 $@
$(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib/$(LIBARCH)/libjdgaSUNWffb.so
$(MKDIR) -p $(@D)
......@@ -549,7 +562,7 @@ endif
##########################################################################################
ifeq ($(PLATFORM), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/share/lib/security/sunpkcs11-solaris.cfg
SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
......@@ -566,7 +579,7 @@ endif
##########################################################################################
ifndef OPENJDK
ifeq ($(PLATFORM), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
UCRYPTO_CFG_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/ucrypto-solaris.cfg
UCRYPTO_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/ucrypto-solaris.cfg
......
......@@ -133,7 +133,7 @@ COPY_FILES += \
$(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/icons/ocean/*.png) \
$(wildcard $(SWING_PLAF_METAL_RESOURCES_DIR)/sounds/*.wav)
ifneq ($(PLATFORM), windows)
ifneq ($(OPENJDK_TARGET_OS), windows)
# Only copy GTK resources on Solaris/Linux
SWING_PLAF_GTK_RESOURCES_DIR = $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk
COPY_FILES += \
......@@ -174,11 +174,11 @@ COPY_FILES += \
$(shell $(MKDIR) -p $(JDK_OUTPUTDIR)/classes/META-INF/services)
# Find all META-INF/services/* files
ALL_META-INF_DIRS_share:=$(shell $(FIND) $(JDK_TOPDIR)/src/share/classes -type d -a -name META-INF)
ALL_META-INF_DIRS_hostapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes -type d -a -name META-INF)
ALL_META-INF_DIRS_targetapi:=$(shell $(FIND) $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes -type d -a -name META-INF)
# Platform specific overrides shared
ifneq ($(ALL_META-INF_DIRS_hostapi),)
ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_hostapi) \
$(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes%,%,$(ALL_META-INF_DIRS_hostapi)),\
ifneq ($(ALL_META-INF_DIRS_targetapi),)
ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_targetapi) \
$(filter-out %$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes%,%,$(ALL_META-INF_DIRS_targetapi)),\
$(ALL_META-INF_DIRS_share))
else
ALL_META-INF_DIRS:=$(ALL_META-INF_DIRS_share)
......@@ -189,7 +189,7 @@ ifdef OPENJDK
endif
ifndef OPENJDK
ifneq ($(PLATFORM), macosx)
ifneq ($(OPENJDK_TARGET_OS), macosx)
ALL_META-INF_DIRS += $(JDK_TOPDIR)/src/closed/share/classes/sun/jdbc/odbc/META-INF
endif
endif
......@@ -216,9 +216,9 @@ OUT_SERVICES_FILES:=$(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\
$(shell $(PRINTF) "$(SRC_SERVICES_FILES)\n" | $(SED) -e 's|/[^ ]*/META-INF/services/||g'))
OUT_SERVICES_FILES_COLON:=$(addsuffix :,$(OUT_SERVICES_FILES))
# Exception handling for print services with no META-INF directory
SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/*)
SRC_SERVICES_FILES_PRINT = $(wildcard $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/print/services/*)
OUT_SERVICES_FILES_PRINT = $(addprefix $(JDK_OUTPUTDIR)/classes/META-INF/services/,\
$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/print/services/%,%,\
$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/print/services/%,%,\
$(SRC_SERVICES_FILES_PRINT)))
OUT_SERVICES_FILES_PRINT_COLON = $(addsuffix :,$(OUT_SERVICES_FILES_PRINT))
RULES_SERVICES_PRINT = $(join $(OUT_SERVICES_FILES_PRINT_COLON),$(SRC_SERVICES_FILES_PRINT))
......@@ -229,7 +229,7 @@ META-INF_RULES_SERVICES:=$(RULES_SERVICES_PRINT) $(join $(OUT_SERVICES_FILES_COL
define addto_meta-inf_services
$1
echo Installing META-INF/services/$$(@F)
$(CAT) $$< | $(SED) -e "s/^#\[$(PLATFORM)\]//" > $$@
$(CAT) $$< | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $$@
endef
$(foreach i,$(META-INF_RULES_SERVICES),$(eval $(call addto_meta-inf_services,$i)))
# Here is the generic rule, whose receipt the above rules will trigger.
......@@ -261,13 +261,13 @@ JAVAX_SOUND_SRC_FILES := \
COPY_EXTRA += $(foreach F,$(notdir $(JAVAX_SOUND_SRC_FILES)),$(JDK_OUTPUTDIR)/classes/META-INF/services/${F})
ifeq ($(PLATFORM)-$(ARCH),windows-ia64)
ifeq ($(OPENJDK_TARGET_OS)-$(ARCH),windows-ia64)
JAVAX_SOUND_SRC_FILES += windows-ia64/javax.sound.sampled.spi.MixerProvider
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
else ifeq ($(PLATFORM),windows)
else ifeq ($(OPENJDK_TARGET_OS),windows)
JAVAX_SOUND_SRC_FILES += windows-i586/javax.sound.sampled.spi.MixerProvider
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
else ifeq ($(PLATFORM)-$(ARCH),linux-i586)
else ifeq ($(OPENJDK_TARGET_OS)-$(ARCH),linux-i586)
JAVAX_SOUND_SRC_FILES += linux-i586/javax.sound.sampled.spi.MixerProvider
COPY_EXTRA += $(JDK_OUTPUTDIR)/classes/META-INF/services/javax.sound.sampled.spi.MixerProvider
else
......
......@@ -46,7 +46,7 @@ ifndef OPENJDK
SAMPLE_TARGET += $(SAMPLE_CLOSED_TARGET)
endif
ifneq (, $(filter $(PLATFORM), solaris macosx))
ifneq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx))
SAMPLE_SOLARIS_SOURCE := $(shell $(FIND) $(SAMPLE_SOLARIS_SOURCE_DIR) -type f -print)
SAMPLE_SOLARIS_TARGET := $(subst $(SAMPLE_SOLARIS_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOLARIS_SOURCE))
SAMPLE_TARGET += $(SAMPLE_SOLARIS_TARGET)
......@@ -72,4 +72,3 @@ COPY_FILES += $(SAMPLE_TARGET)
all: $(COPY_FILES)
.PHONY: all
......@@ -32,6 +32,10 @@ default: all
include Tools.gmk
#
# This makefile...so that altering will trigger rebuilding include/exclude-lists => jars
#
MAKEFILE=$(JDK_TOPDIR)/makefiles/CreateJars.gmk
MAINMANIFEST := $(JDK_TOPDIR)/make/tools/manifest.mf
BEANMANIFEST := $(JDK_TOPDIR)/make/javax/swing/beaninfo/manifest
......@@ -46,7 +50,7 @@ JCONSOLE_JAR_DEPS := \
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
SRCS:=$(JDK_OUTPUTDIR)/classes,\
SUFFIXES:=.class .gif .png,\
SUFFIXES:=.class .gif .png .properties,\
INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
JARMAIN:=sun.tools.jconsole.JConsole,\
JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
......@@ -242,12 +246,35 @@ RT_JAR_EXCLUDES := \
sun/swing/BeanInfoUtils.class \
$(LOCALEDATA_INCLUDES)
ifndef OPENJDK
ifndef JAVASE_EMBEDDED
# These files should never be put into rt.jar
# but due to a misstake...some are put there if embedded
#
ifneq ($(JAVASE_EMBEDDED), true)
# normal (correct) case
RT_JAR_EXCLUDES += \
com/oracle/jrockit/jfr \
oracle/jrockit/jfr
else
# embedded (broken) case
RT_JAR_EXCLUDES += \
oracle/jrockit/jfr/parser \
oracle/jrockit/jfr/tools \
oracle/jrockit/jfr/NativeOptions.class \
oracle/jrockit/jfr/RepositoryChunkHandler.class
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
RT_JAR_EXCLUDES += com/sun/nio/sctp \
sun/nio/ch/sctp \
sun/jdbc \
sun/nio/ch/DevPollArrayWrapper\$$$$Updator.class \
sun/nio/ch/DevPollArrayWrapper.class \
sun/nio/ch/DevPollSelectorImpl.class \
sun/nio/ch/DevPollSelectorProvider.class \
sun/nio/ch/EPollArrayWrapper\$$$$Updator.class \
sun/nio/ch/EPollArrayWrapper.class \
sun/nio/ch/EPollSelectorImpl.class \
sun/nio/ch/EPollSelectorProvider.class
endif
# Find all files in the classes dir to use as dependencies. This could be more fine granular.
......@@ -271,12 +298,19 @@ $(RESOURCE_JAR_MANIFEST_FILE): $(MAINMANIFEST)
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" \
$(MAINMANIFEST) >> $@
$(JDK_OUTPUTDIR)/lib/_the.jars.exclude:
$(JDK_OUTPUTDIR)/lib/_the.jars.exclude: $(MAKEFILE)
$(MKDIR) -p $(@D)
$(call ListPathsSafely,RT_JAR_EXCLUDES,\n, >> $@)
$(JDK_OUTPUTDIR)/lib/classlist : $(JDK_TOPDIR)/make/tools/sharing/classlist.$(OPENJDK_TARGET_OS) \
$(MAKEFILE)
$(MKDIR) -p $(@D)
$(RM) -f $@.temp
$(TOOL_ADDJSUM) $< $@.temp
$(MV) $@.temp $@
$(JDK_OUTPUTDIR)/lib/_the.jars.contents: $(BUILD_TOOLS) $(JDK_OUTPUTDIR)/lib/_the.jars.exclude \
$(ALL_FILES_IN_CLASSES)
$(ALL_FILES_IN_CLASSES) $(JDK_OUTPUTDIR)/lib/classlist
$(MKDIR) -p $(@D)
$(RM) $@.temp
($(CD) $(JDK_OUTPUTDIR)/classes && \
......@@ -290,17 +324,22 @@ $(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents: $(JDK_OUTPUTDIR)/lib/_the.jars.conten
$(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents: $(JDK_OUTPUTDIR)/lib/_the.jars.contents
$(GREP) -v -e '\.class$$' -e '/_the\.*' -e '^_the\.*' $(JDK_OUTPUTDIR)/lib/_the.jars.contents > $@
RT_JAR_CREATE_OPTIONS := c0fm
ifeq ($(COMPRESS_JARS), true)
RT_JAR_CREATE_OPTIONS := cfm
endif
$(JDK_OUTPUTDIR)/lib/rt.jar: $(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents $(RT_JAR_MANIFEST_FILE)
$(ECHO) Creating rt.jar
$(CD) $(JDK_OUTPUTDIR)/classes && \
$(JAR) cfm $@ $(RT_JAR_MANIFEST_FILE) \
$(JAR) $(RT_JAR_CREATE_OPTIONS) $@ $(RT_JAR_MANIFEST_FILE) \
@$(JDK_OUTPUTDIR)/lib/_the.rt.jar.contents
$(JDK_OUTPUTDIR)/lib/resources.jar: $(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents \
$(RESOURCE_JAR_MANIFEST_FILE)
$(ECHO) Creating resources.jar
$(CD) $(JDK_OUTPUTDIR)/classes && \
$(JAR) cfm $@ $(RESOURCE_JAR_MANIFEST_FILE) \
$(JAR) $(RT_JAR_CREATE_OPTIONS) $@ $(RESOURCE_JAR_MANIFEST_FILE) \
@$(JDK_OUTPUTDIR)/lib/_the.resources.jar.contents
JARS+=$(JDK_OUTPUTDIR)/lib/rt.jar $(JDK_OUTPUTDIR)/lib/resources.jar
......@@ -309,7 +348,7 @@ JARS+=$(JDK_OUTPUTDIR)/lib/rt.jar $(JDK_OUTPUTDIR)/lib/resources.jar
CHARSETS_JAR_DEPS :=
ifneq ($(HOST_OS), windows)
ifneq ($(OPENJDK_TARGET_OS), windows)
CHARSETS_EXTRA_FILES:=sun/awt/motif/X11GBK.class \
sun/awt/motif/X11GB2312\$$$$Decoder.class \
sun/awt/motif/X11GB2312.class \
......@@ -328,20 +367,22 @@ $(eval $(call SetupArchive,BUILD_CHARSETS_JAR,$(CHARSETS_JAR_DEPS),\
$(CHARSETS_EXTRA_FILES) \
META-INF/services/java.nio.charset.spi.CharsetProvider, \
JAR:=$(JDK_OUTPUTDIR)/lib/charsets.jar, \
SKIP_METAINF := true))
SKIP_METAINF := true, \
CHECK_COMPRESS_JAR:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/charsets.jar
##########################################################################################
ifndef OPENJDK
ifeq ($(ENABLE_JFR), true)
$(eval $(call SetupArchive,BUILD_JFR_JAR,,\
SRCS:=$(JDK_OUTPUTDIR)/classes,\
INCLUDES:=com/oracle/jrockit/jfr \
oracle/jrockit/jfr,\
JAR:=$(JDK_OUTPUTDIR)/lib/jfr.jar,\
SKIP_METAINF:=true,\
MANIFEST:=$(MAINMANIFEST)))
MANIFEST:=$(MAINMANIFEST), \
CHECK_COMPRESS_JAR:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/jfr.jar
endif
......@@ -356,13 +397,14 @@ $(eval $(call SetupArchive,BUILD_JSSE_JAR,,\
com/sun/net/ssl/internal/ssl,\
JAR:=$(JDK_OUTPUTDIR)/lib/jsse.jar,\
SKIP_METAINF:=true,\
MANIFEST:=$(MAINMANIFEST)))
MANIFEST:=$(MAINMANIFEST), \
CHECK_COMPRESS_JAR:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/jsse.jar
##########################################################################################
ifneq ($(PLATFORM)-$(ARCH_DATA_MODEL),windows-64)
ifneq ($(OPENJDK_TARGET_OS)-$(ARCH_DATA_MODEL),windows-64)
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
ifndef OPENJDK
......@@ -544,7 +586,7 @@ endif
##########################################################################################
ifeq ($(PLATFORM),windows)
ifeq ($(OPENJDK_TARGET_OS),windows)
SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
......@@ -574,7 +616,7 @@ endif
##########################################################################################
ifeq ($(PLATFORM),solaris)
ifeq ($(OPENJDK_TARGET_OS),solaris)
ifndef OPENJDK
UCRYPTO_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/ucrypto.jar
......@@ -661,7 +703,8 @@ $(eval $(call SetupArchive,BUILD_TOOLS_JAR,$(TOOLS_JAR_DEPS),\
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
META-INF/services/com.sun.tools.internal.xjc.Plugin,\
JAR:=$(JDK_OUTPUTDIR)/lib/tools.jar,\
SKIP_METAINF:=true))
SKIP_METAINF:=true, \
CHECK_COMPRESS_JAR:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/tools.jar
......@@ -696,6 +739,7 @@ EXPORTED_PRIVATE_PKGS = com.sun.servicetag \
com.oracle.nio
$(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(JDK_OUTPUTDIR)/lib/rt.jar
$(RM) -rf $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
$(JAVA) \
-Xbootclasspath/a:$(JDK_OUTPUTDIR)/classes \
......@@ -711,7 +755,8 @@ MAKE_SURE_DIR_EXISTS_DUMMY := $(shell $(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols)
$(eval $(call SetupArchive,BUILD_CT_SYM,$(IMAGES_OUTPUTDIR)/symbols/_the.symbols,\
SRCS:=$(IMAGES_OUTPUTDIR)/symbols,\
INCLUDES:=META-INF/sym,\
JAR:=$(JDK_OUTPUTDIR)/lib/ct.sym))
JAR:=$(JDK_OUTPUTDIR)/lib/ct.sym, \
CHECK_COMPRESS_JAR:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/ct.sym
......@@ -765,7 +810,7 @@ SRC_ZIP_INCLUDES = \
org/xml/sax \
sunw
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
......@@ -776,16 +821,16 @@ endif
# Need to copy launcher src files into desired directory structure
# before zipping the sources.
LAUNCHER_SRC_FILES := $(wildcard $(JDK_TOPDIR)/src/share/bin/*) \
$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/java_md*)
$(wildcard $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/java_md*)
LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/%,$(IMAGES_OUTPUTDIR)/src/launcher/%,\
$(LAUNCHER_SRC_FILES)))
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
$(MKDIR) -p $(@D)
$(CP) $< $@
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/bin/%
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/bin/%
$(MKDIR) -p $(@D)
$(CP) $< $@
......
......@@ -35,10 +35,10 @@
#
TEXT_SRCDIR = $(JDK_TOPDIR)/src/share/classes
TEXT_PKG = sun/text/resources
TEXT_SOURCES = %$(TEXT_PKG)/BreakIteratorRules.java \
%$(TEXT_PKG)/BreakIteratorInfo.java \
%$(TEXT_PKG)/BreakIteratorRules_th.java \
%$(TEXT_PKG)/BreakIteratorInfo_th.java
TEXT_SOURCES = $(TEXT_PKG)/BreakIteratorRules.java \
$(TEXT_PKG)/BreakIteratorInfo.java \
$(TEXT_PKG)/BreakIteratorRules_th.java \
$(TEXT_PKG)/BreakIteratorInfo_th.java
# Generate BreakIteratorData
BREAK_ITERATOR_DIR = $(JDK_OUTPUTDIR)/break_iterator
......
......@@ -25,13 +25,13 @@
GENDATA_FONT_CONFIG_DST := $(JDK_OUTPUTDIR)/lib
ifeq ($(PLATFORM), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/windows/classes/sun/awt/windows
GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
GENDATA_FONT_CONFIG_SRC_PREFIX :=
endif
ifeq ($(PLATFORM), linux)
ifeq ($(OPENJDK_TARGET_OS), linux)
GENDATA_FONT_CONFIG_SRC_PREFIX := linux.
ifdef OPENJDK
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
......@@ -52,27 +52,29 @@ GENDATA_FONT_CONFIG_SRC_FILES := \
endif
endif
ifeq ($(PLATFORM), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/fontconfigs
GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
GENDATA_FONT_CONFIG_SRC_PREFIX := solaris.
endif
ifeq ($(PLATFORM), macosx)
ifeq ($(OPENJDK_TARGET_OS), macosx)
GENDATA_FONT_CONFIG_SRC_DIR := $(JDK_TOPDIR)/src/macosx/classes/sun/awt/fontconfigs
GENDATA_FONT_CONFIG_SRC_FILES := fontconfig.properties
GENDATA_FONT_CONFIG_SRC_PREFIX := macosx.
endif # PLATFORM
endif # OPENJDK_TARGET_OS
###
$(GENDATA_FONT_CONFIG_DST)/%.src : $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%
$(MKDIR) -p $(@D)
$(CP) $< $@
$(CHMOD) 644 $@
$(GENDATA_FONT_CONFIG_DST)/%.bfc : $(GENDATA_FONT_CONFIG_SRC_DIR)/$(GENDATA_FONT_CONFIG_SRC_PREFIX)%.properties
$(MKDIR) -p $(@D)
$(TOOL_COMPILEFONTCONFIG) $< $@
$(CHMOD) 444 $@
###
......
......@@ -32,5 +32,4 @@ $(HTML32DTD): $(BUILD_TOOLS)
$(RM) $@
($(TOOL_DTDBUILDER) html32 > $@) || exit 1
GENDATA_HTML32DTD += $(HTML32DTD)
GENDATA_HTML32DTD += $(HTML32DTD)
\ No newline at end of file
......@@ -27,7 +27,13 @@ default: all
include $(SPEC)
include MakeBase.gmk
include RMICompile.gmk
include RMICompilation.gmk
# To ensure the latest stub generator files are picked up from corba repo
# when available, we need to run with latest rmic version available.
ifeq ($(CROSS_COMPILE_ARCH),)
RMIC := $(UNCYGDRIVE) $(JDK_OUTPUTDIR)/bin/rmic
endif
CLASSES_DIR := $(JDK_OUTPUTDIR)/classes
# NOTE: If the smart javac dependency management is reintroduced, these classes risk
......
......@@ -69,6 +69,7 @@ $(GENDATA_CURDATA): $(JDK_TOPDIR)/src/share/classes/java/util/CurrencyData.prope
$(RM) $@
$(TOOL_GENERATECURRENCYDATA) -o $@.temp < $<
$(MV) $@.temp $@
$(CHMOD) 444 $@
GENDATA += $(GENDATA_CURDATA)
......
......@@ -65,7 +65,7 @@ GENSRC += $(GENSRC_BUFFER)
include GensrcExceptions.gmk
GENSRC += $(GENSRC_EXCEPTIONS)
ifneq ($(HOST_OS),windows)
ifneq ($(OPENJDK_TARGET_OS),windows)
include GensrcIcons.gmk
GENSRC += $(GENSRC_ICONS)
......@@ -78,6 +78,11 @@ ifndef DISABLE_NIMBUS
GENSRC += $(GENSRC_SWING_NIMBUS)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
include GensrcJObjC.gmk
GENSRC += $(GENSRC_JOBJC)
endif
$(GENSRC) : $(BUILD_TOOLS)
# The exception handling of swing beaninfo
......@@ -100,7 +105,10 @@ all: $(GENSRC) $(GENSRC_SWING_BEANINFO)
$(MKDIR) -p gensrc/javax/swing/plaf && \
$(CP) -rp gensrc_swing/javax/swing/plaf/* gensrc/javax/swing/plaf) \
fi
ifneq ($(HOST_OS),windows)
if [ -d $(JDK_OUTPUTDIR)/gensrc_jobjc ] ; then \
(cd $(JDK_OUTPUTDIR) && cp -rp gensrc_jobjc/src/* gensrc) \
fi
ifneq ($(OPENJDK_TARGET_OS),windows)
(cd $(JDK_OUTPUTDIR) && \
$(CP) -rp gensrc_icons/* gensrc && \
$(CP) -rp gensrc_x11wrappers/classes/* gensrc)
......
......@@ -198,6 +198,7 @@ define SetupGenBuffer
$(if $(12),$1_$(strip $(12)))
$(if $(13),$1_$(strip $(13)))
$(if $(14),$1_$(strip $(14)))
$(if $(15),$(error Internal makefile error: Too many arguments to SetupGenBuffer, please update GensrcBuffer.gmk))
$(call fixRw,$1,$$($1_RW))
$(call typesAndBits,$1,$$($1_type),$$($1_BO))
......
......@@ -29,7 +29,7 @@ GENSRC_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc_icons
GENSRC_ICONS_DST := $(GENSRC_ICONS_TMP)/sun/awt/X11
ifdef OPENJDK
ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)
ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)
else
ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
endif
......@@ -41,7 +41,7 @@ GENSRC_ICONS_SRC += \
$(ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
ICONPATH := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/awt/X11
ICONPATH := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/awt/X11
GENSRC_ICONS_SRC += \
$(ICONPATH)/security-icon-bw16.png \
......@@ -86,7 +86,7 @@ $$($1_TARGET32) : $2/$1 $(GENSRC_ICONS_TMP)/_the.dir
$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
$(ECHO) "public static int[] $$($1_SHORTNAME) = { " >> $$@.tmp
# TODO FIX FIX FIX
ifneq ($(PLATFORM),macosx)
ifneq ($(OPENJDK_TARGET_OS),macosx)
$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
endif
$(ECHO) "}; }" >> $$@.tmp
......@@ -100,7 +100,7 @@ $$($1_TARGET64) : $2/$1 $(GENSRC_ICONS_TMP)/_the.dir
$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
$(ECHO) "public static long[] $$($1_SHORTNAME) = { " >> $$@.tmp
# TODO FIX FIX FIX
ifneq ($(PLATFORM),macosx)
ifneq ($(OPENJDK_TARGET_OS),macosx)
$(CAT) $$< | $(TOOL_TOBIN) >> $$@.tmp
endif
$(ECHO) "}; }" >> $$@.tmp
......
......@@ -23,20 +23,58 @@
# questions.
#
include $(SPEC)
include MakeBase.gmk
GENSRC_JOBJC :=
all: $(JDK_OUTPUTDIR)/_the.legacy_make
JOBJC_FRAMEWORKS := Foundation CoreFoundation AppKit
FRAMEWORKS_DIR := /System/Library/Frameworks
GBM := /usr/bin/gen_bridge_metadata
DEPS:= $(shell $(FIND) $(JDK_TOPDIR)/makefiles/java -type f) \
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/javax -type f) \
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/sun -type f) \
$(shell $(FIND) $(JDK_TOPDIR)/makefiles/com -type f)
JOBJC_SRC := $(JDK_TOPDIR)/src/macosx/native/jobjc
JOBJC_TMP := $(JDK_OUTPUTDIR)/gensrc_jobjc
JOBJC_DST := $(JDK_OUTPUTDIR)/gensrc_jobjc/src
$(JDK_OUTPUTDIR)/_the.legacy_make: $(DEPS)
(echo Building single threaded Java subdir && \
$(MAKE) -j1 -C java all && \
touch $@)
#
# Build generator
#
$(eval $(call SetupJavaCompilation,BUILD_JOBJC_PRIMITIVE_CODER,\
SETUP:=GENERATE_OLDBYTECODE,\
INCLUDES:=core/java \
com/apple,\
HEADERS :=$(JOBJC_DST)/jni_headers/core ,\
SRC:=$(JOBJC_SRC)/src \
$(JOBJC_SRC)/src/generator/java, \
BIN:=$(JOBJC_TMP)/bin))
GENSRC_JOBJC += $(JOBJC_TMP)/bin/_the.batch
#
# Generate bridge support
#
BRIDGESUPPORT := $(addprefix $(JOBJC_TMP)/bridge/,$(addsuffix Full.bridgesupport,$(JOBJC_FRAMEWORKS)))
$(JOBJC_TMP)/bridge/%Full.bridgesupport : $(FRAMEWORKS_DIR)/%.framework/Headers/*.h
$(MKDIR) -p $(@D)
if [ -f $(FRAMEWORKS_DIR)/$*.framework/Resources/BridgeSupport/$(@F) ]; then \
cp $(FRAMEWORKS_DIR)/$*.framework/Resources/BridgeSupport/$(@F) $@ ;\
else \
$(GBM) -F complete --framework $* -o $@ ; \
fi
#
# Find Xbootclasspath
#
$(JOBJC_TMP)/_the.generator_bootclasspath : $(JOBJC_TMP)/bin/_the.batch
$(JAVA) -cp $(JOBJC_TMP)/bin com.apple.internal.jobjc.generator.BootClassPathMinus JObjC.jar > $@.tmp
$(MV) $@.tmp $@
#
# Run generator
#
TOOL_JOBJC := $(JAVA) -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator
.PHONY: all
$(JOBJC_TMP)/_the.generator : $(JOBJC_TMP)/bin/_the.batch $(JOBJC_TMP)/_the.generator_bootclasspath $(BRIDGESUPPORT)
$(JAVA) -d64 -Xbootclasspath:`$(CAT) $(JOBJC_TMP)/_the.generator_bootclasspath` -cp $(JOBJC_TMP)/bin -ea com.apple.internal.jobjc.generator.Generator dst=$(JOBJC_DST) frameworks=$(JOBJC_TMP)/bridge
$(TOUCH) $@
GENSRC_JOBJC += $(JOBJC_TMP)/_the.generator
......@@ -53,9 +53,9 @@ GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/tools/jconsole/Version.java
##########################################################################################
ifeq ($(HOST_OS_API),posix)
UPSUFFIX:=$(PLATFORM)
ifeq ($(PLATFORM),macosx)
ifeq ($(OPENJDK_TARGET_OS_API),posix)
UPSUFFIX:=$(OPENJDK_TARGET_OS)
ifeq ($(OPENJDK_TARGET_OS),macosx)
UPSUFFIX:=bsd
endif
# UNIXProcess.java is different for solaris and linux. We need to copy
......@@ -64,7 +64,7 @@ ifeq ($(HOST_OS_API),posix)
$(JDK_OUTPUTDIR)/gensrc_misc/java/lang/UNIXProcess.java : \
$(JDK_TOPDIR)/src/solaris/classes/java/lang/UNIXProcess.java.$(UPSUFFIX)
$(MKDIR) -p $(@D)
$(ECHO) Copying UNIXProcess.java.$(PLATFORM) to java/lang/UNIXProcess.java
$(ECHO) Copying UNIXProcess.java.$(OPENJDK_TARGET_OS) to java/lang/UNIXProcess.java
$(CP) $< $@
$(CHMOD) u+rw $@
......@@ -74,8 +74,8 @@ endif
##########################################################################################
ifndef OPENJDK
ifneq ($(PLATFORM), windows)
ifneq ($(PLATFORM), macosx)
ifneq ($(OPENJDK_TARGET_OS), windows)
ifneq ($(OPENJDK_TARGET_OS), macosx)
# These file(s) are needed for building fake .so libs on !windows for jdbcodbc
$(JDK_OUTPUTDIR)/gensrc_c/libjdbcodbc/dummyodbc1.c :
......@@ -101,85 +101,98 @@ GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java
GENSRC_SOR_SRC := $(JDK_TOPDIR)/src/share/native/sun/nio/ch
GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genSocketOptionRegistry
GENSRC_SOR_EXE := $(GENSRC_SOR_BIN)/genSocketOptionRegistry$(EXE_SUFFIX)
GENSRC_SOR_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genSocketOptionRegistry
SOR_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOR_SRC)/$(GENSRC_SOR_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(GENSRC_SOR_EXE)
$(MKDIR) -p $(@D)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
$(GENSRC_SOR_EXE) >> $@.tmp
$(MV) $@.tmp $@
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE,\
SRC:=$(GENSRC_SOR_SRC),\
INCLUDE_FILES:=$(GENSRC_SOR_SRC_FILE),\
LANG:=C,\
CFLAGS:=$(CFLAGS_JDKLIB),\
BIN:=$(GENSRC_SOR_BIN),\
EXE:=$(GENSRC_SOR_EXE)))
CC:=$(HOST_CC),\
LDEXE:=$(HOST_LD),\
OBJECT_DIR:=$(GENSRC_SOR_BIN),\
OUTPUT_DIR:=$(GENSRC_SOR_BIN),\
PROGRAM:=genSocketOptionRegistry))
ifneq ($(JAVASE_EMBEDDED), true)
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(BUILD_GENSRC_SOR_EXE)
$(MKDIR) -p $(@D)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/ch/SocketOptionRegistry.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
$(MKDIR) -p $(@D)
$(CP) $< $@
endif
##########################################################################################
ifneq ($(PLATFORM),windows)
ifneq ($(OPENJDK_TARGET_OS),windows)
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java
GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
GENSRC_UC_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/fs
GENSRC_UC_SRC_FILE := genUnixConstants.c
GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genUnixConstants
GENSRC_UC_EXE := $(GENSRC_UC_BIN)/genUnixConstants$(EXE_SUFFIX)
GENSRC_UC_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genUnixConstants
UC_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_UC_SRC)/$(GENSRC_UC_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(GENSRC_UC_EXE)
$(MKDIR) -p $(@D)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
$(GENSRC_UC_EXE) >> $@.tmp
$(MV) $@.tmp $@
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_UC_EXE,\
SRC:=$(GENSRC_UC_SRC),\
INCLUDE_FILES:=$(GENSRC_UC_SRC_FILE),\
LANG:=C,\
CFLAGS:=$(CFLAGS_JDKLIB),\
BIN:=$(GENSRC_UC_BIN),\
EXE:=$(GENSRC_UC_EXE)))
CC:=$(HOST_CC),\
LDEXE:=$(HOST_CC),\
OBJECT_DIR:=$(GENSRC_UC_BIN),\
OUTPUT_DIR:=$(GENSRC_UC_BIN),\
PROGRAM:=genUnixConstants))
ifneq ($(JAVASE_EMBEDDED), true)
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(BUILD_GENSRC_UC_EXE)
$(MKDIR) -p $(@D)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_UC_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/UnixConstants.java : $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java
$(MKDIR) -p $(@D)
$(CP) $< $@
endif
endif
##########################################################################################
ifeq ($(PLATFORM),solaris)
ifeq ($(OPENJDK_TARGET_OS),solaris)
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java
GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/native/sun/nio/fs
GENSRC_SOL_SRC := $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/sun/nio/fs
GENSRC_SOL_SRC_FILE := genSolarisConstants.c
GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/objs/gensrc/genSolarisConstants
GENSRC_SOL_EXE := $(GENSRC_SOL_BIN)/genSolarisConstants$(EXE_SUFFIX)
GENSRC_SOL_BIN := $(JDK_OUTPUTDIR)/gensrc_misc/genSolarisConstants
SOL_COPYRIGHT_YEARS = $(shell $(CAT) $(GENSRC_SOL_SRC)/$(GENSRC_SOL_SRC_FILE) | \
$(NAWK) '/^.*Copyright.*Oracle/ { printf "%s %s",$$4,$$5 }')
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java : $(GENSRC_SOL_EXE)
$(MKDIR) -p $(@D)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
$(GENSRC_SOL_EXE) >> $@.tmp
$(MV) $@.tmp $@
$(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOL_EXE,\
SRC:=$(GENSRC_SOL_SRC),\
INCLUDE_FILES:=$(GENSRC_SOL_SRC_FILE),\
LANG:=C,\
CFLAGS:=$(CFLAGS_JDKLIB),\
BIN:=$(GENSRC_SOL_BIN),\
EXE:=$(GENSRC_SOL_EXE)))
CC:=$(HOST_CC),\
LDEXE:=$(HOST_CC),\
OBJECT_DIR:=$(GENSRC_SOL_BIN),\
OUTPUT_DIR:=$(GENSRC_SOL_BIN),\
PROGRAM:=genSolarisConstants))
$(JDK_OUTPUTDIR)/gensrc_misc/sun/nio/fs/SolarisConstants.java : $(BUILD_GENSRC_SOL_EXE)
$(MKDIR) -p $(@D)
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/makefiles/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_SOL_EXE) >> $@.tmp
$(MV) $@.tmp $@
endif
......@@ -46,7 +46,7 @@ define add_properties_to_compile
# Strip away prefix and suffix,
# leaving for example: sun/util/resources/CurrencyNames_sv
$1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/%.properties,%,\
$1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/%.properties,%,\
$$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2))
# Apply optional name transformation, example: hz_TW -> hz_HK
......@@ -75,7 +75,7 @@ define add_properties_to_clean
# Strip away prefix and suffix,
# leaving for example: sun/util/resources/CurrencyNames_sv
$1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/%.properties,%,\
$1_PROPPATHS:=$$(patsubst $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/%.properties,%,\
$$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties,%,$2))
# Apply optional name transformation, example: hz_TW -> hz_HK
......@@ -124,7 +124,7 @@ $(eval $(call add_properties_to_compile,COM_SUN_ACCESSIBILITY_HK,\
$(eval $(call add_properties_to_clean,COM_SUN_IMAGEIO,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/imageio -name "*.properties")))
#com/sun/java/swing/plaf/gtk/resources
ifneq ($(PLATFORM), windows)
ifneq ($(OPENJDK_TARGET_OS), windows)
# Only compile GTK resource bundles on Solaris/Linux
$(eval $(call add_properties_to_compile,COM_SUN_SWING_PLAF_GTK,\
$(shell find $(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources -name "*.properties"),\
......@@ -264,6 +264,10 @@ $(eval $(call add_properties_to_compile,SUN_TOOLS_JAR_HK,\
$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/javac/resources -name "javac.properties")))
#sun/tools/jconsole/resources
$(eval $(call add_properties_to_clean,SUN_TOOLS_JCONSOLE,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/resources -name "*.properties")))
#sun/tools/serialver
$(eval $(call add_properties_to_clean,SUN_TOOLS_SERIALVER,\
$(shell find $(JDK_TOPDIR)/src/share/classes/sun/tools/serialver -name "*.properties"),,,resources))
......
......@@ -30,10 +30,10 @@ GENSRC_SIZER_SRC := $(JDK_TOPDIR)/src/solaris/classes/sun/awt/X11/generator
GENSRC_SIZES :=
ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
GENSRC_SIZES := sizes.32 sizes.64
else ifeq ($(PLATFORM), solaris)
isalist:=$(shell $(ISAINFO))
else ifeq ($(OPENJDK_TARGET_OS), solaris)
isalist:=$(shell isainfo)
ifneq (,$(findstring sparcv9, $(isalist)))
# On sparcv9 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL.
GENSRC_SIZES := sizes.32 sizes.64
......@@ -46,7 +46,7 @@ GENSRC_SIZES := sizes.32
endif # amd64
endif # sparcv9
else # !solaris
ifeq ($(PLATFORM), macosx)
ifeq ($(OPENJDK_TARGET_OS), macosx)
GENSRC_SIZES := sizes.32 sizes.64
else # !macosx
GENSRC_SIZES := sizes.$(ARCH_DATA_MODEL)
......@@ -62,18 +62,23 @@ $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c : $(GENSRC_SIZER_SRC)/xlibtypes.txt
$(TOOL_WRAPPERGENERATOR) $(@D) $< "sizer" $*
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.exe : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.%.c
(cd $(@D) && $(CC) -m$* -o $@ $< $(CFLAGS_JDKLIB) \
(cd $(@D) && $(HOST_CC) -m$* -o $@ $< \
-I$(JDK_OUTPUTDIR)/include \
-I$(JDK_TOPDIR)/src/share/javavm/export \
-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/javavm/export \
-I$(JDK_TOPDIR)//src/share/native/common \
-I$(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/native/common \
-I$(JDK_TOPDIR)/src/solaris/native/sun/awt \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/debug \
-I$(JDK_TOPDIR)/src/share/native/sun/awt/image/cvutils -lc)
ifeq ($(PLATFORM)-$(LIBARCH), solaris-i386)
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-i386)
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.32 : $(GENSRC_X11WRAPPERS_TMP)/sizer/sizer.32.exe
$< > $@.tmp
$(MV) $@.tmp $@
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/$(LEGACY_HOST_OS_API)/classes/sun/awt/X11/generator/sizes.64-$(PLATFORM)-$(LIBARCH)
$(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 : $(JDK_TOPDIR)/src/$(LEGACY_OPENJDK_TARGET_OS_API)/classes/sun/awt/X11/generator/sizes.64-$(OPENJDK_TARGET_OS)-$(LIBARCH)
$(MKDIR) -p $(@D)
$(CP) $< $@
else
......@@ -88,9 +93,9 @@ $(GENSRC_X11WRAPPERS_TMP)/classes/_the.classes : $(foreach S,$(GENSRC_SIZES),$(G
$(MKDIR) -p $(@D)/sun/awt/X11
$(RM) $(@D)/sun/awt/X11/*
$(TOOL_WRAPPERGENERATOR) $(@D)/sun/awt/X11 $(GENSRC_SIZER_SRC)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes
ifeq ($(PLATFORM)-$(LIBARCH), solaris-amd64)
$(ECHO) COMPARING $@ and $(GENSRC_SIZER_SRC)/sizes.64-$(PLATFORM)-i386
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-$(PLATFORM)-i386
ifeq ($(OPENJDK_TARGET_OS)-$(LIBARCH), solaris-amd64)
$(ECHO) COMPARING $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 and $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
$(DIFF) $(GENSRC_X11WRAPPERS_TMP)/sizer/sizes.64 $(GENSRC_SIZER_SRC)/sizes.64-$(OPENJDK_TARGET_OS)-i386
endif
$(TOUCH) $@
......
......@@ -34,15 +34,20 @@ include Tools.gmk
images: jre-image jdk-image
ifeq ($(HOST_OS),solaris)
ifeq ($(OPENJDK_TARGET_OS),solaris)
define install-file
$(MKDIR) -p $(@D)
$(CP) -r -P '$<' '$(@D)'
$(CP) -f -r -P '$<' '$(@D)'
endef
else ifeq ($(OPENJDK_TARGET_OS),macosx)
define install-file
$(MKDIR) -p $(@D)
$(CP) -fpRP '$<' '$@'
endef
else
define install-file
$(MKDIR) -p $(@D)
$(CP) -P '$<' '$@'
$(CP) -fP '$<' '$@'
endef
endif
......@@ -67,7 +72,7 @@ $(JDK_IMAGE_DIR)/jre/bin/%: $(JDK_OUTPUTDIR)/bin/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
NOT_JRE_BIN_FILES = \
NOT_JRE_BIN_FILES := \
appletviewer$(EXE_SUFFIX) \
extcheck$(EXE_SUFFIX) \
idlj$(EXE_SUFFIX) \
......@@ -107,7 +112,12 @@ WINDOWS_JDK_BIN_FILES = \
# Find all files in bin dir
ALL_BIN_LIST := $(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f)
ifeq ($(HOST_OS),windows)
# For unknown reason the debuginfo files for binaries are not put into images
# e.g filter them out
ALL_BIN_LIST := $(filter-out %.debuginfo %.diz, $(ALL_BIN_LIST))
ifeq ($(OPENJDK_TARGET_OS),windows)
JDK_BIN_LIST := $(filter $(addprefix %,$(WINDOWS_JDK_BIN_FILES)), $(ALL_BIN_LIST))
else
JDK_BIN_LIST := $(ALL_BIN_LIST)
......@@ -147,7 +157,7 @@ NOT_JRE_LIB_FILES := \
ct.sym
JDK_LIB_FILES := $(NOT_JRE_LIB_FILES)
ifeq ($(HOST_OS), linux)
ifeq ($(OPENJDK_TARGET_OS), linux)
JDK_LIB_FILES += jexec
endif
......@@ -236,14 +246,21 @@ JDK_MAN_PAGES = \
wsimport.1 \
xjc.1
ifeq ($(HOST_OS), linux)
ifeq ($(OPENJDK_TARGET_OS), linux)
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/linux/doc
MAN1_SUBDIR:=man
endif
ifeq ($(HOST_OS), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/solaris/doc
MAN1_SUBDIR:=sun/man/man1
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
MAN_SRC_DIR:=$(JDK_TOPDIR)/src/bsd/doc
MAN1_SUBDIR:=man
JDK_MAN_PAGES := $(filter-out jcmd.1, $(JDK_MAN_PAGES))
JDK_MAN_PAGES := $(filter-out jvisualvm.1, $(JDK_MAN_PAGES))
endif
$(JRE_IMAGE_DIR)/man/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
......@@ -286,7 +303,7 @@ $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(call install-ja-manpage,PCK)
ifeq ($(HOST_OS), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JRE_IMAGE_DIR)/man/ja/man1/%: $(MAN_SRC_DIR)/$(MAN1_SUBDIR)/ja/%
$(ECHO) Converting $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
......@@ -302,7 +319,7 @@ $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/jcmd.1 $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1
$(MKDIR) -p $(@D)
$(TOUCH) $@
ifeq ($(HOST_OS), linux)
ifeq ($(OPENJDK_TARGET_OS), linux)
$(JRE_IMAGE_DIR)/man/ja:
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
......@@ -312,7 +329,17 @@ ifeq ($(HOST_OS), linux)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
endif
ifeq ($(HOST_OS), linux)
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(JRE_IMAGE_DIR)/man/ja:
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
$(JDK_IMAGE_DIR)/man/ja:
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(CD) $(@D) && $(RM) ja && $(LN) -s ja_JP.UTF-8 ja
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
$(JRE_IMAGE_DIR)/man/ja
......@@ -322,7 +349,7 @@ ifeq ($(HOST_OS), linux)
$(JDK_IMAGE_DIR)/man/ja
endif
ifeq ($(HOST_OS), solaris)
ifeq ($(OPENJDK_TARGET_OS), solaris)
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja/man1/,$(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
......@@ -334,6 +361,16 @@ ifeq ($(HOST_OS), solaris)
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.PCK/man1/,$(JDK_MAN_PAGES))
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
JRE_MAN_PAGE_LIST := $(addprefix $(JRE_IMAGE_DIR)/man/man1/,$(JRE_MAN_PAGES)) \
$(addprefix $(JRE_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JRE_MAN_PAGES)) \
$(JRE_IMAGE_DIR)/man/ja
JDK_MAN_PAGE_LIST := $(addprefix $(JDK_IMAGE_DIR)/man/man1/,$(JDK_MAN_PAGES)) \
$(addprefix $(JDK_IMAGE_DIR)/man/ja_JP.UTF-8/man1/,$(JDK_MAN_PAGES)) \
$(JDK_IMAGE_DIR)/man/ja
endif
################################################################################
# /demo dir
......@@ -383,6 +420,7 @@ ifndef OPENJDK
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html
$(ECHO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
$(install-file)
$(CHMOD) 644 $(@)
JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%,$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped,\
$(shell $(FIND) $(JDK_TOPDIR)/src/closed/share/db -name "*.zip" ! -name "*demo*")) \
......@@ -411,7 +449,7 @@ ifdef OPENJDK
else
JRE_DOC_FILES := COPYRIGHT Welcome.html LICENSE THIRDPARTYLICENSEREADME.txt
JDK_DOC_FILES := COPYRIGHT README.html LICENSE THIRDPARTYLICENSEREADME.txt
ifeq ($(HOST_OS), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
JRE_DOC_FILES += README.txt
else
JRE_DOC_FILES += README
......@@ -432,32 +470,39 @@ JDK_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/,$(JDK_DOC_FILES))
$(JRE_IMAGE_DIR)/%: $(JRE_DOC_LOCATION)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(CHMOD) 444 $(@)
$(JDK_IMAGE_DIR)/jre/%: $(JRE_DOC_LOCATION)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(CHMOD) 444 $(@)
$(JRE_IMAGE_DIR)/README.txt: $(JRE_DOC_LOCATION)/README
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
$(CP) $< $@
$(CHMOD) 444 $(@)
$(JDK_IMAGE_DIR)/jre/README.txt: $(JRE_DOC_LOCATION)/README
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(MKDIR) -p $(@D)
$(CP) $< $@
$(CHMOD) 444 $(@)
$(JDK_IMAGE_DIR)/%: $(JDK_DOC_LOCATION)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(CHMOD) 444 $(@)
$(JDK_IMAGE_DIR)/demo/%: $(JDK_DOC_LOCATION)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(CHMOD) 444 $(@)
$(JDK_IMAGE_DIR)/sample/%: $(JDK_DOC_LOCATION)/%
$(ECHO) Copying $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
$(CHMOD) 444 $(@)
JRE_INFO_FILE := $(JRE_IMAGE_DIR)/release
JDK_INFO_FILE := $(JDK_IMAGE_DIR)/release
......@@ -500,7 +545,7 @@ $(JDK_IMAGE_DIR)/src.zip: $(IMAGES_OUTPUTDIR)/src.zip
# Post processing (strip etc)
ifneq ($(POST_STRIP_CMD),)
ifeq ($(HOST_OS), windows)
ifeq ($(OPENJDK_TARGET_OS), windows)
EXEC_LIST:=$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f -name \*.exe \
-o -name \*.dll | $(EGREP) -v -i "$(MSVCRNN_DLL)")
else
......@@ -510,17 +555,43 @@ ifneq ($(POST_STRIP_CMD),)
| $(EGREP) 'ELF' | $(CUT) -d':' -f1)
endif
# Filter out non JRE files and convert to unique touch files to depend on
JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip/%.stripped,\
JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%,$(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped,\
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
JDK_JRE_EXEC_TOUCH_LIST:=$(patsubst $(JDK_OUTPUTDIR)/%, \
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped, \
$(filter-out $(addprefix %,$(NOT_JRE_BIN_FILES) $(NOT_JRE_LIB_FILES)), $(EXEC_LIST)))
JDK_BIN_EXEC_TOUCH_LIST := $(patsubst $(JDK_OUTPUTDIR)/%, \
$(IMAGES_OUTPUTDIR)/_strip_jdk/%.stripped, \
$(filter-out $(JDK_OUTPUTDIR)/lib/%, $(EXEC_LIST)))
# Setup a rule for stripping files based on touch files
$(IMAGES_OUTPUTDIR)/_strip_jre/%.stripped: $(JRE_IMAGE_DIR)/%
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
$(CHMOD) u+w $<
$(POST_STRIP_CMD) $<
$(CHMOD) go-w $<
$(MKDIR) -p $(@D)
$(TOUCH) $@
$(IMAGES_OUTPUTDIR)/_strip_jdk/bin/%.stripped: $(JDK_IMAGE_DIR)/bin/%
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
$(CHMOD) u+w $<
$(POST_STRIP_CMD) $<
$(CHMOD) go-w $<
$(MKDIR) -p $(@D)
$(TOUCH) $@
# Setup a rule for stripping files based on touch files
$(IMAGES_OUTPUTDIR)/_strip/%.stripped: $(JRE_IMAGE_DIR)/%
$(IMAGES_OUTPUTDIR)/_strip_jdk/jre/%.stripped: $(JDK_IMAGE_DIR)/jre/%
$(ECHO) Stripping $(patsubst $(OUTPUT_ROOT)/%,%,$<)
$(CHMOD) u+w $<
$(POST_STRIP_CMD) $<
$(CHMOD) go-w $<
$(MKDIR) -p $(@D)
$(TOUCH) $@
endif
################################################################################
......@@ -538,7 +609,8 @@ jdk-image: $(JDK_BIN_TARGETS) $(JDKJRE_BIN_TARGETS) \
$(JDK_MAN_PAGE_LIST) $(JDK_SAMPLE_TARGETS) \
$(JDK_DB_TARGETS) $(JDK_INCLUDE_TARGETS) \
$(JDKJRE_DOC_TARGETS) $(JDK_DOC_TARGETS) \
$(JDK_INFO_FILE) $(JDK_IMAGE_DIR)/src.zip
$(JDK_INFO_FILE) $(JDK_JRE_EXEC_TOUCH_LIST) $(JDK_BIN_EXEC_TOUCH_LIST) \
$(JDK_IMAGE_DIR)/src.zip
################################################################################
......
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
default: all
include $(SPEC)
include MakeBase.gmk
#######
IMPORT_TARGET_FILES :=
IMPORT_CLASSES := CORBA JAXP JAXWS LANGTOOLS
IMPORT_SOURCES := CORBA JAXP JAXWS LANGTOOLS
# Only Corba has binaries
IMPORT_BINARIES := CORBA
#######
# Put the libraries here. Different locations for different target apis.
ifeq ($(OPENJDK_TARGET_OS_API),posix)
ifneq ($(OPENJDK_TARGET_OS),macosx)
INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib/$(LIBARCH)
else
INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/lib
endif
HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/lib/$(LIBARCH)
else
INSTALL_LIBRARIES_HERE:=$(JDK_OUTPUTDIR)/bin
HOTSPOT_LIB_DIR:=$(HOTSPOT_DIST)/jre/bin
endif
#######
#
# jar xf/unzip fails when executing them all in parallel
# introduce artificial dependency (_DEP) buuhhh
define ImportClasses
$1_CLASSES_DEP := $$(IMPORT_TARGET_CLASSES)
IMPORT_TARGET_CLASSES += $(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported
$(JDK_OUTPUTDIR)/classes/_the.$1.classes.imported : $$($1_DIST)/lib/classes.jar $$($1_CLASSES_DEP)
$(ECHO) Importing $1 classes.jar
$(MKDIR) -p $$(@D)
($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
$(MV) $$@.tmp $$@
endef
define ImportSources
$1_SOURCES_DEP := $$(IMPORT_TARGET_SOURCES)
IMPORT_TARGET_SOURCES += $(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported
$(JDK_OUTPUTDIR)/impsrc/_the.$1.src.imported : $$($1_DIST)/lib/src.zip $$($1_SOURCES_DEP)
$(ECHO) Importing $1 src.zip
$(MKDIR) -p $$(@D)
($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
$(MV) $$@.tmp $$@
endef
define ImportBinaries
$1_BINARIES_DEP := $$(IMPORT_TARGET_BINARIES)
IMPORT_TARGET_BINARIES += $(JDK_OUTPUTDIR)/_the.$1.binaries.imported
$(JDK_OUTPUTDIR)/_the.$1.binaries.imported : $$($1_DIST)/lib/bin.zip $$($1_BINARIES_DEP)
$(ECHO) Importing $1 bin.zip
$(MKDIR) -p $$(@D)
($(CD) $$(@D) && $(JAR) xvf $$< > $$@.tmp)
$(MV) $$@.tmp $$@
endef
#######
$(foreach I,$(IMPORT_CLASSES), $(eval $(call ImportClasses,$I)))
$(foreach I,$(IMPORT_SOURCES), $(eval $(call ImportSources,$I)))
$(foreach I,$(IMPORT_BINARIES), $(eval $(call ImportBinaries,$I)))
IMPORT_TARGET_FILES += $(IMPORT_TARGET_CLASSES) $(IMPORT_TARGET_SOURCES) $(IMPORT_TARGET_BINARIES)
#######
ifeq ($(OPENJDK_TARGET_OS),solaris)
define do-install-file
$(MKDIR) -p $$(@D)
$(CP) -r -P '$$<' '$$(@D)'
endef
else ifeq ($(OPENJDK_TARGET_OS),macosx)
define do-install-file
$(MKDIR) -p $$(@D)
$(CP) -pRP '$$<' '$$@'
endef
else
define do-install-file
$(MKDIR) -p $$(@D)
$(CP) -P '$$<' '$$@'
endef
endif
define CopyDir
$1_SRC_FILES := $(shell $(FIND) $2 -type f)
$1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
IMPORT_TARGET_FILES += $$($1_DST_FILES)
$3/% : $2/%
$(ECHO) Copying $$(@F)
$(do-install-file)
endef
#######
#
# Import hotspot
#
$(eval $(call CopyDir,HOTSPOT0, $(HOTSPOT_LIB_DIR), $(INSTALL_LIBRARIES_HERE)))
$(eval $(call CopyDir,HOTSPOT1, $(HOTSPOT_DIST)/lib, $(JDK_OUTPUTDIR)/lib))
JSIG_DEBUGINFO := $(wildcard $(HOTSPOT_DIST)/jre/lib/$(LIBARCH)/libjsig.debuginfo) \
$(wildcard $(HOTSPOT_DIST)/jre/lib/$(LIBARCH)/libjsig.diz)
ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(JVM_VARIANT_SERVER), true)
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (,$(JSIG_DEBUGINFO))
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
ifeq ($(JVM_VARIANT_CLIENT), true)
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (,$(JSIG_DEBUGINFO))
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
endif
$(INSTALL_LIBRARIES_HERE)/server/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(RM) -f $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/server/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(RM) -f $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/server/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
$(RM) -f $@
ifeq (REALLY_WEIRD,1)
$(LN) -s ../$(@F) $@
else
#
# TODO: Check if this is what they really want...a zip containing a symlink
#
$(RM) -f $(basename $@).debuginfo
$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
$(ZIP) -q -y $@ $(basename $@).debuginfo
$(RM) -f $(basename $@).debuginfo
endif
$(INSTALL_LIBRARIES_HERE)/client/%$(SHARED_LIBRARY_SUFFIX) : $(INSTALL_LIBRARIES_HERE)/%$(SHARED_LIBRARY_SUFFIX)
$(RM) -f $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/client/%.debuginfo : $(INSTALL_LIBRARIES_HERE)/%.debuginfo
$(RM) -f $@
$(LN) -s ../$(@F) $@
$(INSTALL_LIBRARIES_HERE)/client/%.diz : $(INSTALL_LIBRARIES_HERE)/%.diz
$(RM) -f $@
ifeq (REALLY_WEIRD,1)
$(LN) -s ../$(@F) $@
else
#
# TODO: Check if this is what they really want...a zip containing a symlink
#
$(RM) -f $(basename $@).debuginfo
$(LN) -s ../$(basename $(@F)).debuginfo $(basename $@).debuginfo
$(ZIP) -q -y $@ $(basename $@).debuginfo
$(RM) -f $(basename $@).debuginfo
endif
#######
ifeq ($(OPENJDK_TARGET_OS),solaris)
define install-file
$(MKDIR) -p $(@D)
$(CP) -r -P '$<' '$(@D)'
endef
else ifeq ($(OPENJDK_TARGET_OS),macosx)
define install-file
$(MKDIR) -p $(@D)
$(CP) -pRP '$<' '$@'
endef
else
define install-file
$(MKDIR) -p $(@D)
$(CP) -P '$<' '$@'
endef
endif
ifndef OPENJDK
IMPORT_TARGET_FILES += \
$(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar \
$(JDK_OUTPUTDIR)/lib/security/local_policy.jar \
$(JDK_OUTPUTDIR)/lib/jce.jar
$(JDK_OUTPUTDIR)/lib/jce.jar : $(JDK_TOPDIR)/make/closed/tools/crypto/jce/jce.jar
$(ECHO) Copying $(@F)
$(install-file)
$(JDK_OUTPUTDIR)/lib/security/local_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
$(ECHO) Copying $(@F)
$(install-file)
$(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar: $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
$(ECHO) Copying $(@F)
$(install-file)
endif # OPENJDK
#######
all: $(IMPORT_TARGET_FILES)
......@@ -38,21 +38,21 @@ include Setup.gmk
include Tools.gmk
all: $(BUILD_TOOLS)
# Import (corba jaxp jaxws langtools hotspot)
+$(MAKE) -f Import.gmk
#
+$(MAKE) -f GenerateJavaSources.gmk
# Drop back to the old makefiles for
# packages/libs that have not yet been converted.
+$(MAKE) -f LegacyMakefiles.gmk
# Ok, now gensrc is fully populated.
+$(MAKE) -f GenerateData.gmk
+$(MAKE) -f CompileJavaClasses.gmk
# The classes have been built, now generate
# classes that have other sources.
+$(MAKE) -f GenerateClasses.gmk
# The classes are now built and
# any javah files have now been generated.
+$(MAKE) -f CompileNativeLibraries.gmk
# Finally compile the launchers.
+$(MAKE) -f CompileLaunchers.gmk
# Generate classes that have other sources. Needs
# to execute launchers.
+$(MAKE) -f GenerateClasses.gmk
# Now we have a complete jdk, which you can run.
# It is not yet wrapped up as an installed image.
# The demos are compiled against this jdk.
......@@ -64,16 +64,11 @@ ifndef NO_SAMPLES
+$(MAKE) -f CopySamples.gmk
endif
# Create the final jdk and jre images in the old way. Kept for reference
# until conversion is fully done.
old-images:
+$(MAKE) $(IMAGES_MAKE_ARGS) -f OldImages.gmk
# Create the final jdk and jre images, to be wrapped up
# into packages, or installed.
images:
+$(MAKE) -f CreateJars.gmk
+$(MAKE) $(IMAGES_MAKE_ARGS) -f Images.gmk
+$(MAKE) -f Images.gmk
BINARIES:=$(shell if test -d $(IMAGES_OUTPUTDIR)/j2sdk-image/bin; then cd $(IMAGES_OUTPUTDIR)/j2sdk-image/bin && $(LS) ; fi)
......@@ -90,9 +85,4 @@ install: images
$(RM) $(addprefix $(INSTALL_PREFIX)/bin/,$(BINARIES))
$(foreach b,$(BINARIES),$(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
# Create the deb,rpm,tgz,zip, packages.
packages: images
echo Creating packages...well, in the future.
$(MKDIR) -p $(OUTPUT_ROOT)/packages
.PHONY: all install images
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Setup.gmk
default: $(IMAGES_OUTPUTDIR)/_the.images
include Tools.gmk
JARS:=
##########################################################################################
JCONSOLE_JAR_DEPS := \
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/sun/tools/jconsole/ -name "_the.package") \
$(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses/com/sun/tools/jconsole/ -name "_the.package")
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR,$(JCONSOLE_JAR_DEPS),\
SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
SUFFIXES:=.class .gif .png,\
INCLUDES:=sun/tools/jconsole com/sun/tools/jconsole,\
JARMAIN:=sun.tools.jconsole.JConsole,\
JAR:=$(JDK_OUTPUTDIR)/lib/jconsole.jar,\
SKIP_METAINF:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/jconsole.jar
##########################################################################################
CHARSETS_JAR_DEPS :=
$(eval $(call SetupArchive,BUILD_CHARSETS_JAR,$(CHARSETS_JAR_DEPS),\
SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
SUFFIXES:=.class .dat,\
INCLUDES:=sun/nio/cs/ext,\
EXTRA_FILES := sun/awt/HKSCS.class \
sun/awt/motif/X11GBK.class \
'sun/awt/motif/X11GB2312$$$$Decoder.class' \
sun/awt/motif/X11GB2312.class \
'sun/awt/motif/X11KSC5601$$$$Decoder.class' \
'sun/awt/motif/X11KSC5601$$$$Encoder.class' \
'sun/awt/motif/X11GB2312$$$$Encoder.class' \
'sun/awt/motif/X11GBK$$$$Encoder.class' \
sun/awt/motif/X11KSC5601.class \
META-INF/services/java.nio.charset.spi.CharsetProvider, \
JAR:=$(JDK_OUTPUTDIR)/lib/charsets.jar, \
JARMAIN := NONE, \
SKIP_METAINF := true))
JARS+=$(JDK_OUTPUTDIR)/lib/charsets.jar
##########################################################################################
SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
ifndef OPENJDK
SUNPKCS11_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/pkcs11/sunpkcs11.jar
$(SUNPKCS11_JAR_DST) : $(SUNPKCS11_JAR_SRC)
@$(ECHO) "\n>>>Installing prebuilt SunPKCS11 provider..."
$(RM) $@
$(CP) $< $@
else
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR,$(SUNPKCS11_JAR_DEPS),\
SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
SUFFIXES:=.class,\
INCLUDES:=sun/security/pkcs11,\
JAR:=$(SUNPKCS11_JAR_DST), \
JARMAIN := NONE, \
SKIP_METAINF := true))
endif
JARS += $(SUNPKCS11_JAR_DST)
##########################################################################################
SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
ifndef OPENJDK
SUNEC_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ec/sunec.jar
$(SUNEC_JAR_DST) : $(SUNEC_JAR_SRC)
@$(ECHO) "\n>>>Installing prebuilt SunEC provider..."
$(RM) $@
$(CP) $< $@
else
$(eval $(call SetupArchive,BUILD_SUNEC_JAR,$(SUNEC_JAR_DEPS),\
SRCS:=$(JDK_OUTPUTDIR)/newclasses, \
SUFFIXES:=.class,\
INCLUDES:=sun/security/ec,\
EXCLUDE_FILES := \
sun/security/ec/ECKeyFactory.class \
sun/security/ec/ECParameters.class \
sun/security/ec/ECPrivateKeyImpl.class \
sun/security/ec/ECPublicKeyImpl.class \
sun/security/ec/NamedCurve.class \
'sun/security/ec/ECKeyFactory$$$$1.class' \
'sun/security/ec/ECKeyFactory$$$$2.class' ,\
JAR:=$(SUNEC_JAR_DST), \
JARMAIN := NONE, \
SKIP_METAINF := true))
endif
JARS += $(SUNEC_JAR_DST)
##########################################################################################
# TODO: deps?
$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR,$(SWINGBEANS_JAR_DEPS),\
SRCS:=$(JDK_OUTPUTDIR)/newclasses,\
SUFFIXES:=BeanInfo.class .gif,\
INCLUDES:=javax/swing sun/swing,\
EXCLUDES:=javax/swing/plaf,\
EXTRA_FILES:=javax/swing/SwingBeanInfoBase.class sun/swing/BeanInfoUtils.class,\
JAR:=$(JDK_OUTPUTDIR)/lib/dt.jar,\
JARMAIN:=NONE,\
SKIP_METAINF:=true))
JARS+=$(JDK_OUTPUTDIR)/lib/dt.jar
##########################################################################################
# Need to define BUILDDIR for Release.gmk to work
BUILDDIR=$(JDK_TOPDIR)/makefiles
include common/Defs.gmk
include common/Release.gmk
# A rudimentary attempt at band-aiding the dependency tracking.
DEPS:= $(shell $(FIND) $(JDK_OUTPUTDIR)/newclasses -name "*.class" -type f) \
$(shell $(FIND) $(JDK_OUTPUTDIR)/bin -type f) \
$(shell $(FIND) $(JDK_OUTPUTDIR)/lib -type f)
$(IMAGES_OUTPUTDIR)/_the.images : $(DEPS) $(JARS)
$(MKDIR) -p $(@D)
# Restart this makefile, ugly, but since double colon (::) rules
# have been used in Release.gmk, it is impossible to craft on
# dependencies on these. I.e. -do-not-use- :: rules!!!!!
# Repeat after me: -do-not-use- :: rules!!!!!
$(MAKE) -j1 -f OldImages.gmk $(IMAGES_MAKE_ARGS) images
$(TOUCH) $@
.PHONY: default
......@@ -123,3 +123,27 @@ TOOL_WRAPPERGENERATOR=$(JAVA) -cp $(JDK_OUTPUTDIR)/btclasses \
TOOL_TOBIN=$(JAVA) -Djava.awt.headless=true -cp $(JDK_OUTPUTDIR)/btclasses \
sun.awt.X11.ToBin
##########################################################################################
# Tools needed on solaris because OBJCOPY is broken.
$(eval $(call SetupNativeCompilation,ADD_GNU_DEBUGLINK,\
SRC:=$(JDK_TOPDIR)/make/tools/add_gnu_debuglink,\
LANG:=C,\
CC:=$(HOST_CC),\
LDEXE:=$(HOST_LD),\
LDFLAGS:=-lelf,\
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/add_gnu_debuglink,\
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
PROGRAM:=add_gnu_debuglink))
$(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS,\
SRC:=$(JDK_TOPDIR)/make/tools/fix_empty_sec_hdr_flags,\
LANG:=C,\
CC:=$(HOST_CC),\
LDEXE:=$(HOST_LD),\
LDFLAGS:=-lelf,\
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/fix_empty_sec_hdr_flags,\
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/btbin,\
PROGRAM:=fix_empty_sec_hdr_flags))
#
# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building sunjce_provider.jar.
#
# This file was derived from make/javax/crypto/Makefile.
#
#
# (The terms "OpenJDK" and "JDK" below refer to OpenJDK and Sun JDK builds
# respectively.)
#
# JCE builds are very different between OpenJDK and JDK. The OpenJDK JCE
# jar files do not require signing, but those for JDK do. If an unsigned
# jar file is installed into JDK, things will break when the crypto
# routines are called.
#
# This Makefile does the "real" build of the JCE files. There are some
# javac options currently specific to JCE, so we recompile now to make
# sure any implicit compilations didn't use any incorrect flags.
#
# For OpenJDK, the jar files built here are installed directly into the
# OpenJDK.
#
# For JDK, the binaries use pre-built/pre-signed binary files stored in
# the closed workspace that are not shipped in the OpenJDK workspaces.
# We still build the JDK files here to verify the files compile, and in
# preparation for possible signing. Developers working on JCE in JDK
# must sign the JCE files before testing. The JCE signing key is kept
# separate from the JDK workspace to prevent its disclosure.
#
# SPECIAL NOTE TO JCE/JDK developers: The source files must eventually
# be built and signed, and the resulting jar files MUST BE CHECKED INTO
# THE CLOSED PART OF THE WORKSPACE*. This separate step *MUST NOT BE
# FORGOTTEN*, otherwise a bug fixed in the source code will not be
# reflected in the shipped binaries. The "release" target should be
# used to generate the required files.
#
# There are a number of targets to help both JDK/OpenJDK developers.
#
# Main Targets (JDK/OPENJDK):
#
# all/clobber/clean The usual.
# If OpenJDK, installs sunjce_provider.jar.
# If JDK, installs prebuilt
# sunjce_provider.jar.
#
# jar Builds/installs sunjce_provider.jar
# If OpenJDK, does not sign.
# If JDK, tries to sign.
#
# Other lesser-used Targets (JDK/OPENJDK):
#
# build-jar Builds sunjce_provider.jar
# (does not sign/install)
#
# install-jar Alias for "jar" above.
#
# Other targets (JDK only):
#
# sign Alias for sign-jar
# sign-jar Builds/signs sunjce_provider.jar (no install)
#
# release Builds all targets in preparation
# for workspace integration.
#
# install-prebuilt Installs the pre-built jar files
#
# This makefile was written to support parallel target execution.
#
BUILDDIR = ../../../..
PACKAGE = com.sun.crypto.provider
PRODUCT = sun
#
# The following is for when we need to do postprocessing
# (signing) against a read-only build. If the OUTPUTDIR
# isn't writable, the build currently crashes out.
#
ifndef OPENJDK
ifdef ALT_JCE_BUILD_DIR
# =====================================================
# Where to place the output, in case we're building from a read-only
# build area. (e.g. a release engineering build.)
JCE_BUILD_DIR=${ALT_JCE_BUILD_DIR}
IGNORE_WRITABLE_OUTPUTDIR_TEST=true
else
JCE_BUILD_DIR=${TEMPDIR}
endif
endif
JAVAC_MAX_WARNINGS = false
JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation
JAVAC_WARNINGS_FATAL = true
include $(BUILDDIR)/common/Defs.gmk
#
# Location for the newly built classfiles.
#
CLASSDESTDIR = $(TEMPDIR)/classes
#
# Subdirectories of these are automatically included.
#
AUTO_FILES_JAVA_DIRS = \
com/sun/crypto/provider
include $(BUILDDIR)/common/Classes.gmk
#
# Rules
#
#
# Some licensees do not get the security sources, but we still need to
# be able to build "all" for them. Check here to see if the sources were
# available. If not, then we don't need to continue this rule.
#
ifdef OPENJDK
all: build-jar install-jar
else # OPENJDK
ifeq ($(strip $(FILES_java)),)
all: install-prebuilt
$(no-source-warning)
else # FILES_java available
all: build-jar install-prebuilt
$(build-warning)
endif # $(FILES_java) available
endif # OPENJDK
#
# We use a variety of subdirectories in the $(TEMPDIR) depending on what
# part of the build we're doing. Both OPENJDK/JDK builds are initially
# done in the unsigned area. When files are signed in JDK, they will be
# placed in the appropriate areas.
#
UNSIGNED_DIR = $(TEMPDIR)/unsigned
include $(BUILDDIR)/javax/crypto/Defs-jce.gmk
# =====================================================
# Build the unsigned sunjce_provider.jar file.
#
JAR_DESTFILE = $(EXTDIR)/sunjce_provider.jar
#
# The sunjce_provider.jar needs to be in the extension class directory,
# therefore none of its classes should appear in $(CLASSBINDIR).
# Currently no one is using any of the SunJCE internals, so these files
# should not have been built.
#
#
# Since the -C option to jar is used below, each directory entry must be
# preceded with the appropriate directory to "cd" into.
#
JAR_DIRS = $(patsubst %, -C $(CLASSDESTDIR) %, $(AUTO_FILES_JAVA_DIRS))
build-jar: $(UNSIGNED_DIR)/sunjce_provider.jar
#
# Build sunjce_provider.jar.
#
$(UNSIGNED_DIR)/sunjce_provider.jar: build $(JCE_MANIFEST_FILE)
$(prep-target)
$(BOOT_JAR_CMD) cmf $(JCE_MANIFEST_FILE) $@ $(JAR_DIRS) \
$(BOOT_JAR_JFLAGS)
@$(java-vm-cleanup)
ifndef OPENJDK
# =====================================================
# Sign the provider jar file. Not needed for OpenJDK.
#
SIGNED_DIR = $(JCE_BUILD_DIR)/signed
sign: sign-jar
sign-jar: $(SIGNED_DIR)/sunjce_provider.jar
ifndef ALT_JCE_BUILD_DIR
$(SIGNED_DIR)/sunjce_provider.jar: $(UNSIGNED_DIR)/sunjce_provider.jar
else
#
# We have to remove the build dependency, otherwise, we'll try to rebuild it
# which we can't do on a read-only filesystem.
#
$(SIGNED_DIR)/sunjce_provider.jar:
@if [ ! -r $(UNSIGNED_DIR)/sunjce_provider.jar ] ; then \
$(ECHO) "Couldn't find $(UNSIGNED_DIR)/sunjce_provider.jar"; \
exit 1; \
fi
endif
$(call sign-file, $(UNSIGNED_DIR)/sunjce_provider.jar)
# =====================================================
# Create the Release Engineering files. Signed builds, etc.
#
release: $(SIGNED_DIR)/sunjce_provider.jar
$(RM) $(JCE_BUILD_DIR)/release/sunjce_provider.jar
$(MKDIR) -p $(JCE_BUILD_DIR)/release
$(CP) $(SIGNED_DIR)/sunjce_provider.jar $(JCE_BUILD_DIR)/release
$(release-warning)
endif # OPENJDK
# =====================================================
# Install routines.
#
#
# Install sunjce_provider.jar, depending on which type is requested.
#
install-jar jar: $(JAR_DESTFILE)
ifndef OPENJDK
$(release-warning)
endif
ifdef OPENJDK
$(JAR_DESTFILE): $(UNSIGNED_DIR)/sunjce_provider.jar
else
$(JAR_DESTFILE): $(SIGNED_DIR)/sunjce_provider.jar
endif
$(install-file)
ifndef OPENJDK
install-prebuilt:
@$(ECHO) "\n>>>Installing prebuilt SunJCE provider..."
$(RM) $(JAR_DESTFILE)
$(CP) $(PREBUILT_DIR)/jce/sunjce_provider.jar $(JAR_DESTFILE)
endif
# =====================================================
# Support routines.
#
clobber clean::
$(RM) -r $(JAR_DESTFILE) $(TEMPDIR) $(JCE_BUILD_DIR)
.PHONY: build-jar jar install-jar
ifndef OPENJDK
.PHONY: sign sign-jar release install-prebuilt
endif
#
# Copyright (c) 1995, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
include $(JDK_TOPDIR)/makefiles/common/Rules.gmk
#
# Say you built classes into $(ALT_CLASSBINDIR) and then at the end of
# the build you might want to copy them over to $(ALT_CLASSDESTDIR);
# this rule takes care of that. No one should really set these
# variables except the bootstrap/recompile stage of the java compiler.
#
ifdef ALT_CLASSBINDIR
# By default post-processing is copying. Suppose you want to build
# a jar file then set ALT_CLASSES_DISPOSITION to '../../dest/nameof.jar'
# before including this file.
ifndef ALT_CLASSES_DISPOSITION
ALT_CLASSES_DISPOSITION = copy-classes
endif
build : $(ALT_CLASSES_DISPOSITION)
copy-classes:
ifneq ($(ALT_CLASSBINDIR), $(ALT_CLASSDESTDIR))
@if [ -s $(TEMPDIR)/.classes.list ]; then \
mkdir -p $(ALT_CLASSDESTDIR); \
echo "Copying $(ALT_CLASSBINDIR)..."; \
echo "(cd $(ALT_CLASSBINDIR); tar cf - .) | \
(cd $(ALT_CLASSDESTDIR); tar xf -)"; \
(cd $(ALT_CLASSBINDIR); tar cf - .) | \
(cd $(ALT_CLASSDESTDIR); tar xf -); \
fi
else # ALT_CLASSBINDIR
@if [ -s $(TEMPDIR)/.classes.list ]; then \
echo "Copy source and destination are the same: $(ALT_CLASSBINDIR) -- Copy skipped..."; \
fi
endif # ALT_CLASSBINDIR
.PHONY: copy-classes
endif # ALT_CLASSBINDIR
#
# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# The cscope.out file is made in the current directory and spans the entire
# source tree.
#
# Things to note:
# 1. We use relative names for cscope.
# 2. We *don't* remove the old cscope.out file, because cscope is smart
# enough to only build what has changed. It can be confused, however,
# if files are renamed or removed, so it may be necessary to manually
# remove cscope.out if a lot of reorganization has occurred.
#
CSDIRS = $(JDK_TOPDIR)/src $(JDK_TOPDIR)/build
CSINCS = $(CSDIRS:%=-I%)
#
# Set CSFLAGS env variable to -b when using fast cscope to build the fast
# (but large) cscope data bases.
#
CSCOPE = cscope-fast
ifeq ($(CSCOPE), cscope-fast)
CSFLAGS = -b
endif
#
# Adding .java files pushes the file count of a full workspace up about 2500
# files, which slows database lookup. Thus allow these files to be added from
# the environment (CSCLASSES=yes).
#
ifdef CSCLASSES
ADDCLASSES= -o -name '*.java'
endif
#
# Adding CClassHeaders also pushes the file count of a full workspace up about
# 200 files (these files also don't exist in a new workspace, and thus will
# cause the recreation of the database as they get created, which might seem
# A little confusing). Thus allow these files to be added from the environment
# (CSHEADERS=yes).
#
ifndef CSHEADERS
RMCCHEADERS= -o -name CClassHeaders
endif
.PRECIOUS: cscope.out
cscope.out: cscope.files FRC
$(CSCOPE) $(CSFLAGS)
#
# What files should we include? A simple rule might be just those files under
# SCM control, however this would miss files we create like the opcodes and
# CClassHeaders. The following attempts to find everything that is *useful*.
# (demo directories contain many .java files
# that probably aren't useful for development, and the pkgarchive may contain
# duplicates of files within the source hierarchy). The ordering of the .raw
# file is an attempt to make cscope display the most relevant files first.
#
cscope.files: FRC
@-$(RM) cscope.files cscope.files.raw
echo "$(CSINCS)" > cscope.files
-find $(CSDIRS) $(SCM_DIRS_prune) -o -type d \( -name '.del-*' -o \
-name '*demo' -o -name pkgarchive $(RMCCHEADERS) \) -prune -o \
-type f \( -name '*.[Ccshlxy]' -o -name '*.il' -o -name '*.cc' -o \
-name 'Makefile*' -o -name GNUmakefile -o -name '*.gmk' -o \
-name '*.cpp' $(ADDCLASSES) \) -print > cscope.files.raw
-egrep -v "\.java|\/build\/" cscope.files.raw >> cscope.files
-fgrep ".java" cscope.files.raw >> cscope.files
-fgrep "/build/" cscope.files.raw >> cscope.files
@-$(RM) cscope.files.raw
cscope.clean:
-$(RM) cscope.files cscope.files.raw cscope.out
FRC:
#
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Variable definitions for SE Embedded builds. This file should
# not contain rules.
#
ifdef JAVASE_EMBEDDED
# Compress jar files
COMPRESS_JARS = true
# Don't mmap zip files
LIBZIP_CAN_USE_MMAP = false
# Disable ALSA version check
REQUIRED_ALSA_VERSION =
# Compilation settings
OTHER_CPPFLAGS += -DJAVASE_EMBEDDED
# Product naming
PRODUCT_SUFFIX = SE Runtime Environment for Embedded
RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
# Reduced JRE locations
JRE_REDUCED_HEADLESS_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-headless-image
JRE_REDUCED_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-image
# Override on linux to further reduce binary/lib sizes in product build
ifeq ($(PLATFORM), linux)
ifeq ($(VARIANT), OPT)
ifneq ($(NO_STRIP), true)
ifneq ($(DEBUG_BINARIES), true)
POST_STRIP_PROCESS = $(STRIP) --strip-unneeded
endif
endif
endif
endif
# NIO Platform specific source file location
ifdef CROSS_COMPILE_ARCH
NIO_PLATFORM_CLASSES_ROOT_DIR = $(CLOSED_PLATFORM_SRC)/classes/
endif
# For ARM sflt we need to link to a library with improved FP accuracy
# and it must be linked after fdlibm - this places it at the end after libc
# -z muldefs avoids linker errors for duplicate symbols.
ifeq ($(CROSS_COMPILE_ARCH), arm)
EXTRA_LIBS += $(EXT_LIBS_PATH)/sflt_glibc_jdk.a -Xlinker -z -Xlinker muldefs
endif
endif # JAVASE_EMBEDDED
#
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile to specify compiler flags for programs and libraries
# targeted to Linux. Should not contain any rules.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
# Warning: the following variables are overriden by Defs.gmk. Set
# values will be silently ignored:
# CFLAGS (set $(OTHER_CFLAGS) instead)
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
# LDFLAGS (set $(OTHER_LDFAGS) instead)
# LDLIBS (set $(EXTRA_LIBS) instead)
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
# Get shared JDK settings
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
# Part of INCREMENTAL_BUILD mechanism.
# Compiler emits things like: path/file.o: file.h
# We want something like: relative_path/file.o relative_path/file.d: file.h
CC_DEPEND = -MM
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
ifndef PLATFORM_SRC
PLATFORM_SRC = $(BUILDDIR)/../src/solaris
endif # PLATFORM_SRC
# Platform specific closed sources
ifndef OPENJDK
ifndef CLOSED_PLATFORM_SRC
CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
endif
endif
# platform specific include files
PLATFORM_INCLUDE_NAME = $(PLATFORM)
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# suffix used for make dependencies files.
DEPEND_SUFFIX = d
# The suffix applied to the library name for FDLIBM
FDDLIBM_SUFFIX = a
# The suffix applied to scripts (.bat for windows, nothing for unix)
SCRIPT_SUFFIX =
# CC compiler object code output directive flag value
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
# Default OBJCOPY comes from GNU Binutils on Linux:
DEF_OBJCOPY=/usr/bin/objcopy
ifdef CROSS_COMPILE_ARCH
# don't try to generate .debuginfo files when cross compiling
_JUNK_ := $(shell \
echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
"skipping .debuginfo generation.")
OBJCOPY=
else
OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
ifneq ($(ALT_OBJCOPY),)
_JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
# disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
endif
endif
ifdef LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
# The setting of OBJCOPY above enables the JDK build to import
# .debuginfo files from the HotSpot build. However, adding FDS
# support to the JDK build will occur in phases so a different
# make variable is used to indicate that a particular library
# supports FDS.
ifeq ($(OBJCOPY),)
_JUNK_ := $(shell \
echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
else
_JUNK_ := $(shell \
echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
# Library stripping policies for .debuginfo configs:
# all_strip - strips everything from the library
# min_strip - strips most stuff from the library; leaves minimum symbols
# no_strip - does not strip the library at all
#
# Oracle security policy requires "all_strip". A waiver was granted on
# 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
#
DEF_STRIP_POLICY="min_strip"
ifeq ($(ALT_STRIP_POLICY),)
STRIP_POLICY=$(DEF_STRIP_POLICY)
else
STRIP_POLICY=$(ALT_STRIP_POLICY)
endif
_JUNK_ := $(shell \
echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
endif
endif
#
# Default optimization
#
ifndef OPTIMIZATION_LEVEL
ifeq ($(PRODUCT), java)
OPTIMIZATION_LEVEL = HIGHER
else
OPTIMIZATION_LEVEL = LOWER
endif
endif
ifndef FASTDEBUG_OPTIMIZATION_LEVEL
FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
endif
CC_OPT/NONE =
CC_OPT/LOWER = -O2
CC_OPT/HIGHER = -O3
CC_OPT/HIGHEST = -O3
CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
# For all platforms, do not omit the frame pointer register usage.
# We need this frame pointer to make it easy to walk the stacks.
# This should be the default on X86, but ia64 and amd64 may not have this
# as the default.
CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9
LDFLAGS_COMMON_sparc += -m32 -mcpu=v9
CFLAGS_REQUIRED_arm += -fsigned-char -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN
ifeq ($(ZERO_BUILD), true)
CFLAGS_REQUIRED = $(ZERO_ARCHFLAG)
ifeq ($(ZERO_ENDIANNESS), little)
CFLAGS_REQUIRED += -D_LITTLE_ENDIAN
endif
LDFLAGS_COMMON += $(ZERO_ARCHFLAG)
else
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
endif
# If this is a --hash-style=gnu system, use --hash-style=both
# The gnu .hash section won't work on some Linux systems like SuSE 10.
_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu')
ifneq ($(_HAS_HASH_STYLE_GNU),)
LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
endif
LDFLAGS_COMMON += $(LDFLAGS_HASH_STYLE)
#
# Selection of warning messages
#
GCC_INHIBIT = -Wno-unused -Wno-parentheses
GCC_STYLE =
GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
#
# Treat compiler warnings as errors, if warnings not allowed
#
ifeq ($(COMPILER_WARNINGS_FATAL),true)
GCC_WARNINGS += -Werror
endif
#
# Misc compiler options
#
ifneq ($(ARCH),ppc)
CFLAGS_COMMON = -fno-strict-aliasing
endif
PIC_CODE_LARGE = -fPIC
PIC_CODE_SMALL = -fpic
GLOBAL_KPIC = $(PIC_CODE_LARGE)
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
ifeq ($(ARCH), amd64)
CFLAGS_COMMON += -pipe
endif
# Linux 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
DEBUG_FLAG = -g
ifeq ($(FASTDEBUG), true)
ifeq ($(ARCH_DATA_MODEL), 64)
DEBUG_FLAG = -g1
endif
endif
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_FLAG = -g
CFLAGS_REQUIRED += $(DEBUG_FLAG)
endif
CFLAGS_OPT = $(CC_OPT)
CFLAGS_DBG = $(DEBUG_FLAG)
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
CXXFLAGS_OPT = $(CC_OPT)
CXXFLAGS_DBG = $(DEBUG_FLAG)
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
ifeq ($(FASTDEBUG), true)
CFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
endif
CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
ifneq ($(ARCH),alpha)
CPP_ARCH_FLAGS += -D$(ARCH)
else
CPP_ARCH_FLAGS += -D_$(ARCH)_
endif
CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
ifeq ($(ARCH_DATA_MODEL), 64)
CPPFLAGS_COMMON += -D_LP64=1
endif
CPPFLAGS_OPT = -DNDEBUG
CPPFLAGS_DBG = -DDEBUG
ifneq ($(PRODUCT), java)
CPPFLAGS_DBG += -DLOGGING
endif
ifdef LIBRARY
# Libraries need to locate other libraries at runtime, and you can tell
# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
# buried inside the .so. The $ORIGIN says to look relative to where
# the library itself is and it can be followed with relative paths from
# that. By default we always look in $ORIGIN, optionally we add relative
# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
# On Linux we add a flag -z origin, not sure if this is necessary, but
# doesn't seem to hurt.
# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
# Try: 'readelf -d lib*.so' to see these settings in a library.
#
Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin
Z_ORIGIN_FLAG/i586 = -Xlinker -z -Xlinker origin
Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin
Z_ORIGIN_FLAG/ia64 = -Xlinker -z -Xlinker origin
Z_ORIGIN_FLAG/arm =
Z_ORIGIN_FLAG/ppc =
Z_ORIGIN_FLAG/zero = -Xlinker -z -Xlinker origin
LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY))
LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN
LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%)
endif
EXTRA_LIBS += -lc
LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
#LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
#
# -L paths for finding and -ljava
#
LDFLAGS_OPT = -Xlinker -O1
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
#
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
# statically link libgcc but will print a warning with the flag. We don't
# want the warning, so check gcc version first.
#
ifeq ($(CC_MAJORVER),3)
OTHER_LDFLAGS += -static-libgcc
endif
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
# (See Rules.gmk) The gcc 5 compiler might have an option for this?
AUTOMATIC_PCH_OPTION =
#
# Post Processing of libraries/executables
#
ifeq ($(VARIANT), OPT)
ifneq ($(NO_STRIP), true)
ifneq ($(DEBUG_BINARIES), true)
# Debug 'strip -g' leaves local function Elf symbols (better stack
# traces)
POST_STRIP_PROCESS = $(STRIP) -g
endif
endif
endif
#
# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
#
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
#
# Support for Quantify.
#
ifdef QUANTIFY
QUANTIFY_CMD = quantify
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
endif
#
# Path and option to link against the VM, if you have to. Note that
# there are libraries that link against only -ljava, but they do get
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
# the library itself should not.
#
VM_NAME = server
# First try to link against server, if that does not exist link against client.
JVMLIB = -L$(LIBDIR)/$(LIBARCH)/server -L$(LIBDIR)/$(LIBARCH)/client -ljvm
JAVALIB = -ljava $(JVMLIB)
#
# We want to privatize JVM symbols on Solaris. This is so the user can
# write a function called FindClass and this should not override the
# FindClass that is inside the JVM. At this point in time we are not
# concerned with other JNI libraries because we hope that there will
# not be as many clashes there.
#
PRIVATIZE_JVM_SYMBOLS = false
USE_PTHREADS = true
override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME
override AWT_RUNPATH =
override HAVE_ALTZONE = false
override HAVE_FILIOH = false
override HAVE_GETHRTIME = false
override HAVE_GETHRVTIME = false
override HAVE_SIGIGNORE = true
override LEX_LIBRARY = -lfl
ifeq ($(STATIC_CXX),true)
override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
else
override LIBCXX = -lstdc++
endif
override LIBPOSIX4 =
override LIBSOCKET =
override LIBNSL =
override LIBSCF =
override LIBTHREAD =
override LIBDL = -ldl
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
override OPENWIN_LIB = $(OPENWIN_HOME)/lib
endif
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
override SUN_CMM_SUBDIR =
override THREADS_FLAG = native
override USE_GNU_M4 = true
override USING_GNU_TAR = true
override WRITE_LIBVERSION = false
# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
# resulting resolved absolute name of the executable in the environment
# variable EXECNAME. That executable name is then used that to locate the
# installation area.
override USE_EXECNAME = true
# If your platform has DPS, it will have Type1 fonts too, in which case
# it is best to enable DPS support until such time as 2D's rasteriser
# can fully handle Type1 fonts in all cases. Default is "yes".
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
# DPS (Displayable PostScript) is available on Solaris machines
HAVE_DPS = no
#
# Japanese manpages
#
JA_SOURCE_ENCODING = eucJP
JA_TARGET_ENCODINGS = UTF-8
# Settings for the JDI - Serviceability Agent binding.
HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
# The JDI - Serviceability Agent binding is not currently supported
# on Linux-ia64.
ifeq ($(ARCH), ia64)
INCLUDE_SA = false
else
INCLUDE_SA = true
endif
ifdef CROSS_COMPILE_ARCH
# X11 headers are not under /usr/include
OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
endif
#
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile to specify compiler flags for programs and libraries
# targeted to MACOSX. Should not contain any rules.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
# Warning: the following variables are overriden by Defs.gmk. Set
# values will be silently ignored:
# CFLAGS (set $(OTHER_CFLAGS) instead)
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
# LDFLAGS (set $(OTHER_LDFAGS) instead)
# LDLIBS (set $(EXTRA_LIBS) instead)
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
# Get shared JDK settings
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
# Part of INCREMENTAL_BUILD mechanism.
# Compiler emits things like: path/file.o: file.h
# We want something like: relative_path/file.o relative_path/file.d: file.h
CC_DEPEND = -MM
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
ifndef PLATFORM_SRC
PLATFORM_SRC = $(BUILDDIR)/../src/solaris
endif # PLATFORM_SRC
PLATFORM_SRC_MACOS = $(BUILDDIR)/../src/macosx
# BSD build pulls its platform sources from the solaris tree.
JAVA_SRCDIR_LIST = src/$(PLATFORM) src/solaris src/share
NATIVE_SRCDIR_LIST = src/$(PLATFORM) src/solaris src/share
# Platform specific closed sources
ifndef OPENJDK
ifndef CLOSED_PLATFORM_SRC
CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
endif
endif
# platform specific include files
PLATFORM_INCLUDE_NAME = $(OS_NAME)
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# suffix used for make dependencies files.
DEPEND_SUFFIX = d
# The suffix applied to the library name for FDLIBM
FDDLIBM_SUFFIX = a
# The suffix applied to scripts (.bat for windows, nothing for unix)
SCRIPT_SUFFIX =
# CC compiler object code output directive flag value
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
#
# Default optimization
#
ifndef OPTIMIZATION_LEVEL
ifeq ($(PRODUCT), java)
OPTIMIZATION_LEVEL = HIGHER
else
OPTIMIZATION_LEVEL = LOWER
endif
endif
ifndef FASTDEBUG_OPTIMIZATION_LEVEL
FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
endif
# For macosx use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
# <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers>
CC_OPT/NONE =
CC_OPT/LOWER = -Os
CC_OPT/HIGHER = -Os
CC_OPT/HIGHEST = -Os
CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
# For all platforms, do not omit the frame pointer register usage.
# We need this frame pointer to make it easy to walk the stacks.
# This should be the default on X86, but ia64, and x86_64
# may not have this as the default.
CFLAGS_REQUIRED_x86_64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
LDFLAGS_COMMON_x86_64 += -m64
CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
LDFLAGS_COMMON_i586 += -m32
CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9
LDFLAGS_COMMON_sparc += -m32 -mcpu=v9
CFLAGS_REQUIRED_arm += -fsigned-char -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN
ifeq ($(ZERO_BUILD), true)
CFLAGS_REQUIRED = $(ZERO_ARCHFLAG)
ifeq ($(ZERO_ENDIANNESS), little)
CFLAGS_REQUIRED += -D_LITTLE_ENDIAN
endif
LDFLAGS_COMMON += $(ZERO_ARCHFLAG)
else ifeq ($(ARCH), universal)
CFLAGS_REQUIRED += -arch i386 -arch x86_64 -D_LITTLE_ENDIAN
LDFLAGS_COMMON += -arch i386 -arch x86_64
else
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
endif
# 16-byte stack re-alignment on 32-bit Darwin
CFLAGS_REQUIRED_i586 += -mstackrealign
OTHER_CFLAGS = \
-F/System/Library/Frameworks/JavaVM.framework/Frameworks \
-F/System/Library/Frameworks/ApplicationServices.framework/Frameworks
#
# Selection of warning messages
#
GCC_INHIBIT = -Wno-unused -Wno-parentheses
GCC_STYLE =
GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
#
# Treat compiler warnings as errors, if warnings not allowed
#
ifeq ($(COMPILER_WARNINGS_FATAL),true)
GCC_WARNINGS += -Werror
endif
#
# Misc compiler options
#
ifneq ($(ARCH),ppc)
CFLAGS_COMMON = -fno-strict-aliasing
endif
PIC_CODE_LARGE = -fPIC
PIC_CODE_SMALL = -fpic
GLOBAL_KPIC = $(PIC_CODE_LARGE)
CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
ifeq ($(ARCH), x86_64)
CFLAGS_COMMON += -pipe
endif
# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
DEBUG_FLAG = -g
ifeq ($(FASTDEBUG), true)
ifeq ($(ARCH_DATA_MODEL), 64)
DEBUG_FLAG = -g1
endif
endif
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_FLAG = -g
CFLAGS_REQUIRED += $(DEBUG_FLAG)
endif
CFLAGS_OPT = $(CC_OPT)
CFLAGS_DBG = $(DEBUG_FLAG)
CFLAGS_COMMON += $(CFLAGS_REQUIRED)
CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
CXXFLAGS_OPT = $(CC_OPT)
CXXFLAGS_DBG = $(DEBUG_FLAG)
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
ifeq ($(FASTDEBUG), true)
CFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
endif
CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
ifneq ($(ARCH),alpha)
CPP_ARCH_FLAGS += -D$(ARCH)
else
CPP_ARCH_FLAGS += -D_$(ARCH)_
endif
CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
CPPFLAGS_COMMON += -DMACOSX
ifeq ($(ARCH_DATA_MODEL), 64)
CPPFLAGS_COMMON += -D_LP64=1
endif
CPPFLAGS_OPT = -DNDEBUG
CPPFLAGS_DBG = -DDEBUG
ifneq ($(PRODUCT), java)
CPPFLAGS_DBG += -DLOGGING
endif
# Libraries need to locate other libraries at runtime, and you can tell
# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
# buried inside the .{so,dylib}. The {$ORIGIN,@loader_path/} says to look
# relative to where the library itself is and it can be followed
# with relative paths from that. By default we always look in
# {$ORIGIN,@loader_path/}, optionally we add relative paths if the Makefile
# sets LD_RUNPATH_EXTRAS to those relative paths.
# Except on MacOS X we add a flag -z origin, not sure if this is necessary,
# but doesn't seem to hurt.
# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
# See 'man {dyld,rtld}' for more information.
# Try: 'readelf -d lib*.so' to see these settings in a library.
#
LDFLAGS_COMMON += -Xlinker -rpath -Xlinker @loader_path/.
LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -rpath -Xlinker @loader_path/%)
LDFLAGS_COMMON += -Xlinker -install_name -Xlinker @rpath/$(@F)
#
# -L paths for finding and -ljava
#
LDFLAGS_COMMON += -L$(LIBDIR)
#
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
# statically link libgcc but will print a warning with the flag. We don't
# want the warning, so check gcc version first.
#
ifeq ($(CC_MAJORVER),3)
OTHER_LDFLAGS += -static-libgcc
endif
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
# (See Rules.gmk) The gcc 5 compiler might have an option for this?
AUTOMATIC_PCH_OPTION =
#
# Post Processing of libraries/executables
#
ifeq ($(VARIANT), OPT)
ifneq ($(NO_STRIP), true)
ifneq ($(DEBUG_BINARIES), true)
# Debug 'strip -S' leaves local function Elf symbols (better stack
# traces)
POST_STRIP_PROCESS = $(STRIP) -S
endif
endif
endif
#
# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
#
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
#
# Support for Quantify.
#
ifdef QUANTIFY
QUANTIFY_CMD = quantify
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
endif
# Darwin does not support linker map files.
LDNOMAP=true
#
# Path and option to link against the VM, if you have to. Note that
# there are libraries that link against only -ljava, but they do get
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
# the library itself should not.
#
VM_NAME = server
JVMLIB = -L$(LIBDIR)/server -L$(LIBDIR)/client -ljvm
JAVALIB = -ljava $(JVMLIB)
#
# We want to privatize JVM symbols on Solaris. This is so the user can
# write a function called FindClass and this should not override the
# FindClass that is inside the JVM. At this point in time we are not
# concerned with other JNI libraries because we hope that there will
# not be as many clashes there.
#
PRIVATIZE_JVM_SYMBOLS = false
USE_PTHREADS = true
override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME
override AWT_RUNPATH =
override HAVE_ALTZONE = false
override HAVE_FILIOH = false
override HAVE_GETHRTIME = false
override HAVE_GETHRVTIME = false
override HAVE_SIGIGNORE = true
override LEX_LIBRARY = -lfl
ifeq ($(STATIC_CXX),true)
override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
else
override LIBCXX = -lstdc++
endif
override LIBPOSIX4 =
override LIBSOCKET =
override LIBNSL =
override LIBTHREAD =
override LIBDL =
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
override OPENWIN_HOME = $(X11_PATH)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
override SUN_CMM_SUBDIR =
override THREADS_FLAG = native
override USE_GNU_M4 = true
override USING_GNU_TAR = true
override WRITE_LIBVERSION = false
ifdef ALT_X11_PATH
X11_PATH = $(ALT_X11_PATH)
else
X11_PATH = /usr/X11R6
endif
ifdef ALT_PACKAGE_PATH
PACKAGE_PATH = $(ALT_PACKAGE_PATH)
else
PACKAGE_PATH = /opt/local
endif
# ALSA
ifdef ALT_ALSA_LIB_PATH
ALSA_LIB_PATH = $(ALT_ALSA_LIB_PATH)
else
ALSA_LIB_PATH = $(PACKAGE_PATH)/lib
endif
ifdef ALT_ALSA_HEADERS_PATH
ALSA_HEADERS_PATH = $(ALT_ALSA_HEADERS_PATH)
else
ALSA_HEADERS_PATH = $(PACKAGE_PATH)/include
endif
# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
# resulting resolved absolute name of the executable in the environment
# variable EXECNAME. That executable name is then used that to locate the
# installation area.
override USE_EXECNAME = true
# If your platform has DPS, it will have Type1 fonts too, in which case
# it is best to enable DPS support until such time as 2D's rasteriser
# can fully handle Type1 fonts in all cases. Default is "yes".
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
# DPS (Displayable PostScript) is available on Solaris machines
HAVE_DPS = no
SYSTEM_ZLIB = true
#
# Japanese manpages
#
JA_SOURCE_ENCODING = eucJP
JA_TARGET_ENCODINGS = UTF-8
# Settings for the JDI - Serviceability Agent binding.
HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
# The JDI - Serviceability Agent binding is not currently supported
# on ia64.
ifeq ($(ARCH), ia64)
INCLUDE_SA = false
else
INCLUDE_SA = true
endif
ifdef CROSS_COMPILE_ARCH
# X11 headers are not under /usr/include
OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
endif
LIB_LOCATION ?= $(LIBDIR)
此差异已折叠。
#
# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile to specify compiler flags for programs and libraries
# targeted to Windows builds. Should not contain any rules.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
# Get shared JDK settings
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
# CC compiler object code output directive flag value
CC_OBJECT_OUTPUT_FLAG = -Fo
# The suffix applied to the library name for FDLIBM
FDDLIBM_SUFFIX = lib
# The suffix applied to scripts (.bat for windows, nothing for unix)
SCRIPT_SUFFIX = .bat
# LIB_LOCATION, which for windows identifies where .exe files go, may be
# set by each GNUmakefile. The default is BINDIR.
ifndef LIB_LOCATION
LIB_LOCATION = $(BINDIR)
endif # LIB_LOCATION
ifndef PLATFORM_SRC
PLATFORM_SRC = $(BUILDDIR)/../src/windows
endif # PLATFORM_SRC
# Platform specific closed sources
ifndef OPENJDK
ifndef CLOSED_PLATFORM_SRC
CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/windows
endif
endif
# for backwards compatability, the old "win32" is used here instead of
# the more proper "windows"
PLATFORM_INCLUDE_NAME = win32
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# The following DLL's are considered MS runtime libraries and should
# not to be REBASEd, see deploy/make/common/Release.gmk.
# msvcr*.dll: Microsoft runtimes
ifeq ($(COMPILER_VERSION), VS2010)
MSVCRNN_DLL = msvcr100.dll
MSVCPNN_DLL = msvcp100.dll
endif
EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH)
# C Compiler flag definitions
#
# Default optimization
#
ifndef OPTIMIZATION_LEVEL
ifeq ($(PRODUCT), java)
OPTIMIZATION_LEVEL = HIGHER
else
OPTIMIZATION_LEVEL = LOWER
endif
endif
ifndef FASTDEBUG_OPTIMIZATION_LEVEL
FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
endif
ifeq ($(CC_VERSION),msvc)
# Visual Studio compiler option definitions:
# -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy)
# -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy)
# -Ob2 More aggressive inlining
# -Og Global optimizations
# -Oi Replace some functions with intrinsic or special forms
# -fp:precise (should be the default)
# Improve floating point calculations (disables some optimizations)
# -Os Favor small code
# -Ot Favor faster code
# -Oy Frame pointer omission
# -G6 Used to be -GB?
# -GF Pool strings in read-only memory
# -Gf Pool strings in read-write memory (the default)
# -Gs Controls stack probess
# -GS Adds buffer overflow checks on stacks (the default)
# -EHsc Enables exception handling
# -Gy Function level linking only
#
CC_OPT/NONE = -Od
CC_OPT/LOWER = -O2
CC_OPT/HIGHER = -O3
CC_OPT/HIGHEST = -O3
ifeq ($(COMPILER_VERSION), VS2010)
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
AUTOMATIC_PCH_OPTION =
GX_OPTION = -EHsc
GZ_OPTION = -RTC1
ifeq ($(ARCH_DATA_MODEL), 32)
CC_OPT/HIGHEST = -O2
CC_OPT/HIGHER = -O1
CC_OPT/LOWER = -O1
else
CC_OPT/HIGHEST = -O2
CC_OPT/HIGHER = -O1
CC_OPT/LOWER = -O1
endif
endif
else # CC_VERSION
# GCC not supported, but left for historical reference...
CC_OPT/NONE =
CC_OPT/LOWER = -O2
CC_OPT/HIGHER = -O2
CC_OPT/HIGHEST = -O3
endif
CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
# Select the runtime support library carefully, need to be consistent
#
# Visual Studio Runtime compiler option definitions:
# -MD Use dynamic multi-threaded runtime library
# -MDd Use debug version (don't use, doesn't mix with -MD DLL's)
# -MT Use static multi-threaded runtime library (-ML is going away)
# -MTd Use static debug version (better than -MDd, no runtime issues)
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd)
#
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll
#
# If MS_RUNTIME_STATIC is requested we may have a problem, it is no longer
# supported by VS2010
ifneq ($(MS_RUNTIME_STATIC),true)
MS_RUNTIME_OPTION=-MD
endif
# The _DEBUG macro option (changes things like malloc to use debug version)
MS_RUNTIME_DEBUG_OPTION=
MS_RC_DEBUG_OPTION=
# Externally set environment variable can force any build to use the debug vers
ifeq ($(MFC_DEBUG), true)
ifeq ($(MS_RUNTIME_STATIC),true)
MS_RUNTIME_OPTION=-MTd
else
# This MS debugging flag forces a dependence on the debug
# version of the runtime library (MSVCR*D.DLL), as does -MDd.
# We cannot re-distribute this debug runtime.
MS_RUNTIME_OPTION=-MDd
endif
MS_RUNTIME_DEBUG_OPTION= -D_DEBUG
MS_RC_DEBUG_OPTION= -d _DEBUG
endif
# Always add _STATIC_CPPLIB definition
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB
# Silence the warning about using _STATIC_CPPLIB
ifneq ($(SHOW_ALL_WARNINGS),true)
# Needed with VS2010 to turn off the deprecated warning.
STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB
endif
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION)
ifeq ($(CC_VERSION),msvc)
# Visual Studio compiler option definitions:
# -Zi Cause *.pdb file to be created, full debug information
# -Z7 Full debug inside the .obj, no .pdb
# -Zd Basic debug, no local variables? In the .obj
# -Zl Don't add runtime library name to obj file?
# -Od Turns off optimization and speeds compilation
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?)
# -nologo Don't print out startup message
# /D _STATIC_CPPLIB
# Use static link for the C++ runtime (so msvcpnn.dll not needed)
#
CFLAGS_COMMON += -Zi -nologo
CFLAGS_OPT = $(CC_OPT)
CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION)
CFLAGS_VS2010 += -Zc:wchar_t-
# All builds get the same runtime setting
CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION))
LDEBUG = /debug
ifeq ($(VTUNE_SUPPORT), true)
OTHER_CFLAGS = -Z7 -Ox
LDEBUG += /pdb:NONE
endif
# VS2010, always need safe exception handlers, not needed on 64bit
ifeq ($(ARCH_DATA_MODEL), 32)
LFLAGS_VS2010 += -SAFESEH
endif
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file
BASELFLAGS = -nologo /opt:REF /incremental:no
LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION))
LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION))
endif
#
# Preprocessor macro definitions
#
CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN
ifeq ($(ARCH), amd64)
CPPFLAGS_COMMON += -D_AMD64_ -Damd64
else
CPPFLAGS_COMMON += -D_X86_ -Dx86
endif
CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN
#
# Output options (use specific filenames to avoid parallel compile errors)
#
CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map
#
# Use -wdNNNN to disable warning NNNN.
# C4800 is a warning about bool performance casts (can't make go away)
#
COMPILER_WARNINGS_TO_IGNORE = 4800
CFLAGS_COMMON += $(COMPILER_WARNINGS_TO_IGNORE:%=-wd%)
#
# Treat compiler warnings as errors, if requested
#
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL)
ifeq ($(COMPILER_WARNINGS_FATAL),true)
CFLAGS_COMMON += -WX
endif
# Turn off some warnings by default, enable them all if asked.
ifneq ($(SHOW_ALL_WARNINGS),true)
# The -D _CRT_SECURE_NO_DEPRECATE turns off security/deprecated warnings on
# the standard C library functions like strcpy.
CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE
# The -D _CRT_NONSTDC_NO_DEPRECATE turns off deprecation warnings about using
# non-standard C POSIX functions.
CFLAGS_COMMON += -D _CRT_NONSTDC_NO_DEPRECATE
endif
CPPFLAGS_OPT = -DNDEBUG
CPPFLAGS_DBG = -DDEBUG -DLOGGING
CXXFLAGS_COMMON = $(CFLAGS_COMMON)
CXXFLAGS_OPT = $(CFLAGS_OPT)
CXXFLAGS_DBG = $(CFLAGS_DBG)
ifneq ($(LIBRARY),fdlibm)
EXTRA_LIBS += advapi32.lib
endif
#
# Path and option to link against the VM, if you have to.
#
JVMLIB = $(LIBDIR)/jvm.lib
JAVALIB = $(LIBDIR)/java.lib
ifeq ($(CC_VERSION), msvc)
CC_DEPEND = -FD
CC_DEPEND_FILTER =
else # CC_VERSION
# not supported, but left for historical reference...
CC_DEPEND = -MM
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g'
endif # CC_VERSION
LIBRARY_SUFFIX = dll
LIB_SUFFIX = lib
# Settings for the JDI - Serviceability Agent binding.
HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/bin
SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX)
SAMAP_NAME = $(LIB_PREFIX)sawindbg.map
SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb
ifeq ($(ARCH), ia64)
# SA will never be supported here.
INCLUDE_SA = false
else
INCLUDE_SA = true
endif
# Settings for the VERSIONINFO tap on windows.
VERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc
ifneq ($(JDK_BUILD_NUMBER),)
COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//')
else
COOKED_BUILD_NUMBER = 0
endif
# If the update version contains non-numeric characters, we need
# to massage it into a numeric format.
# We use the following formula:
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION
#
# Here are some examples:
# 1.5.0 b01 -> 5,0,0,1
# 1.5.0_10 b01 -> 5,0,100,1
# 1.4.2 b01 -> 4,2,0,1
# 1.4.2_02 b01 -> 4,2,20,1
# 1.4.2_02a b01 -> 4,2,21,1
# 1.4.2_02b b01 -> 4,2,22,1
ifdef JDK_UPDATE_VERSION
VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345")
CAB_CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}')
CAB_CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}')
CAB_CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}')
JDK_UPDATE_META_TAG := U$(MARKETING_NUMBER)
ifeq ($(CAB_CHAR3),)
CAB_CHAR3 := 0
endif
ifeq ($(CAB_CHAR1), 0)
JDK_UPDATE_VER := $(CAB_CHAR2)$(CAB_CHAR3)
else
JDK_UPDATE_VER := $(CAB_CHAR1)$(CAB_CHAR2)$(CAB_CHAR3)
endif
else
JDK_UPDATE_VER := 0
endif
#RC_FLAGS = /l 0x409 /r
#ifeq ($(VARIANT), OPT)
# RC_FLAGS += -d NDEBUG
#else
# RC_FLAGS += $(MS_RC_DEBUG_OPTION)
#endif
# Values for the RC variables defined in RC_FLAGS
#JDK_RC_BUILD_ID = $(FULL_VERSION)
#JDK_RC_COMPANY = $(COMPANY_NAME)
#JDK_RC_COMPONENT = $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) binary
#JDK_RC_VER = \
# $(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
#JDK_RC_COPYRIGHT = Copyright \xA9 $(COPYRIGHT_YEAR)
#JDK_RC_NAME = \
# $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG)
#JDK_RC_FVER = \
# $(JDK_MINOR_VERSION),$(JDK_MICRO_VERSION),$(JDK_UPDATE_VER),$(COOKED_BUILD_NUMBER)
# JDK name required here
#RC_FLAGS += -d "JDK_BUILD_ID=$(JDK_RC_BUILD_ID)" \
# -d "JDK_COMPANY=$(JDK_RC_COMPANY)" \
# -d "JDK_COMPONENT=$(JDK_RC_COMPONENT)" \
# -d "JDK_VER=$(JDK_RC_VER)" \
# -d "JDK_COPYRIGHT=$(JDK_RC_COPYRIGHT)" \
# -d "JDK_NAME=$(JDK_RC_NAME)" \
# -d "JDK_FVER=$(JDK_RC_FVER)"
# Enable 7-Zip LZMA file (de)compression for Java Kernel if it is available
ifeq ($(ARCH_DATA_MODEL), 32)
ifneq ($(KERNEL), off)
# This is a hack to use until 7-Zip (and UPX) bundles can be put
# under /java/devtools.
ifndef DEPLOY_TOPDIR
DEPLOY_TOPDIR=$(JDK_TOPDIR)/../deploy
endif
# Uncomment this block to cause build failure if above assumption false
#DCHK = $(shell if [ ! -d $(DEPLOY_TOPDIR) ] ; then \
# $(ECHO) deploy_not_a_peer_of_j2se ; \
#fi )
#ifeq ($(DCHK), deploy_not_a_peer_of_j2se)
# If a build failure points to control coming here it means
# it means deploy is not in the same directory
# as j2se. Java Kernel can't tolerate that for the time being.
#endif
EC_TMP = $(shell if [ -d $(DEPLOY_TOPDIR)/make/lzma ] ; then \
$(ECHO) true ; \
else \
$(ECHO) false ; \
fi )
ifeq ($(EC_TMP), true)
EXTRA_COMP_INSTALL_PATH = lib\\\\deploy\\\\lzma.dll
# Crazy but true: deploy/make/plugin/jinstall/Makefile.jkernel does
# not include deploy/make/common/Defs-windows.gmk, either directly
# or indirectly. But it does include this file, so redundantly declare
# these variables that are in deploy/make/common/Defs-windows.gmk for
# the sake of the Java Kernel part of the deploy build. Whew!
EXTRA_COMP_LIB_NAME = lzma.dll
EXTRA_COMP_PATH = $(OUTPUTDIR)/tmp/deploy/lzma/win32/obj
EXTRA_COMP_CMD_PATH = $(EXTRA_COMP_PATH)/lzma.exe
EXTRA_COMP_LIB_PATH = $(EXTRA_COMP_PATH)/$(EXTRA_COMP_LIB_NAME)
endif
endif
endif
此差异已折叠。
此差异已折叠。
此差异已折叠。
#
# Copyright (c) 1998, 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for linking with mapfiles.
#
# NOTE: Not using a mapfile will expose all your extern functions and
# extern data symbols as part of your interface, so unless your
# extern names are safe from being mistaken as names from other
# libraries, you better use a mapfile, or use a unique naming
# convention on all your extern symbols.
#
# The mapfile will establish versioning by defining the exported interface.
#
# The mapfile can also force certain .o files or elf sections into the
# the different segments of the resulting library/program image.
#
# The macro FILES_m can contain any number of mapfiles.
#
# Always make sure 'all' is the default rule
mapfile_default_rule: all
ifeq ($(PLATFORM), solaris)
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
ifndef FILES_m
FILES_m = mapfile-vers
endif
# If we are re-ordering functions in this solaris library, we need to make
# sure that -xF is added to the compile lines. This option is critical and
# enables the functions to be reordered.
ifdef FILES_reorder
CFLAGS_OPT += -xF
CXXFLAGS_OPT += -xF
endif
INIT += $(TEMPDIR)/mapfile-vers
$(TEMPDIR)/mapfile-vers : $(FILES_m) $(FILES_reorder)
$(prep-target)
$(CAT) $(FILES_m) > $@
ifdef FILES_reorder
$(SED) -e 's=OUTPUTDIR=$(OUTPUTDIR)=' $(FILES_reorder) >> $@
endif
endif # VARIANT
ifndef LDNOMAP
LDMAPFLAGS_OPT = -M$(TEMPDIR)/mapfile-vers
LDMAPFLAGS_DBG = $(FILES_m:%=-M%)
endif
endif # PLATFORM
ifeq ($(PLATFORM), linux)
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
ifndef FILES_m
FILES_m = mapfile-vers
endif
endif # VARIANT
ifndef LDNOMAP
LDMAPFLAGS_OPT = $(FILES_m:%=-Xlinker -version-script=%)
LDMAPFLAGS_DBG = $(FILES_m:%=-Xlinker -version-script=%)
endif
endif # PLATFORM
LDFLAGS_OPT += $(LDMAPFLAGS_OPT)
LDFLAGS_DBG += $(LDMAPFLAGS_DBG)
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
#
# Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# The specific packages that come from or go to rt.jar and tools.jar
IMPORT_RT_PACKAGES += \
javax/annotation/processing \
javax/lang/model \
javax/tools
IMPORT_TOOLS_PACKAGES += \
com/sun/javadoc \
com/sun/source \
com/sun/tools/classfile \
com/sun/tools/doclets \
com/sun/tools/javac \
com/sun/tools/javadoc \
com/sun/tools/javah \
com/sun/tools/javap
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册