8054834: Modular Source Code

Co-authored-by: Alan Bateman <alan.bateman@oracle.com>
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Magnus Ihse Bursie <magnus.ihse.bursie@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Paul Sandoz <paul.sandoz@oracle.com>
Reviewed-by: alanb, chegar, ihse, mduigou
This commit is contained in:
Chris Hegarty 2014-08-17 15:54:13 +01:00
parent d1c0417898
commit 3bc69d393d
12567 changed files with 5941 additions and 5903 deletions
jdk/make
BuildJdk.gmkBundles.gmkCompileDemos.gmkCompileInterimRmic.gmkCompileJavaClasses.gmkCompileLaunchers.gmkCopyFiles.gmkCopySamples.gmkCreateJars.gmkCreatePolicyJars.gmkCreateSecurityJars.gmkImages.gmkImport.gmkModulesXml.gmkProfiles.gmkSetup.gmkTools.gmkUnpackSecurity.gmk
bundle
copy
gendata
gensrc
launcher
lib

@ -1,142 +0,0 @@
#
# Copyright (c) 1995, 2014, 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.
#
# This must be the first rule
default: all
# Inclusion of this pseudo-target will cause make to execute this file
# serially, regardless of -j. Recursively called makefiles will not be
# affected, however. This is required for correct dependency management.
.NOTPARALLEL:
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# Include Profile information
include ProfileNames.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, BuildJdk.gmk))
import: import-only
import-only:
# Import (corba jaxp jaxws langtools hotspot)
+$(MAKE) -f Import.gmk
gensrc: import gensrc-only
gensrc-only:
+$(MAKE) -f GenerateSources.gmk
# Ok, now gensrc is fully populated.
gendata: gensrc gendata-only
gendata-only:
+$(MAKE) -f GenerateData.gmk
classes: gendata classes-only
classes-only:
+$(MAKE) -f CompileJavaClasses.gmk
# The classes are now built and
# any javah files have now been generated.
libs: classes libs-only
libs-only:
+$(MAKE) -f CompileNativeLibraries.gmk
launchers: libs launchers-only
launchers-only:
# Finally compile the launchers.
+$(MAKE) -f CompileLaunchers.gmk
genclasses: launchers genclasses-only
genclasses-only:
# Generate classes that have other sources. Needs
# to execute launchers.
+$(MAKE) -f GenerateClasses.gmk
securityjars: genclasses securityjars-only
securityjars-only:
+$(MAKE) -f CreateSecurityJars.gmk
jdk: securityjars
# Now we have a complete jdk, which you can run.
# It is not yet wrapped up as an installed image.
demos:
# The demos are compiled against this jdk.
+$(MAKE) -f CompileDemos.gmk
# Now copy the sample sources into the jdk.
+$(MAKE) -f CopySamples.gmk
# Create the final jdk and jre images, to be wrapped up
# into packages, or installed. Ensure PROFILE is not set
# in these cases.
images:
+$(MAKE) PROFILE="" -f CreateJars.gmk
+$(MAKE) PROFILE="" -f Images.gmk
ifeq ($(OPENJDK_TARGET_OS), macosx)
+$(MAKE) -f Bundles.gmk
endif
overlay-images:
+$(MAKE) -f CompileLaunchers.gmk OVERLAY_IMAGES=true
+$(MAKE) -f Images.gmk overlay-images
# Create Compact Profile images
$(ALL_PROFILES):
+$(MAKE) PROFILE=$@ -f CreateJars.gmk
+$(MAKE) PROFILE=$@ JRE_IMAGE_DIR=$(IMAGES_OUTPUTDIR)/j2re-$(word $(call profile_number,$@),$(PROFILE_NAMES))-image -f Images.gmk profile-image
profiles: $(ALL_PROFILES)
sign-jars:
+$(MAKE) -f SignJars.gmk
BINARIES := $(notdir $(wildcard $(JDK_IMAGE_DIR)/bin/*))
INSTALLDIR := openjdk-$(RELEASE)
# Install the jdk image, in a very crude way. Not taking into
# account, how to install properly on macosx or windows etc.
install:
echo Installing jdk image into $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
echo and creating $(words $(BINARIES)) links from $(INSTALL_PREFIX)/bin into the jdk.
$(MKDIR) -p $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
$(RM) -r $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/*
$(CP) -rp $(JDK_IMAGE_DIR)/* $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)
$(MKDIR) -p $(INSTALL_PREFIX)/bin
$(RM) $(addprefix $(INSTALL_PREFIX)/bin/, $(BINARIES))
$(foreach b, $(BINARIES), $(LN) -s $(INSTALL_PREFIX)/jvm/$(INSTALLDIR)/bin/$b $(INSTALL_PREFIX)/bin/$b &&) true
# The all target builds the JDK, but not the images
all: jdk
.PHONY: import gensrc gendata classes libs launchers genclasses
.PHONY: import-only gensrc-only gendata-only classes-only libs-only launchers-only genclasses-only
.PHONY: all jdk demos images overlay-images bundles install
.PHONY: profiles $(ALL_PROFILES)

@ -35,7 +35,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
# JDK_BUNDLE_DIR and JRE_BUNDLE_DIR are defined in SPEC.
MACOSX_SRC := $(JDK_TOPDIR)/src/macosx
MACOSX_PLIST_SRC := $(JDK_TOPDIR)/make/bundle
# All these OPENJDK checks are needed since there is no coherency between
# these values in open and closed. Should probably be fixed.
@ -106,7 +106,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
< $(MACOSX_SRC)/bundle/JDK-Info.plist > $@
< $(MACOSX_PLIST_SRC)/JDK-Info.plist > $@
$(JRE_BUNDLE_DIR)/Info.plist: $(SPEC)
$(ECHO) Creating $(patsubst $(OUTPUT_ROOT)/%,%,$@)
@ -117,7 +117,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
-e "s/@@PLATFORM_VERSION@@/$(BUNDLE_PLATFORM_VERSION)/g" \
-e "s/@@VERSION@@/$(BUNDLE_VERSION)/g" \
-e "s/@@VENDOR@@/$(BUNDLE_VENDOR)/g" \
< $(MACOSX_SRC)/bundle/JRE-Info.plist > $@
< $(MACOSX_PLIST_SRC)/JRE-Info.plist > $@
jdk-bundle: $(JDK_TARGET_LIST) $(JDK_BUNDLE_DIR)/MacOS/libjli.dylib \
$(JDK_BUNDLE_DIR)/Info.plist

@ -31,9 +31,9 @@ include JavaCompilation.gmk
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
include SetupJava.gmk
# Prepare the find cache. Only used if running on windows.
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
# Append demo goals to this variable.
@ -43,12 +43,18 @@ BUILD_DEMOS =
# Now every other demo has its own quirks where to put the
# READMEs and other files.
DEMO_SHARE_SRC := $(JDK_TOPDIR)/src/demo/share
DEMO_CLOSED_SHARE_SRC := $(JDK_TOPDIR)/src/closed/demo/share
DEMO_SOLARIS_SRC := $(JDK_TOPDIR)/src/demo/solaris
DEMO_OS_API_SRC := $(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_API_DIR)
VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
##################################################################################################
define SetupAppletDemo
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_APPLET_$1, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/$3share/demo/applets/$1, \
SRC := $(JDK_TOPDIR)/src/$3demo/share/applets/$1, \
BIN := $(JDK_OUTPUTDIR)/demo/applets/$1, \
COPY := .html .java .xyz .obj .au .gif, \
DISABLE_SJAVAC := $2))
@ -96,10 +102,11 @@ define SetupDemo
# Param 11 = Extra manifest attribute
# Param 12 = Suffix for compiler setup name
$1_SRC_BASE := $(JDK_TOPDIR)/src/$6demo/share/$2/$1
# In some demos the source is found in a subdir called src.
$1_MAIN_SRC := $$(wildcard $(JDK_TOPDIR)/src/$6share/demo/$2/$1/src)
$1_MAIN_SRC := $$(wildcard $$($1_SRC_BASE)/src)
ifeq ($$($1_MAIN_SRC), )
$1_MAIN_SRC := $(JDK_TOPDIR)/src/$6share/demo/$2/$1
$1_MAIN_SRC := $$($1_SRC_BASE)
endif
ifneq ($8, )
@ -129,11 +136,11 @@ define SetupDemo
endif
# Copy files.
$1_COPY_TARGETS := $$(patsubst $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%, \
$1_COPY_TARGETS := $$(patsubst $$($1_SRC_BASE)/%, \
$(JDK_OUTPUTDIR)/demo/$2/$1/%, \
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/$6share/demo/$2/$1/, $7)))
$$(wildcard $$(addprefix $$($1_SRC_BASE)/, $7)))
ifneq ($7, )
$(JDK_OUTPUTDIR)/demo/$2/$1/%: $(JDK_TOPDIR)/src/$6share/demo/$2/$1/%
$(JDK_OUTPUTDIR)/demo/$2/$1/%: $$($1_SRC_BASE)/%
$$(call install-file)
$(CHMOD) -f ug+w $$@
@ -145,10 +152,10 @@ endef
$(eval $(call SetupDemo,CodePointIM,jfc,,CodePointIM,,,*.html))
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/_the.services: \
$(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar \
$(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
$(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor
(cd $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM && \
$(MKDIR) -p _the.tmp/META-INF/services && \
$(CP) $(JDK_TOPDIR)/src/share/demo/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
$(CP) $(DEMO_SHARE_SRC)/jfc/CodePointIM/java.awt.im.spi.InputMethodDescriptor _the.tmp/META-INF/services && \
cd _the.tmp && \
$(JAR) uf $(JDK_OUTPUTDIR)/demo/jfc/CodePointIM/CodePointIM.jar META-INF/services/java.awt.im.spi.InputMethodDescriptor && \
cd META-INF/services && \
@ -182,15 +189,15 @@ ifndef OPENJDK
$(eval $(call SetupDemo,Java2D,jfc,,java2d.Java2Demo,,closed/,*.html README*,Java2Demo))
$(eval $(call SetupDemo,Stylepad,jfc,,Stylepad, \
$(JDK_TOPDIR)/src/share/demo/jfc/Notepad,closed/,*.txt,,$(JDK_TOPDIR)/src/share/demo/jfc/Notepad/README.txt))
$(DEMO_SHARE_SRC)/jfc/Notepad,closed/,*.txt,,$(DEMO_SHARE_SRC)/jfc/Notepad/README.txt))
$(eval $(call SetupDemo,SwingSet2,jfc,,SwingSet2,,closed/,README* *.html,,,.java COPYRIGHT, \
SplashScreen-Image: resources/images/splash.png,true))
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%, \
BUILD_DEMOS += $(patsubst $(DEMO_CLOSED_SHARE_SRC)/nbproject/%, \
$(JDK_OUTPUTDIR)/demo/nbproject/%, \
$(call CacheFind, $(JDK_TOPDIR)/src/closed/share/demo/nbproject))
$(call CacheFind, $(DEMO_CLOSED_SHARE_SRC)/nbproject))
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/closed/share/demo/nbproject/%
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_CLOSED_SHARE_SRC)/nbproject/%
$(call install-file)
$(CHMOD) -f ug+w $@
endif
@ -215,12 +222,12 @@ define SetupJVMTIDemo
# Param 8 = libs for linux
# Param 9 = extra directories with required sources
BUILD_DEMO_JVMTI_$1_EXTRA_SRC := \
$$(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/$1) \
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)) \
$$(wildcard $(DEMO_OS_API_SRC)/jvmti/$1) \
$$(wildcard $$(addprefix $(DEMO_SHARE_SRC)/jvmti/, $2)) \
$9
BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE := \
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/README.txt) \
$$(wildcard $$(addprefix $(JDK_TOPDIR)/src/share/demo/jvmti/, $2)/sample.makefile.txt)
$$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/README.txt, $2)) \
$$(wildcard $$(patsubst %, $(DEMO_SHARE_SRC)/jvmti/%/sample.makefile.txt, $2))
BUILD_DEMO_JVMTI_$1_EXTRA_INC := $$(addprefix -I, $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC))
BUILD_DEMO_JVMTI_$1_LANG := C
ifneq (, $4)
@ -230,7 +237,7 @@ define SetupJVMTIDemo
$1_EXTRA_CXX := $(LDFLAGS_CXX_JDK) $(LIBCXX)
endif
$1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 \
$1_CXXFLAGS := $(CXXFLAGS_JDKLIB) -I$(DEMO_SHARE_SRC)/jvmti/$1 \
$$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3 \
$(CXXFLAGS_DEBUG_SYMBOLS)
ifeq ($1-$(OPENJDK_TARGET_CPU_ARCH), waiters-sparc)
@ -241,11 +248,11 @@ define SetupJVMTIDemo
# Workaround for CFLAGS_JDKLIB containing ',' on solaris. If this is added as 'CFLAGS' to the
# eval call below, the comma gets expanded too early.
BUILD_DEMO_JVMTI_$1_CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_DEBUG_SYMBOLS) \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
-I$(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_INC) $3
# Remove the -incremental:no setting to get .ilk-files like in the old build.
$$(eval $$(call SetupNativeCompilation,BUILD_DEMO_JVMTI_$1, \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
LANG := $$(BUILD_DEMO_JVMTI_$1_LANG), \
OPTIMIZATION := LOW, \
CXXFLAGS := $$($1_CXXFLAGS), \
@ -256,7 +263,7 @@ define SetupJVMTIDemo
LDFLAGS_SUFFIX_windows := $6, \
LDFLAGS_SUFFIX_solaris := $7 -lc, \
LDFLAGS_SUFFIX_linux := $8, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
VERSIONINFO_RESOURCE := $(VERSION_INFO_RESOURCE), \
RC_FLAGS := $$(RC_FLAGS) \
-D "JDK_FNAME=$1.dll" \
-D "JDK_INTERNAL_NAME=$1" \
@ -266,18 +273,18 @@ define SetupJVMTIDemo
LIBRARY := $1))
$$(eval $$(call SetupZipArchive,BUILD_DEMO_JVMTI_SRC_$1, \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
SRC := $(DEMO_SHARE_SRC)/jvmti/$1 $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC), \
EXCLUDE_FILES := $$(BUILD_DEMO_JVMTI_$1_EXTRA_SRC_EXCLUDE), \
ZIP := $(JDK_OUTPUTDIR)/demo/jvmti/$1/src.zip))
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(JDK_TOPDIR)/src/share/demo/jvmti/$1/README.txt
$(JDK_OUTPUTDIR)/demo/jvmti/$1/README.txt: $(DEMO_SHARE_SRC)/jvmti/$1/README.txt
$$(call install-file)
$(CHMOD) -f ug+w $$@
ifneq (, $$(wildcard $(JDK_TOPDIR)/src/share/demo/jvmti/$1/*.java))
ifneq (, $$(wildcard $(DEMO_SHARE_SRC)/jvmti/$1/*.java))
$$(eval $$(call SetupJavaCompilation,BUILD_DEMO_JVMTI_$1_JAVA, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/$1, \
SRC := $(DEMO_SHARE_SRC)/jvmti/$1, \
BIN := $(JDK_OUTPUTDIR)/democlasses/jvmti/$1, \
COPY := $(PATTERNS_TO_COPY), \
JAR := $(JDK_OUTPUTDIR)/demo/jvmti/$1/$1.jar, \
@ -329,40 +336,39 @@ $(eval $(call SetupJVMTIDemo,versionCheck, agent_util))
##################################################################################################
# The jpda demo (com/sun/tools/example) is oddly enough stored in src/share/classes.
# At least, we do not need to compile the jpda demo, just jar/zip up the sources.
JPDA_SOURCES := $(call CacheFind, $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example)
# The number of files are few enough so that we can use echo safely below to list them.
JPDA_FILES := $(subst $(JDK_TOPDIR)/src/share/classes/,,$(JPDA_SOURCES))
$(JDK_OUTPUTDIR)/demo/jpda/src.zip: $(JPDA_SOURCES)
$(MKDIR) -p $(@D)
(cd $(JDK_TOPDIR)/src/share/classes && $(ZIP) -qru $@ com -i "com/sun/tools/example/*")
$(JDK_OUTPUTDIR)/demo/jpda/examples.jar: $(JPDA_SOURCES)
$(MKDIR) -p $(@D)
$(RM) $(@D)/_the.sources
$(call ListPathsSafely,JPDA_FILES,\n, >> $(@D)/_the.sources)
$(SED) -e "s#@@RELEASE@@#$(RELEASE)#" \
-e "s#@@COMPANY_NAME@@#$(COMPANY_NAME)#" $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf > $(@D)/_the.manifest
$(ECHO) "Main-Class: " >> $(@D)/_the.manifest
(cd $(JDK_TOPDIR)/src/share/classes && $(JAR) cfm $@ $(@D)/_the.manifest @$(@D)/_the.sources)
(cd $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example && $(JAR) uf $@ README)
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README: $(JDK_TOPDIR)/src/share/classes/com/sun/tools/example/README
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README: \
$(JDK_TOPDIR)/src/demo/share/jpda/com/sun/tools/example/README
$(call install-file)
$(CHMOD) -f ug+w $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/jpda/src.zip $(JDK_OUTPUTDIR)/demo/jpda/examples.jar \
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README
$(eval $(call SetupArchive,JPDA_JAR, \
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example/README, \
SRCS := $(JDK_TOPDIR)/src/demo/share/jpda \
$(JDK_TOPDIR)/src/jdk.jdi/share/classes \
$(JDK_OUTPUTDIR)/demo/jpda/com/sun/tools/example, \
INCLUDES := com/sun/tools/example README, \
SUFFIXES := .java .html .jj README, \
JAR := $(JDK_OUTPUTDIR)/demo/jpda/examples.jar, \
MANIFEST := $(JDK_TOPDIR)/make/data/mainmanifest/manifest.mf, \
EXTRA_MANIFEST_ATTR := Main-Class:$$(SPACE), \
SKIP_METAINF := true))
$(eval $(call SetupZipArchive,JPDA_ZIP, \
SRC := $(JDK_TOPDIR)/src/demo/share/jpda \
$(JDK_TOPDIR)/src/jdk.jdi/share/classes, \
INCLUDES := com/sun/tools/example, \
SUFFIXES := .java .html .jj README, \
ZIP := $(JDK_OUTPUTDIR)/demo/jpda/src.zip))
BUILD_DEMOS += $(JPDA_JAR) $(JPDA_ZIP)
##################################################################################################
$(JDK_OUTPUTDIR)/demo/management/index.html: $(JDK_TOPDIR)/src/share/demo/management/index.html
$(JDK_OUTPUTDIR)/demo/management/index.html: $(DEMO_SHARE_SRC)/management/index.html
$(call install-file)
$(CHMOD) -f ug+w $@
$(JDK_OUTPUTDIR)/demo/jvmti/index.html: $(JDK_TOPDIR)/src/share/demo/jvmti/index.html
$(JDK_OUTPUTDIR)/demo/jvmti/index.html: $(DEMO_SHARE_SRC)/jvmti/index.html
$(call install-file)
$(CHMOD) -f ug+w $@
@ -373,23 +379,23 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/management/index.html \
# The netbeans project files are copied into the demo directory.
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
$(JDK_OUTPUTDIR)/demo/nbproject/%, \
$(filter-out $(JDK_TOPDIR)/src/share/demo/nbproject/jfc/SwingApplet%, \
$(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject)))
$(filter-out $(DEMO_SHARE_SRC)/nbproject/jfc/SwingApplet%, \
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject)))
else
BUILD_DEMOS += $(patsubst $(JDK_TOPDIR)/src/share/demo/nbproject/%, \
BUILD_DEMOS += $(patsubst $(DEMO_SHARE_SRC)/nbproject/%, \
$(JDK_OUTPUTDIR)/demo/nbproject/%, \
$(call CacheFind, $(JDK_TOPDIR)/src/share/demo/nbproject))
$(call CacheFind, $(DEMO_SHARE_SRC)/nbproject))
endif
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(JDK_TOPDIR)/src/share/demo/nbproject/%
$(JDK_OUTPUTDIR)/demo/nbproject/%: $(DEMO_SHARE_SRC)/nbproject/%
$(call install-file)
$(CHMOD) -f ug+w $@
##################################################################################################
$(JDK_OUTPUTDIR)/demo/README: $(JDK_TOPDIR)/src/share/demo/README
$(JDK_OUTPUTDIR)/demo/README: $(DEMO_SHARE_SRC)/README
$(call install-file)
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README
@ -398,11 +404,11 @@ BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/README
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/%: $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/%
$(JDK_OUTPUTDIR)/democlasses/jni/Poller/%: $(DEMO_SOLARIS_SRC)/jni/Poller/%
$(call install-file)
$(CHMOD) -f ug+w $@
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt: $(JDK_TOPDIR)/src/solaris/demo/jni/Poller/README.txt
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt: $(DEMO_SOLARIS_SRC)/jni/Poller/README.txt
$(call install-file)
$(CHMOD) -f ug+w $@
@ -411,7 +417,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
$(eval $(call SetupJavaCompilation,BUILD_DEMO_POLLER_JAR, \
SETUP := GENERATE_USINGJDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
BIN := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
HEADERS := $(JDK_OUTPUTDIR)/democlasses/jni/Poller, \
JAR := $(JDK_OUTPUTDIR)/demo/jni/Poller/Poller.jar, \
@ -426,7 +432,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/demo/jni/Poller/README.txt
$(eval $(call SetupNativeCompilation,BUILD_LIBPOLLER, \
SRC := $(JDK_TOPDIR)/src/solaris/demo/jni/Poller, \
SRC := $(DEMO_SOLARIS_SRC)/jni/Poller, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(SHARED_LIBRARY_FLAGS) \
@ -453,7 +459,8 @@ endif
##################################################################################################
ifndef OPENJDK
DB_DEMO_ZIPFILE := $(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)
DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
DB_DEMO_ZIPFILE := $(wildcard $(DB_ZIP_DIR)/*.zip)
$(JDK_OUTPUTDIR)/demo/_the.db.unzipped: $(DB_DEMO_ZIPFILE)
$(MKDIR) -p $(@D)
@ -465,10 +472,10 @@ ifndef OPENJDK
# Copy this after the unzip above to avoid race with directory creation and mv command.
$(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html: \
$(JDK_TOPDIR)/src/closed/share/db/README-JDK-DEMOS.html \
$(DB_ZIP_DIR)/README-JDK-DEMOS.html \
| $(JDK_OUTPUTDIR)/demo/_the.db.unzipped
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
BUILD_DEMOS += $(JDK_OUTPUTDIR)/demo/_the.db.unzipped $(JDK_OUTPUTDIR)/demo/db/README-JDK-DEMOS.html
endif

@ -0,0 +1,54 @@
#
# Copyright (c) 2011, 2013, 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
include JavaCompilation.gmk
include SetupJava.gmk
##########################################################################################
RMIC_PKGS := \
sun/rmi/rmic \
sun/tools/asm \
sun/tools/java \
sun/tools/javac \
sun/tools/tree \
sun/tools/util \
#
$(eval $(call SetupJavaCompilation,BUILD_INTERIM_RMIC, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/src/jdk.rmic/share/classes, \
INCLUDES := $(RMIC_PKGS), \
BIN := $(JDK_OUTPUTDIR)/interim_rmic_classes, \
COPY := .properties, \
JAVAC_SOURCE_PATH_OVERRIDE := $(addprefix $(JDK_TOPDIR)/src/jdk.rmic/share/classes/, $(RMIC_PKGS))))
##########################################################################################
all: $(BUILD_INTERIM_RMIC)

@ -1,411 +0,0 @@
#
# Copyright (c) 2011, 2013, 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
include JavaCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
JARS :=
EXFILES :=
EXCLUDES :=
##########################################################################################
EXCLUDES += \
com/sun/tools/example/trace \
com/sun/tools/example/debug/bdi \
com/sun/tools/example/debug/event \
com/sun/tools/example/debug/gui
ifeq ($(RMICONNECTOR_IIOP), false)
EXCLUDES += com/sun/jmx/remote/protocol/iiop
endif
ifdef OPENJDK
EXCLUDES += sun/dc \
com/sun/jmx/snmp \
sun/management/snmp \
com/sun/script
endif
ifndef OPENJDK
# There exists two versions of this file...
EXFILES := $(JDK_TOPDIR)/src/share/classes/javax/crypto/JarVerifier.java
ifeq ($(OPENJDK_TARGET_OS), windows)
# This gets built on unix platforms implicitly in the old build even though
# it's excluded in the closed build.
EXCLUDES += sun/java2d/pisces
# AccessBridge is compiled separately below.
EXFILES += AccessBridge.java \
AccessBridgeLoader.java \
com/sun/java/accessibility/util/java/awt/ChoiceTranslator.java
# This seems to never be built
EXCLUDES += com/sun/java/accessibility/extensions
endif
endif
ifneq ($(OPENJDK_TARGET_OS), solaris)
# Exclude Solaris nio and two security related files in src/share/classes
EXFILES += SolarisAclFileAttributeView.java \
SolarisFileStore.java \
SolarisFileSystem.java \
SolarisFileSystemProvider.java \
SolarisNativeDispatcher.java \
SolarisUserDefinedFileAttributeView.java \
SolarisWatchService.java \
SolarisAclFileAttributeView.java \
sun/nio/ch/DevPollArrayWrapper.java \
sun/nio/ch/DevPollSelectorImpl.java \
sun/nio/ch/DevPollSelectorProvider.java \
sun/nio/ch/EventPortSelectorImpl.java \
sun/nio/ch/EventPortSelectorProvider.java \
sun/nio/ch/EventPortWrapper.java \
sun/nio/ch/SolarisAsynchronousChannelProvider.java \
sun/nio/ch/SolarisEventPort.java \
sun/tools/attach/SolarisAttachProvider.java \
sun/tools/attach/SolarisVirtualMachine.java
EXCLUDES += com/oracle/security
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
# Don't build GTK L&F on Windows
EXCLUDES += com/sun/java/swing/plaf/gtk
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
EXFILES += sun/tools/attach/LinuxAttachProvider.java \
sun/tools/attach/LinuxVirtualMachine.java \
sun/nio/ch/EPoll.java \
sun/nio/ch/EPollArrayWrapper.java \
sun/nio/ch/EPollPort.java \
sun/nio/ch/EPollSelectorImpl.java \
sun/nio/ch/EPollSelectorProvider.java \
sun/nio/ch/LinuxAsynchronousChannelProvider.java \
sun/nio/fs/LinuxDosFileAttributeView.java \
sun/nio/fs/LinuxFileStore.java \
sun/nio/fs/LinuxFileSystem.java \
sun/nio/fs/LinuxFileSystemProvider.java \
sun/nio/fs/MagicFileTypeDetector.java \
sun/nio/fs/LinuxNativeDispatcher.java \
sun/nio/fs/LinuxUserDefinedFileAttributeView.java \
sun/nio/fs/LinuxWatchService.java
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
EXFILES += sun/nio/ch/BsdAsynchronousChannelProvider.java \
sun/nio/ch/KQueue.java \
sun/nio/ch/KQueuePort.java \
sun/nio/fs/BsdFileStore.java \
sun/nio/fs/BsdFileSystem.java \
sun/nio/fs/BsdFileSystemProvider.java \
sun/nio/fs/BsdNativeDispatcher.java \
sun/nio/fs/MacOSXFileSystemProvider.java \
sun/nio/fs/MacOSXFileSystem.java \
sun/nio/fs/MacOSXNativeDispatcher.java \
sun/tools/attach/BsdAttachProvider.java \
sun/tools/attach/BsdVirtualMachine.java
endif
ifneq ($(OPENJDK_TARGET_OS),aix)
EXFILES+=sun/nio/ch/AixAsynchronousChannelProvider.java \
sun/nio/ch/AixPollPort.java \
sun/nio/fs/AixFileStore.java \
sun/nio/fs/AixFileSystem.java \
sun/nio/fs/AixFileSystemProvider.java \
sun/nio/fs/AixNativeDispatcher.java \
sun/tools/attach/AixAttachProvider.java \
sun/tools/attach/AixVirtualMachine.java
endif
# Exclude BreakIterator classes that are just used in compile process to generate
# data files and shouldn't go in the product
EXFILES += sun/text/resources/BreakIteratorRules.java \
sun/text/resources/BreakIteratorRules_th.java
# TODO: Add BUILD_HEADLESS_ONLY to configure?
ifdef BUILD_HEADLESS_ONLY
EXCLUDES += sun/applet
endif
ifdef OPENJDK
EXCLUDES += sun/java2d/cmm/kcms
endif
# Used on windows and macosx
ifeq (, $(filter $(OPENJDK_TARGET_OS), windows macosx))
EXFILES += sun/awt/AWTCharset.java
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
# exclude all X11 on Mac, we can't exclude some like below or we'll have compilation errors
EXCLUDES += sun/awt/X11
else
# TBD: figure out how to eliminate this long list
EXFILES += sun/awt/X11/ScreenFormat.java \
sun/awt/X11/XArc.java \
sun/awt/X11/XChar2b.java \
sun/awt/X11/XCharStruct.java \
sun/awt/X11/XClassHint.java \
sun/awt/X11/XComposeStatus.java \
sun/awt/X11/XExtCodes.java \
sun/awt/X11/XFontProp.java \
sun/awt/X11/XFontSetExtents.java \
sun/awt/X11/XFontStruct.java \
sun/awt/X11/XGCValues.java \
sun/awt/X11/XHostAddress.java \
sun/awt/X11/XIMCallback.java \
sun/awt/X11/XIMHotKeyTrigger.java \
sun/awt/X11/XIMHotKeyTriggers.java \
sun/awt/X11/XIMPreeditCaretCallbackStruct.java \
sun/awt/X11/XIMPreeditDrawCallbackStruct.java \
sun/awt/X11/XIMPreeditStateNotifyCallbackStruct.java \
sun/awt/X11/XIMStatusDrawCallbackStruct.java \
sun/awt/X11/XIMStringConversionCallbackStruct.java \
sun/awt/X11/XIMStringConversionText.java \
sun/awt/X11/XIMStyles.java \
sun/awt/X11/XIMText.java \
sun/awt/X11/XIMValuesList.java \
sun/awt/X11/XImage.java \
sun/awt/X11/XKeyboardControl.java \
sun/awt/X11/XKeyboardState.java \
sun/awt/X11/XOMCharSetList.java \
sun/awt/X11/XOMFontInfo.java \
sun/awt/X11/XOMOrientation.java \
sun/awt/X11/XPoint.java \
sun/awt/X11/XRectangle.java \
sun/awt/X11/XSegment.java \
sun/awt/X11/XStandardColormap.java \
sun/awt/X11/XTextItem.java \
sun/awt/X11/XTextItem16.java \
sun/awt/X11/XTextProperty.java \
sun/awt/X11/XTimeCoord.java \
sun/awt/X11/XWindowChanges.java \
sun/awt/X11/XdbeSwapInfo.java \
sun/awt/X11/XmbTextItem.java \
sun/awt/X11/XwcTextItem.java
endif
# Exclude another implicitly not included file.
EXFILES += sun/util/locale/AsciiUtil.java
ifeq (, $(filter $(OPENJDK_TARGET_OS), solaris macosx aix))
#
# only solaris, macosx and aix
#
EXFILES += sun/nio/fs/PollingWatchService.java
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
EXFILES += sun/nio/ch/AbstractPollSelectorImpl.java \
sun/nio/ch/PollSelectorProvider.java \
sun/nio/ch/SimpleAsynchronousFileChannelImpl.java
endif
# These files do not appear in the build result of the old build. This
# is because they are generated sources, but the AUTO_JAVA_FILES won't
# pick them up since they aren't generated when the source dirs are
# searched and they aren't referenced by any other classes so they won't
# be picked up by implicit compilation. On a rebuild, they are picked up
# and compiled. Exclude them here to produce the same rt.jar as the old
# build does when building just once.
EXFILES += javax/swing/plaf/nimbus/InternalFrameTitlePanePainter.java \
javax/swing/plaf/nimbus/OptionPaneMessageAreaPainter.java \
javax/swing/plaf/nimbus/ScrollBarPainter.java \
javax/swing/plaf/nimbus/SliderPainter.java \
javax/swing/plaf/nimbus/SpinnerPainter.java \
javax/swing/plaf/nimbus/SplitPanePainter.java \
javax/swing/plaf/nimbus/TabbedPanePainter.java
# Acquire a list of files that should be copied straight over to the classes.
include CopyIntoClasses.gmk
# Now we have COPY_PATTERNS, COPY_FILES and COPY_EXTRA
ifndef OPENJDK
CLOSED_SRC_DIRS := $(JDK_TOPDIR)/src/closed/share/classes \
$(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS_API_DIR)/classes
endif
# No SCTP implementation on Mac OS X or AIX. These classes should be excluded.
SCTP_IMPL_CLASSES = \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/AssociationChange.java\
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/AssociationImpl.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/PeerAddrChange.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/ResultContainer.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpChannelImpl.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpMultiChannelImpl.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpNet.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpNotification.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SctpServerChannelImpl.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/SendFailed.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/ch/sctp/Shutdown.java
MACOSX_SRC_DIRS :=
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/sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \
$(JDK_TOPDIR)/src/solaris/classes/sun/nio/fs/GnomeFileTypeDetector.java \
EXFILES += $(SCTP_IMPL_CLASSES)
endif
# The security classes should not end up in the classes directory as that will prevent them
# from working when running the exploded jdk image. Compile them separately to a different
# directory from where the jars can be created.
SECURITY_PKGS := \
com/oracle/security/ucrypto \
com/sun/crypto/provider \
javax/crypto \
sun/security/ec \
sun/security/internal \
sun/security/mscapi \
sun/security/pkcs11 \
#
AIX_SRC_DIRS :=
ifeq ($(OPENJDK_TARGET_OS),aix)
AIX_SRC_DIRS += $(JDK_TOPDIR)/src/aix/classes
# these files are duplicated in AIX_SRC_DIRS
EXFILES += $(SCTP_IMPL_CLASSES)
endif
# The JDK_USER_DEFINED_FILTER is a poor man's incremental build: by specifying
# JDK_FILTER at the make command line, only a subset of the JDK java files will
# be recompiled. If multiple paths are separated by comma, convert that into a
# space separated list.
JDK_USER_DEFINED_FILTER := $(strip $(subst $(COMMA),$(SPACE), $(JDK_FILTER)))
ifeq ($(ENABLE_SJAVAC),yes)
# With sjavac enabled, excluded sources are not even considered for linking.
# Explicitly add the security sources to sourcepath for linking.
BUILD_JDK_SOURCEPATH:=$(patsubst %,-i$(SPACE)%/*,$(SECURITY_PKGS)) \
-sourcepath $(JDK_TOPDIR)/src/share/classes
endif
$(eval $(call SetupJavaCompilation,BUILD_JDK,\
SETUP:=GENERATE_JDKBYTECODE,\
SRC:=$(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(MACOSX_SRC_DIRS) \
$(AIX_SRC_DIRS) \
$(JDK_OUTPUTDIR)/gensrc \
$(JDK_OUTPUTDIR)/gensrc_no_srczip \
$(CLOSED_SRC_DIRS),\
INCLUDES:=$(JDK_USER_DEFINED_FILTER),\
EXCLUDES:=$(EXCLUDES) $(SECURITY_PKGS),\
EXCLUDE_FILES:=$(EXFILES),\
BIN:=$(JDK_OUTPUTDIR)/classes,\
COPY:=$(COPY_PATTERNS),\
COPY_FILES:=$(COPY_FILES),\
CLEAN_FILES:=$(CLEAN_FILES),\
HEADERS:=$(JDK_OUTPUTDIR)/gensrc_headers,\
ADD_JAVAC_FLAGS:=$(BUILD_JDK_SOURCEPATH)))
##########################################################################################
$(eval $(call SetupJavaCompilation,BUILD_SECURITY, \
SETUP := GENERATE_JDKBYTECODE, \
SRC := $(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(MACOSX_SRC_DIRS) \
$(CLOSED_SRC_DIRS), \
INCLUDES := $(SECURITY_PKGS), \
EXCLUDES := $(EXCLUDES), \
EXCLUDE_FILES := $(EXFILES), \
BIN := $(JDK_OUTPUTDIR)/classes_security, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers))
$(BUILD_SECURITY): $(BUILD_JDK)
##########################################################################################
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin:
$(MKDIR) -p $(@D)
$(TOUCH) $@
##########################################################################################
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
$(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_32, \
SETUP := GENERATE_JDKBYTECODE, \
JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
SRC := $(JDK_OUTPUTDIR)/gensrc_ab/32bit, \
BIN := $(JDK_OUTPUTDIR)/classes_ab/32bit, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_ab/32))
$(BUILD_ACCESSBRIDGE_32): $(BUILD_JDK)
$(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_LEGACY, \
SETUP := GENERATE_JDKBYTECODE, \
JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
SRC := $(JDK_OUTPUTDIR)/gensrc_ab/legacy, \
BIN := $(JDK_OUTPUTDIR)/classes_ab/legacy, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_ab/legacy))
$(BUILD_ACCESSBRIDGE_LEGACY): $(BUILD_JDK)
else
$(eval $(call SetupJavaCompilation,BUILD_ACCESSBRIDGE_64, \
SETUP := GENERATE_JDKBYTECODE, \
JAVAC_FLAGS := -cp $(JDK_OUTPUTDIR)/classes, \
SRC := $(JDK_OUTPUTDIR)/gensrc_ab/64bit, \
BIN := $(JDK_OUTPUTDIR)/classes_ab/64bit, \
HEADERS := $(JDK_OUTPUTDIR)/gensrc_headers_ab/64))
$(BUILD_ACCESSBRIDGE_64): $(BUILD_JDK)
endif
endif
endif
##########################################################################################
all: $(BUILD_JDK) $(BUILD_SECURITY) $(COPY_EXTRA) \
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.tools.xjc.Plugin \
$(BUILD_ACCESSBRIDGE_32) $(BUILD_ACCESSBRIDGE_64) \
$(BUILD_ACCESSBRIDGE_LEGACY)
.PHONY: all

@ -1,694 +0,0 @@
#
# Copyright (c) 2011, 2014, 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
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/bin))
# Build tools
include Tools.gmk
BUILD_LAUNCHERS =
# When building a legacy overlay image (on solaris 64 bit), the launchers
# need to be built with a different rpath and a different output dir.
ifeq ($(OVERLAY_IMAGES), true)
ORIGIN_ROOT := /../..
OUTPUT_SUBDIR := $(OPENJDK_TARGET_CPU_ISADIR)
else
ORIGIN_ROOT := /..
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
else
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
endif
#
# Applications expect to be able to link against libjawt without invoking
# System.loadLibrary("jawt") first. This was the behaviour described in the
# devloper documentation of JAWT and what worked with OpenJDK6.
#
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
ORIGIN_ARG += $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR))
endif
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 is extra CFLAGS
# Parameter 3 is extra LDFLAGS
# Parameter 4 is extra LDFLAGS_SUFFIX_posix
# Parameter 5 is extra LDFLAGS_SUFFIX_windows
# 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 if set, link statically with c runtime on windows.
# Parameter 11 if set, override plist file on macosx.
$1_WINDOWS_JLI_LIB := $(JDK_OUTPUTDIR)/objs/libjli/jli.lib
ifneq ($6, )
$1_WINDOWS_JLI_LIB := $6
endif
$1_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc
ifneq ($8, )
$1_VERSION_INFO_RESOURCE := $8
endif
$1_LDFLAGS := $3
$1_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), macosx)
$1_PLIST_FILE := Info-cmdline.plist
ifneq ($(11), )
$1_PLIST_FILE := $(11)
ifneq ($$(findstring privileged, $$($1_PLIST_FILE)), )
$1_CODESIGN := true
endif
endif
$1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices \
-sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
$1_LDFLAGS_SUFFIX += -pthread
endif
ifeq ($(OPENJDK_TARGET_OS), aix)
$1_LDFLAGS_SUFFIX += -L$(JDK_OUTPUTDIR)/objs -ljli_static
endif
ifeq ($(USE_EXTERNAL_LIBZ), true)
$1_LDFLAGS_SUFFIX += -lz
endif
$1_OUTPUT_DIR_ARG := $9
ifeq (, $$($1_OUTPUT_DIR_ARG))
$1_OUTPUT_DIR_ARG := $(JDK_OUTPUTDIR)/bin
endif
# TODO: maybe it's better to move this if-statement out of this function
ifeq ($1, java)
$1_OPTIMIZATION_ARG := HIGH
$1_LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
else
$1_OPTIMIZATION_ARG := LOW
endif
$1_CFLAGS := $(CFLAGS_JDKEXE)
ifeq ($(10), true)
$1_CFLAGS := $(filter-out -MD, $(CFLAGS_JDKEXE))
endif
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
# if feeded with a version script which contains named tags.
ifeq ($(USING_BROKEN_SUSE_LD),yes)
ifneq ($(wildcard $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous), )
$1_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous
else
$1_MAPFILE :=
endif
else
ifneq ($(wildcard $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), )
$1_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
else
$1_MAPFILE :=
endif
endif
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1, \
SRC := $(JDK_TOPDIR)/src/share/bin, \
INCLUDE_FILES := main.c, \
LANG := C, \
OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \
CFLAGS := $$($1_CFLAGS) \
-I$(JDK_TOPDIR)/src/share/bin \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/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)"' \
-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
-DPROGNAME='"$1"' $(DPACKAGEPATH) \
$2, \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
$(ORIGIN_ARG) \
$$($1_LDFLAGS), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
LDFLAGS_linux := -lpthread \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
MAPFILE := $$($1_MAPFILE), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_posix := $4, \
LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
$(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \
LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
PROGRAM := $1, \
DEBUG_SYMBOLS := true, \
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \
-D "JDK_INTERNAL_NAME=$1" \
-D "JDK_FTYPE=0x1L" \
$7, \
MANIFEST := $(JDK_TOPDIR)/src/windows/resource/java.manifest, \
CODESIGN := $$($1_CODESIGN))
BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
ifneq (,$(filter $(OPENJDK_TARGET_OS), macosx aix))
$$(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 := $(X_LIBS) -lX11
ifeq ($(OPENJDK_TARGET_OS), macosx)
DPACKAGEPATH := -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
XLIBS :=
endif
ifdef OPENJDK
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
else
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
endif
# On windows, the debuginfo files get the same name as for java.dll. Build
# into another dir and copy selectively so debuginfo for java.dll isn't
# overwritten.
$(eval $(call SetupLauncher,java, \
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JDK_TOPDIR)/src/windows/resource/java.rc, $(JDK_OUTPUTDIR)/objs/java_objs,true))
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,javaw, \
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
endif
ifndef BUILD_HEADLESS_ONLY
$(eval $(call SetupLauncher,appletviewer, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',, \
$(XLIBS)))
endif
$(eval $(call SetupLauncher,extcheck, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,idlj, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
$(eval $(call SetupLauncher,jar, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jarsigner, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,javac, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
ifeq ($(ENABLE_SJAVAC), yes)
$(eval $(call SetupLauncher,sjavac, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
endif
$(eval $(call SetupLauncher,javadoc, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,javah, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,javap, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jdeps, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }'))
BUILD_LAUNCHER_jconsole_CFLAGS_windows := -DJAVAW
BUILD_LAUNCHER_jconsole_LDFLAGS_windows := user32.lib
$(eval $(call SetupLauncher,jconsole, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jdb, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
$(eval $(call SetupLauncher,jhat, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jinfo, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jinfo.JInfo"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
$(eval $(call SetupLauncher,jmap, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jmap.JMap"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
$(eval $(call SetupLauncher,jps, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
$(eval $(call SetupLauncher,jrunscript, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jjs, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
$(eval $(call SetupLauncher,jsadebugd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
$(eval $(call SetupLauncher,jstack, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jstack.JStack"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
$(eval $(call SetupLauncher,jstat, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
$(eval $(call SetupLauncher,jstatd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
$(eval $(call SetupLauncher,keytool, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,native2ascii, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
ifndef BUILD_HEADLESS_ONLY
$(eval $(call SetupLauncher,policytool, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',, \
$(XLIBS)))
endif
$(eval $(call SetupLauncher,rmic, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,schemagen, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
$(eval $(call SetupLauncher,serialver, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
$(eval $(call SetupLauncher,xjc, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
$(eval $(call SetupLauncher,wsgen, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
$(eval $(call SetupLauncher,wsimport, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
$(eval $(call SetupLauncher,orbd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
$(eval $(call SetupLauncher,servertool, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
$(eval $(call SetupLauncher,tnameserv, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
$(eval $(call SetupLauncher,pack200, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) }'))
$(eval $(call SetupLauncher,rmid, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
$(eval $(call SetupLauncher,rmiregistry, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
$(eval $(call SetupLauncher,jcmd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,kinit, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
$(eval $(call SetupLauncher,klist, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
$(eval $(call SetupLauncher,ktab, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
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.8
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
endif
UNPACKEXE_LANG := C
ifeq ($(OPENJDK_TARGET_OS), solaris)
UNPACKEXE_LANG := C++
endif
UNPACKEXE_DEBUG_SYMBOLS := true
# On windows, unpack200 is linked completely differently to all other
# executables, using the compiler with the compiler arguments.
# It's also linked incrementally, producing a .ilk file that needs to
# be kept away.
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_UNPACKEXE_LDEXE := $(CC)
EXE_OUT_OPTION_save := $(EXE_OUT_OPTION)
EXE_OUT_OPTION := -Fe
# With the current way unpack200 is built, debug symbols aren't supported
# anyway.
UNPACKEXE_DEBUG_SYMBOLS :=
endif
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
# if feeded with a version script which contains named tags.
ifeq ($(USING_BROKEN_SUSE_LD), yes)
UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous
else
UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200
endif
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
EXCLUDE_FILES := jni.cpp, \
LANG := $(UNPACKEXE_LANG), \
OPTIMIZATION := LOW, \
CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) \
-DFULL, \
CFLAGS_release := -DPRODUCT, \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
CFLAGS_macosx := -fPIC, \
MAPFILE := $(UNPACK_MAPFILE),\
LDFLAGS := $(UNPACKEXE_ZIPOBJS), \
LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \
LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_linux := -lc, \
LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
LDFLAGS_SUFFIX := $(LIBCXX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
PROGRAM := unpack200, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack200.exe" \
-D "JDK_INTERNAL_NAME=unpack200" \
-D "JDK_FTYPE=0x1L", \
DEBUG_SYMBOLS := $(UNPACKEXE_DEBUG_SYMBOLS), \
MANIFEST := $(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
ifeq ($(OPENJDK_TARGET_OS), windows)
EXE_OUT_OPTION := $(EXE_OUT_OPTION_save)
endif
ifneq ($(USE_EXTERNAL_LIBZ), true)
$(BUILD_UNPACKEXE): $(UNPACKEXE_ZIPOBJS)
endif
# Build into object dir and copy executable afterwards to avoid .ilk file in
# image. The real fix would be clean up linking of unpack200 using
# -link -incremental:no
# like all other launchers.
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
$(call install-file)
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
##########################################################################################
BUILD_JEXEC :=
BUILD_JEXEC_SRC :=
BUILD_JEXEC_INC :=
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
#
# UNHANDLED:
# - COMPILE_APPROACH = normal
#
#
# jdk/make/java/Makefile
#
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
BUILD_JEXEC := 1
endif
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_JEXEC := 1
endif # OPENJDK_TARGET_OS
#
# jdk/make/java/jexec/Makefile
#
ifeq ($(BUILD_JEXEC), 1)
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 ($(OPENJDK_TARGET_OS), linux)
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
endif
endif
#
# Note that the two Makefile's seems to contradict each other,
# and that src/macosx/bin/jexec.c seems unused
#
ifneq ($(BUILD_JEXEC_SRC), )
$(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
SRC := $(BUILD_JEXEC_SRC), \
INCLUDE_FILES := jexec.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) \
$(BUILD_JEXEC_INC), \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
DEBUG_SYMBOLS := true, \
PROGRAM := jexec))
BUILD_LAUNCHERS += $(BUILD_JEXEC)
endif
##########################################################################################
#
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
#
JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
endif
# TODO:
# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all
# this time anyway. Since jdk6, it has been built from the wrong source and resulted
# in a (almost) copy of the standard java launcher named "java-rmi.exe" ending up in
# the final 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 ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,java-rmi, , \
$(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/make/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
else
$(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
$(call install-file)
$(CHMOD) a+x $@
endif
##########################################################################################
BUILD_JSPAWNHELPER :=
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/solaris/native/java/lang
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
LINK_JSPAWNHELPER_FLAGS :=
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
BUILD_JSPAWNHELPER := 1
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
endif
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
LINK_JSPAWNHELPER_FLAGS += $(COMPILER_TARGET_BITS_FLAG)64
endif
ifeq ($(BUILD_JSPAWNHELPER), 1)
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
SRC := $(BUILD_JSPAWNHELPER_SRC), \
INCLUDE_FILES := jspawnhelper.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE), \
LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
PROGRAM := jspawnhelper))
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
BUILD_LAUNCHERS += $(BUILD_JSPAWNHELPER)
endif
##########################################################################################
# jabswitch
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_JABSWITCH, \
SRC := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge, \
INCLUDE_FILES := jabswitch.cpp, \
LANG := C++, \
CFLAGS := $(filter-out -Zc:wchar_t-, $(CFLAGS_JDKEXE)) -Zc:wchar_t \
-analyze- -Od -Gd -D_WINDOWS \
-D_UNICODE -DUNICODE -RTC1 -EHsc, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
Advapi32.lib Version.lib User32.lib, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jabswitch, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/bin, \
PROGRAM := jabswitch, \
DEBUG_SYMBOLS := true, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jabswitch.exe" \
-D "JDK_INTERNAL_NAME=jabswitch" \
-D "JDK_FTYPE=0x01L", \
MANIFEST := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/jabswitch.manifest))
BUILD_LAUNCHERS += $(BUILD_JABSWITCH)
endif
endif
##########################################################################################
$(BUILD_LAUNCHERS): $(JDK_TOPDIR)/make/CompileLaunchers.gmk
all: $(BUILD_LAUNCHERS)
.PHONY: all

@ -1,564 +0,0 @@
#
# Copyright (c) 2011, 2014, 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.
#
INCLUDEDIR = $(JDK_OUTPUTDIR)/include
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
ifeq ($(OPENJDK_TARGET_OS), windows)
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
else ifeq ($(OPENJDK_TARGET_OS), macosx)
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
endif
#
# Copy exported header files to outputdir.
#
H_TARGET_FILES = $(INCLUDEDIR)/jdwpTransport.h \
$(INCLUDEDIR)/jni.h \
$(INCLUDEDIR)/jvmti.h \
$(INCLUDEDIR)/jvmticmlr.h \
$(INCLUDEDIR)/classfile_constants.h \
$(INCLUDEDIR)/jawt.h \
$(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/share/javavm/export/%.h
$(call install-file)
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_EXPORT_DIR)/javavm/export/%.h
$(call install-file)
COPY_FILES = $(H_TARGET_FILES)
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
COPY_FILES += $(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCallbacks.h \
$(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.h \
$(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgePackages.h \
$(OPENJDK_TARGET_OS_INCLUDE)/bridge/AccessBridgeCalls.c \
$(JDK_OUTPUTDIR)/lib/accessibility.properties
$(OPENJDK_TARGET_OS_INCLUDE)/bridge/%: \
$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/%
$(install-file)
$(JDK_OUTPUTDIR)/lib/accessibility.properties: \
$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/accessibility.properties
$(install-file)
endif
endif
##########################################################################################
LIBDIR = $(JDK_OUTPUTDIR)/lib
MGMT_LIBDIR = $(LIBDIR)/management
MGMT_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/management
MGMT_SRC_FILES = $(wildcard $(MGMT_LIB_SRC)/*)
MGMT_TARGET_FILES = $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
$(call install-file)
$(CHMOD) 644 $@
# this file has different permissions...don't know why...
$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
$(call install-file)
$(CHMOD) 644 $@
$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
$(call install-file)
$(CHMOD) 444 $@
COPY_FILES += $(MGMT_TARGET_FILES)
##########################################################################################
LOGGING_LIB_SRC = $(JDK_TOPDIR)/src/share/lib
$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
$(call install-file)
COPY_FILES += $(LIBDIR)/logging.properties
##########################################################################################
#
# Copy property files from sun/print to LIBDIR
#
PSFONTPROPFILE_SRC_DIR = $(JDK_TOPDIR)/src/share/classes/sun/print
PSFONTPROPFILE_SRCS = $(wildcard $(PSFONTPROPFILE_SRC_DIR)/*.properties*)
PSFONTPROPFILE_TARGET_FILES = $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
$(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
$(call install-file)
COPY_FILES += $(PSFONTPROPFILE_TARGET_FILES)
##########################################################################################
#
# Copy cursor.properties and cursors gif files to LIBDIR
#
ifneq ($(OPENJDK_TARGET_OS), macosx)
OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib
else
OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/macosx/lib
endif
CURSORS_DEST_DIR = $(LIBDIR)/images/cursors
CURSORS_OPENJDK_TARGET_OS_LIB_SRC = $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/lib/images/cursors
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
$(call install-file)
COPY_FILES += $(CURSORS_DEST_DIR)/cursors.properties
CURSORS_LIB_SRC = $(JDK_TOPDIR)/src/share/lib/images/cursors
ifeq ($(OPENJDK_TARGET_OS), windows)
CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
else # OPENJDK_TARGET_OS
CURSORS_SRC_FILES = $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
endif # OPENJDK_TARGET_OS
CURSORS_TARGET_FILES = $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
$(call install-file)
COPY_FILES += $(CURSORS_TARGET_FILES)
##########################################################################################
CALENDARS_SRC := $(JDK_TOPDIR)/src/share/lib
$(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
$(call install-file)
COPY_FILES += $(LIBDIR)/calendars.properties
$(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
COPY_FILES += $(LIBDIR)/hijrah-config-umalqura.properties
##########################################################################################
ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/lib
$(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
$(call install-file)
COPY_FILES += $(LIBDIR)/tzmappings
endif
##########################################################################################
ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
ifdef OPENJDK
ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/share/lib/cmm/lcms
else
ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/cmm/kcms
endif
ICCPROFILE_SRCS := $(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
ICCPROFILE_TARGET_FILES := $(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
$(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
$(call install-file)
$(CHMOD) 444 $@
COPY_FILES += $(ICCPROFILE_TARGET_FILES)
##########################################################################################
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
# We need to bundle the freetype library, so it will be available at runtime as well as link time.
#
# NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
# used for adding dependencies to other objects
# (e.g. libfontmanager.so).
#
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
# without overcomplicating logic here.
# To workaround this we hardcode .6 suffix for now.
#
# Note that .so.6 library will not be found by System.loadLibrary()
# but fortunately we need to load FreeType library explicitly
# on windows only
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifeq ($(OPENJDK_TARGET_OS), windows)
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
else
FREETYPE_TARGET_LIB = $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
$(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
COPY_FILES += $(FREETYPE_TARGET_LIB)
endif
##########################################################################################
# Copy msvcrXX.dll on windows
ifeq ($(OPENJDK_TARGET_OS), windows)
MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
$(MSVCR_TARGET): $(MSVCR_DLL)
$(call install-file)
$(CHMOD) a+rx $@
COPY_FILES += $(MSVCR_TARGET)
endif
##########################################################################################
HPROF_SRC = $(JDK_TOPDIR)/src/share/demo/jvmti/hprof/jvm.hprof.txt
$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
$(call install-file)
COPY_FILES += $(LIBDIR)/jvm.hprof.txt
##########################################################################################
#
# How to install jvm.cfg.
#
ifeq ($(JVM_VARIANT_ZERO), true)
JVMCFG_ARCH := zero
else
JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
JVMCFG_SRC := $(JDK_TOPDIR)/src/macosx/bin/$(JVMCFG_ARCH)/jvm.cfg
else
JVMCFG_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(JVMCFG_ARCH)/jvm.cfg
endif
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
JVMCFG := $(JVMCFG_DIR)/jvm.cfg
# To do: should this also support -zeroshark?
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
COPY_JVM_CFG_FILE := true
else
# On 32-bit machines we have three potential VMs: client, server and minimal.
# Historically we usually have both client and server and so that is what the
# committed jvm.cfg expects (including platform specific ergonomics switches
# to decide whether to use client or server by default). So when we have anything
# other than client and server we need to define a new jvm.cfg file.
# The main problem is deciding whether to use aliases for the VMs that are not
# present and the current position is that we add aliases for client and server, but
# not for minimal.
CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
ifeq ($(CLIENT_AND_SERVER), true)
COPY_JVM_CFG_FILE := true
else
# For zero, the default jvm.cfg file is sufficient
ifeq ($(JVM_VARIANT_ZERO), true)
COPY_JVM_CFG_FILE := true
endif
endif
endif
ifeq ($(COPY_JVM_CFG_FILE), true)
$(JVMCFG): $(JVMCFG_SRC)
$(call install-file)
else
$(JVMCFG):
$(MKDIR) -p $(@D)
$(RM) $(@)
# Now check for other permutations
ifeq ($(JVM_VARIANT_SERVER), true)
$(PRINTF) "-server KNOWN\n">>$(@)
$(PRINTF) "-client ALIASED_TO -server\n">>$(@)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
$(PRINTF) "-minimal KNOWN\n">>$(@)
endif
else
ifeq ($(JVM_VARIANT_CLIENT), true)
$(PRINTF) "-client KNOWN\n">>$(@)
$(PRINTF) "-server ALIASED_TO -client\n">>$(@)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
$(PRINTF) "-minimal KNOWN\n">>$(@)
endif
else
ifeq ($(JVM_VARIANT_MINIMAL1), true)
$(PRINTF) "-minimal KNOWN\n">>$(@)
$(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
$(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
endif
endif
endif
endif
COPY_FILES += $(JVMCFG)
##########################################################################################
PROPS_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.security-$(OPENJDK_TARGET_OS)
PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
ifndef OPENJDK
RESTRICTED_PKGS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/restricted.pkgs
RESTRICTED_PKGS := $(shell $(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " ")
$(PROPS_DST): $(PROPS_SRC)
$(MKDIR) -p $(@D)
$(TOOL_ADDTORESTRICTEDPKGS) $^ $@.tmp $(RESTRICTED_PKGS)
$(MV) $@.tmp $@
else
$(PROPS_DST): $(PROPS_SRC)
$(call install-file)
endif
COPY_FILES += $(PROPS_DST)
##########################################################################################
POLICY_SRC := $(JDK_TOPDIR)/src/share/lib/security/java.policy
POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
POLICY_SRC_LIST :=
ifeq ($(OPENJDK_TARGET_OS), windows)
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/lib/security/java.policy
endif
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS)/lib/security/java.policy-win32
else
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS)/lib/security/java.policy-win64
endif
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/$(OPENJDK_TARGET_OS)/lib/security/java.policy
endif
endif
POLICY_SRC_LIST += $(POLICY_SRC)
$(POLICY_DST): $(POLICY_SRC_LIST)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
$(MV) $@.tmp $@
COPY_FILES += $(POLICY_DST)
##########################################################################################
CACERTS_SRC := $(CACERTS_FILE)
CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
$(CACERTS_DST): $(CACERTS_SRC)
$(call install-file)
COPY_FILES += $(CACERTS_DST)
##########################################################################################
ifndef OPENJDK
BLACKLIST_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/blacklist
BLACKLIST_DST := $(JDK_OUTPUTDIR)/lib/security/blacklist
TRUSTEDLIBS_SRC := $(JDK_TOPDIR)/src/closed/share/lib/security/trusted.libraries
TRUSTEDLIBS_DST := $(JDK_OUTPUTDIR)/lib/security/trusted.libraries
$(BLACKLIST_DST): $(BLACKLIST_SRC)
$(call install-file)
COPY_FILES += $(BLACKLIST_DST)
$(TRUSTEDLIBS_DST): $(TRUSTEDLIBS_SRC)
$(call install-file)
COPY_FILES += $(TRUSTEDLIBS_DST)
endif
##########################################################################################
ifndef OPENJDK
SHARED_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts
SHARED_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/fonts
SHARED_FONTS_FILES := \
LucidaTypewriterRegular.ttf \
LucidaTypewriterBold.ttf \
LucidaBrightRegular.ttf \
LucidaBrightDemiBold.ttf \
LucidaBrightItalic.ttf \
LucidaBrightDemiItalic.ttf \
LucidaSansRegular.ttf \
LucidaSansDemiBold.ttf \
SHARED_FONTS_SRC := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_SRC_DIR)/$(F))
SHARED_FONTS_DST := $(foreach F, $(SHARED_FONTS_FILES), $(SHARED_FONTS_DST_DIR)/$(F))
$(SHARED_FONTS_DST_DIR)/%.ttf: $(SHARED_FONTS_SRC_DIR)/%.ttf
$(call install-file)
$(SHARED_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.fonts.dir
$(call install-file)
COPY_FILES += $(SHARED_FONTS_DST)
ifneq ($(OPENJDK_TARGET_OS), windows)
COPY_FILES += $(SHARED_FONTS_DST_DIR)/fonts.dir
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
# The oblique fonts are only needed/wanted on Linux.
OBL_FONTS_SRC_DIR := $(JDK_TOPDIR)/src/closed/share/lib/fonts/oblique
OBL_FONTS_DST_DIR := $(JDK_OUTPUTDIR)/lib/oblique-fonts
OBL_FONTS_FILES := LucidaTypewriterOblique.ttf LucidaTypewriterBoldOblique.ttf \
LucidaSansOblique.ttf LucidaSansDemiOblique.ttf
OBL_FONTS_SRC := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_SRC_DIR)/$(F))
OBL_FONTS_DST := $(foreach F, $(OBL_FONTS_FILES), $(OBL_FONTS_DST_DIR)/$(F))
$(OBL_FONTS_DST_DIR)/%.ttf: $(OBL_FONTS_SRC_DIR)/%.ttf
$(call install-file)
$(OBL_FONTS_DST_DIR)/fonts.dir: $(JDK_TOPDIR)/src/solaris/classes/sun/awt/motif/java.oblique-fonts.dir
$(call install-file)
COPY_FILES += $(OBL_FONTS_DST) $(OBL_FONTS_DST_DIR)/fonts.dir
endif # linux
endif # OPENJDK
##########################################################################################
ifndef OPENJDK
#
# Solaris X11 Direct Graphics Access library
#
_DGALIBS_sparc = \
libxinerama.so \
libjdgaSUNWcg6.so \
libjdgaSUNWffb.so \
libjdgaSUNWm64.so \
libjdgaSUNWafb.so
_DGALIBS_sparcv9 = \
libxinerama.so \
libjdgaSUNWcg6.so \
libjdgaSUNWffb.so \
libjdgaSUNWm64.so \
libjdgaSUNWafb.so
_DGALIBS_i586 = # no i586 library yet
_DGALIBS_amd64 = # no amd64 library yet
DGALIBS = $(_DGALIBS_$(OPENJDK_TARGET_CPU_LEGACY):%=$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/%)
$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libxinerama.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libxinerama.so
$(call install-file)
$(CHMOD) 755 $@
$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNW%.so: $(JDK_TOPDIR)/src/closed/solaris/lib/$(OPENJDK_TARGET_CPU_LEGACY)/libjdgaSUNW%.so
$(call install-file)
$(CHMOD) 755 $@
$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWafb.so: $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/libjdgaSUNWffb.so
$(MKDIR) -p $(@D)
$(RM) $@
$(LN) -s $(<F) $@
COPY_FILES += $(DGALIBS)
endif
##########################################################################################
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
$(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
$(call install-file)
COPY_FILES += $(SUNPKCS11_CFG_DST)
endif
##########################################################################################
ifndef OPENJDK
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
$(UCRYPTO_CFG_DST): $(UCRYPTO_CFG_SRC)
$(call install-file)
COPY_FILES += $(UCRYPTO_CFG_DST)
endif
endif
##########################################################################################
$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/share/lib/sound.properties
$(call install-file)
COPY_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
##########################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, CopyFiles.gmk))

@ -28,13 +28,13 @@ default: all
include $(SPEC)
include MakeBase.gmk
SAMPLE_TARGET_DIR = $(JDK_OUTPUTDIR)/sample
SAMPLE_SOURCE_DIR = $(JDK_TOPDIR)/src/share/sample
SAMPLE_CLOSED_SOURCE_DIR = $(JDK_TOPDIR)/src/closed/share/sample
SAMPLE_SOLARIS_SOURCE_DIR = $(JDK_TOPDIR)/src/solaris/sample
SAMPLE_TARGET_DIR := $(JDK_OUTPUTDIR)/sample
SAMPLE_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/share
SAMPLE_CLOSED_SOURCE_DIR := $(JDK_TOPDIR)/src/closed/sample/share
SAMPLE_SOLARIS_SOURCE_DIR := $(JDK_TOPDIR)/src/sample/solaris
# Exclude the vm directory
SAMPLE_FIND_FILTER = -name vm -prune -o
SAMPLE_FIND_FILTER := -name vm -prune -o
SAMPLE_SOURCE := $(shell $(FIND) $(SAMPLE_SOURCE_DIR) $(SAMPLE_FIND_FILTER) -type f -print)
SAMPLE_TARGET := $(subst $(SAMPLE_SOURCE_DIR),$(SAMPLE_TARGET_DIR),$(SAMPLE_SOURCE))

@ -26,12 +26,14 @@
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Setup.gmk
default: all
include Tools.gmk
JDK_OUT_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*)
$(eval $(call FillCacheFind, $(JDK_OUT_CLASSES)))
include Profiles.gmk
#
@ -50,7 +52,7 @@ $(eval $(call MakeDir, $(IMAGES_OUTPUTDIR)/lib))
##########################################################################################
$(eval $(call SetupArchive,BUILD_JCONSOLE_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.jconsole, \
SUFFIXES := .class .gif .png .properties, \
INCLUDES := sun/tools/jconsole com/sun/tools/jconsole, \
JARMAIN := sun.tools.jconsole.JConsole, \
@ -61,7 +63,7 @@ $(eval $(call SetupArchive,BUILD_JCONSOLE_JAR, , \
##########################################################################################
$(eval $(call SetupArchive,BUILD_DNS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.naming.dns, \
INCLUDES := sun/net/spi/nameservice/dns, \
EXTRA_FILES := META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/dnsns.jar, \
@ -78,10 +80,9 @@ LOCALEDATA_INCLUDES := $(addprefix sun/text/resources/, $(LOCALEDATA_INCLUDE_LOC
$(addprefix sun/util/resources/, $(LOCALEDATA_INCLUDE_LOCALES))
$(eval $(call SetupArchive,BUILD_LOCALEDATA_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.localedata, \
SUFFIXES := .class _dict _th, \
INCLUDES := $(LOCALEDATA_INCLUDES), \
EXCLUDES := sun/text/resources/th/BreakIteratorRules_th.class, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/localedata.jar, \
SKIP_METAINF := true))
@ -165,18 +166,19 @@ RT_JAR_EXCLUDES += \
META-INF/services/com.sun.jdi.connect.spi.TransportService \
META-INF/services/com.sun.tools.attach.spi.AttachProvider \
META-INF/services/com.sun.tools.xjc.Plugin \
META-INF/services/javax.script.ScriptEngineFactory \
META-INF/services/sun.net.spi.nameservice.NameServiceDescriptor \
META-INF/services/java.nio.file.spi.FileSystemProvider \
org/relaxng/datatype \
sun/awt/HKSCS.class \
sun/awt/motif/X11GB2312.class \
sun/awt/motif/X11GB2312\$$$$Decoder.class \
sun/awt/motif/X11GB2312\$$$$Encoder.class \
sun/awt/motif/X11GB2312$$$$Decoder.class \
sun/awt/motif/X11GB2312$$$$Encoder.class \
sun/awt/motif/X11GBK.class \
sun/awt/motif/X11GBK\$$$$Encoder.class \
sun/awt/motif/X11GBK$$$$Encoder.class \
sun/awt/motif/X11KSC5601.class \
sun/awt/motif/X11KSC5601\$$$$Decoder.class \
sun/awt/motif/X11KSC5601\$$$$Encoder.class \
sun/awt/motif/X11KSC5601$$$$Decoder.class \
sun/awt/motif/X11KSC5601$$$$Encoder.class \
sun/jvmstat \
sun/net/spi/nameservice/dns \
sun/nio/cs/ext \
@ -212,11 +214,20 @@ RT_JAR_EXCLUDES += \
$(LOCALEDATA_INCLUDES) \
com/oracle/jrockit/jfr \
oracle/jrockit/jfr \
jdk/jfr
jdk/jfr \
jdk/internal/dynalink \
jdk/nashorn \
sun/jvm \
toolbarButtonGraphics \
sa.properties \
com/sun/java/swing/action \
com/sun/java/swing/ui \
com/oracle/security \
#
# Find all files in the classes dir to use as dependencies. This could be more fine granular.
ALL_FILES_IN_CLASSES := $(call not-containing, _the., $(filter-out %javac_state, \
$(call CacheFind, $(JDK_OUTPUTDIR)/classes)))
$(call CacheFind, $(JDK_OUT_CLASSES))))
RT_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar_manifest
RESOURCE_JAR_MANIFEST_FILE := $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar_manifest
@ -252,12 +263,12 @@ $(IMAGES_OUTPUTDIR)/lib/classlist: $(JDK_TOPDIR)/make/data/classlist/classlist.$
$(TOOL_ADDJSUM) $< $@.tmp
$(MV) $@.tmp $@
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents: $(BUILD_TOOLS_JDK) $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude \
$(ALL_FILES_IN_CLASSES) $(IMAGES_OUTPUTDIR)/lib/classlist
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
($(CD) $(JDK_OUTPUTDIR)/classes && \
$(TOOL_JARREORDER) \
($(CD) $(JDK_OUTPUTDIR)/modules && \
$(TOOL_JARREORDER) -m \
-o $@.tmp $(IMAGES_OUTPUTDIR)/lib/classlist $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.exclude . )
$(MV) $@.tmp $@
@ -266,7 +277,9 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents: $(IMAGES_OUTPUTDIR)/lib$
$(RM) $@ $@.tmp
$(GREP) -e '\.class$$' $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
ifneq ($(PROFILE), )
# # Add back classes from excluded packages (fixing the $ substitution in the process)
# Add back classes from excluded packages (fixing the $ substitution in the process)
# This currently won't work with modular build layout, but there currently are no
# types needing to be re added.
for type in $(subst \$$,\, $(RT_JAR_INCLUDE_TYPES)) ; do \
$(ECHO) $$type >> $@.tmp ; \
done
@ -277,16 +290,17 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents: $(IMAGES_OUTPUTDI
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(GREP) -v -e '\.class$$' \
-e '/_the\.*' -e '^_the\.*' -e '\\_the\.*' -e 'javac_state' \
-e '/_the\.' -e '^_the\.' -e '\\_the\.' -e ' _the\.' -e 'javac_state' \
$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.jars.contents > $@.tmp
ifneq ($(PROFILE), )
# # Strip out all META-INF/services/ entries
# Strip out all META-INF/services/ entries
$(GREP) -v -e 'META-INF/services/' $@.tmp > $@.tmp2
# # Add back the required services
# # FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
# # we get a syntax error from sh. That doesn't happen on linux
# Add back the required services
# FIXME: On Solaris if PROFILE_INCLUDE_METAINF_SERVICES is not defined
# we get a syntax error from sh. That doesn't happen on linux
# Preserve any -C <dir> part of the original include line.
for service in $(PROFILE_INCLUDE_METAINF_SERVICES) ; do \
$(ECHO) $$service >> $@.tmp2; \
$(GREP) -e "$$service" $@.tmp >> $@.tmp2; \
done
$(MV) $@.tmp2 $@.tmp
endif
@ -313,7 +327,7 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/rt.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the
$(ECHO) Creating rt.jar $(PROFILE) Compressed=$(COMPRESS_JARS)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(CD) $(JDK_OUTPUTDIR)/classes && \
$(CD) $(JDK_OUTPUTDIR)/modules && \
$(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RT_JAR_MANIFEST_FILE) \
@$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.rt.jar.contents && \
if [ -f $(CLASS_FILE) ]; then \
@ -328,7 +342,7 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/resources.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFIL
$(ECHO) Creating resources.jar
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(CD) $(JDK_OUTPUTDIR)/classes && \
$(CD) $(JDK_OUTPUTDIR)/modules && \
$(JAR) $(RT_JAR_CREATE_OPTIONS) $@.tmp $(RESOURCE_JAR_MANIFEST_FILE) \
@$(IMAGES_OUTPUTDIR)/lib$(PROFILE)/_the.resources.jar.contents
$(MV) $@.tmp $@
@ -337,17 +351,17 @@ $(IMAGES_OUTPUTDIR)/lib$(PROFILE)/resources.jar: $(IMAGES_OUTPUTDIR)/lib$(PROFIL
ifneq ($(OPENJDK_TARGET_OS), windows)
CHARSETS_EXTRA_FILES := sun/awt/motif/X11GBK.class \
sun/awt/motif/X11GB2312\$$$$Decoder.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$$$$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
endif
$(eval $(call SetupArchive,BUILD_CHARSETS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUT_CLASSES), \
SUFFIXES := .class .dat, \
INCLUDES := sun/nio/cs/ext, \
EXTRA_FILES := sun/awt/HKSCS.class \
@ -359,7 +373,7 @@ $(eval $(call SetupArchive,BUILD_CHARSETS_JAR, , \
##########################################################################################
$(eval $(call SetupArchive,BUILD_ZIPFS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUT_CLASSES), \
INCLUDES := jdk/nio/zipfs, \
EXTRA_FILES := META-INF/services/java.nio.file.spi.FileSystemProvider, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/zipfs.jar, \
@ -371,7 +385,7 @@ $(eval $(call SetupArchive,BUILD_ZIPFS_JAR, , \
ifndef OPENJDK
ifeq ($(ENABLE_JFR), true)
$(eval $(call SetupArchive,BUILD_JFR_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.jfr, \
SUFFIXES := .class .jfc .xsd, \
INCLUDES := com/oracle/jrockit/jfr \
oracle/jrockit/jfr \
@ -387,7 +401,7 @@ endif
##########################################################################################
$(eval $(call SetupArchive,BUILD_JSSE_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUT_CLASSES), \
INCLUDES := sun/security/provider/Sun.class \
sun/security/rsa/SunRsaSign.class \
sun/security/ssl \
@ -400,7 +414,7 @@ $(eval $(call SetupArchive,BUILD_JSSE_JAR, , \
##########################################################################################
$(eval $(call SetupArchive,BUILD_SWINGBEANS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUTPUTDIR)/modules/java.desktop, \
SUFFIXES := BeanInfo.class .gif, \
INCLUDES := javax/swing sun/swing, \
EXCLUDES := javax/swing/plaf, \
@ -416,12 +430,12 @@ include gensrc/GensrcCLDR.gmk
CLDRDATA_JAR_DST := $(IMAGES_OUTPUTDIR)/lib/ext/cldrdata.jar
$(eval $(call SetupArchive,BUILD_CLDRDATA_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(JDK_OUTPUTDIR)/modules/jdk.localedata \
$(JDK_OUTPUTDIR)/modules/java.base, \
SUFFIXES := .class, \
INCLUDES := sun/text/resources/cldr \
sun/util/cldr \
sun/util/cldr/CLDRLocaleDataMetaInfo.class \
sun/util/resources/cldr, \
EXCLUDES := sun/util/cldr/CLDRLocaleProviderAdapter, \
JAR := $(CLDRDATA_JAR_DST), \
EXTRA_MANIFEST_ATTR := CLDR-Version: $(CLDRVERSION), \
SKIP_METAINF := true))
@ -484,13 +498,33 @@ TOOLS_JAR_INCLUDES := \
# The sjavac tools is not ready for public consumption.
TOOLS_JAR_EXCLUDES = com/sun/tools/sjavac
TOOLS_JAR_SRC := $(addprefix $(JDK_OUTPUTDIR)/modules/,\
java.corba \
java.desktop \
jdk.attach \
jdk.compiler \
jdk.dev \
jdk.javadoc \
jdk.jconsole \
jdk.jcmd \
jdk.jdi \
jdk.jvmstat \
jdk.rmic \
jdk.runtime \
jdk.xml.bind \
jdk.xml.ws \
)
#
$(eval $(call SetupArchive,BUILD_TOOLS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
SRCS := $(TOOLS_JAR_SRC), \
SUFFIXES := .class .prp .gif .properties .xml .css .xsd .js .html .txt .java \
Tool aliasmap options, \
INCLUDES := $(TOOLS_JAR_INCLUDES), \
EXCLUDES := $(TOOLS_JAR_EXCLUDES), \
EXTRA_FILES := META-INF/services/com.sun.jdi.connect.Connector \
EXTRA_FILES := \
$(JDK_OUTPUTDIR)/modules/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \
$(JDK_OUTPUTDIR)/classes/META-INF/services/com.sun.jdi.connect.Connector \
META-INF/services/com.sun.jdi.connect.spi.TransportService \
META-INF/services/com.sun.tools.attach.spi.AttachProvider \
META-INF/services/com.sun.tools.internal.ws.wscompile.Plugin \
@ -533,7 +567,7 @@ $(IMAGES_OUTPUTDIR)/symbols/_the.symbols: $(IMAGES_OUTPUTDIR)/lib/rt.jar
$(RM) -r $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
$(MKDIR) -p $(IMAGES_OUTPUTDIR)/symbols/META-INF/sym
$(JAVA) $(NEW_JAVAC) \
-bootclasspath $(JDK_OUTPUTDIR)/classes \
-bootclasspath "$(IMAGES_OUTPUTDIR)/lib/rt.jar" \
-XDprocess.packages -proc:only \
-processor com.sun.tools.javac.sym.CreateSymbols \
-Acom.sun.tools.javac.sym.Jar=$(IMAGES_OUTPUTDIR)/lib/rt.jar \
@ -600,27 +634,35 @@ else
SRC_ZIP_EXCLUDES = javax/swing/beaninfo
endif
SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gensrc
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/impsrc
SRC_ZIP_SRCS += $(JDK_OUTPUTDIR)/gendocsrc_rmic
SRC_ZIP_SRCS := $(wildcard \
$(JDK_TOPDIR)/src/*/share/classes \
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS)/classes \
$(JDK_TOPDIR)/src/*/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(LANGTOOLS_TOPDIR)/src/*/share/classes \
$(CORBA_TOPDIR)/src/*/share/classes \
$(JAXP_TOPDIR)/src/*/share/classes \
$(JAXWS_TOPDIR)/src/*/share/classes \
$(JDK_OUTPUTDIR)/gensrc/j* \
$(JDK_OUTPUTDIR)/gendocsrc_rmic \
$(CORBA_OUTPUTDIR)/gensrc/j* \
) \
#
ifndef OPENJDK
SRC_ZIP_SRCS += $(JDK_TOPDIR)/src/closed/share/classes
SRC_ZIP_SRCS += $(wildcard $(JDK_TOPDIR)/src/closed/*/share/classes)
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/$(OPENJDK_TARGET_OS_API_DIR)/bin/java_md*)
LAUNCHER_ZIP_SRC := $(patsubst $(JDK_TOPDIR)/src/share/bin/%, $(IMAGES_OUTPUTDIR)/src/launcher/%, \
$(patsubst $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%, $(IMAGES_OUTPUTDIR)/src/launcher/%, \
$(LAUNCHER_SRC_FILES)))
$(eval $(call SetupCopyFiles,COPY_LAUNCHER_SRC, \
SRC := $(JDK_TOPDIR)/src/java.base, \
DEST := $(IMAGES_OUTPUTDIR)/src/launcher, \
FLATTEN := true, \
FILES := $(wildcard \
$(JDK_TOPDIR)/src/java.base/share/native/launcher/* \
$(JDK_TOPDIR)/src/java.base/share/native/libjli/* \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/java_md*)))
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/share/bin/%
$(install-file)
$(IMAGES_OUTPUTDIR)/src/launcher/%: $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/%
$(install-file)
LAUNCHER_ZIP_SRC := $(COPY_LAUNCHER_SRC)
$(IMAGES_OUTPUTDIR)/src.zip: $(LAUNCHER_ZIP_SRC)
@ -636,50 +678,10 @@ $(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupArchive,BUILD_JACCESS_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes, \
INCLUDES := com/sun/java/accessibility/util, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar, \
SKIP_METAINF := true))
JARS += $(IMAGES_OUTPUTDIR)/lib/ext/jaccess.jar
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
$(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_32_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_ab/32bit, \
INCLUDES := com/sun/java/accessibility, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar, \
SKIP_METAINF := true))
$(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_LEGACY_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_ab/legacy, \
INCLUDES := com/sun/java/accessibility, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar, \
SKIP_METAINF := true))
JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-32.jar \
$(IMAGES_OUTPUTDIR)/lib/ext/access-bridge.jar
else
$(eval $(call SetupArchive,BUILD_ACCESSBRIDGE_64_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_ab/64bit, \
INCLUDES := com/sun/java/accessibility, \
JAR := $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar, \
SKIP_METAINF := true))
JARS += $(IMAGES_OUTPUTDIR)/lib/ext/access-bridge-64.jar
endif
endif
endif
##########################################################################################
# This file is imported from hotspot in Import.gmk. Copying it into images/lib so that
# all jars can be found in one place when creating images in Images.gmk. It needs to be
# done here so that clean targets can be simple and accurate.
$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(JDK_OUTPUTDIR)/lib/sa-jdi.jar
$(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(HOTSPOT_DIST)/lib/sa-jdi.jar
$(install-file)
##########################################################################################
@ -688,22 +690,22 @@ $(IMAGES_OUTPUTDIR)/lib/sa-jdi.jar: $(JDK_OUTPUTDIR)/lib/sa-jdi.jar
#
$(eval $(call SetupZipArchive,BUILD_SEC_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
INCLUDES := classes/javax/net \
classes/javax/security/cert \
classes/com/sun/net/ssl \
classes/com/sun/security/cert \
classes/sun/net/www/protocol/https \
classes/sun/security/pkcs12 \
classes/sun/security/ssl \
classes/sun/security/krb5 \
classes/sun/security/krb5/internal \
classes/sun/security/krb5/internal/ccache \
classes/sun/security/krb5/internal/crypto \
classes/sun/security/krb5/internal/ktab \
classes/sun/security/krb5/internal/rcache \
classes/sun/security/krb5/internal/util, \
INCLUDE_FILES := classes/sun/security/jgss/spi/GSSContextSpi.class, \
EXCLUDES := classes/sun/security/krb5/internal/tools, \
INCLUDES := modules/java.base/javax/net \
modules/java.base/javax/security/cert \
modules/java.base/com/sun/net/ssl \
modules/java.base/com/sun/security/cert \
modules/java.base/sun/net/www/protocol/https \
modules/java.base/sun/security/pkcs12 \
modules/java.base/sun/security/ssl \
modules/java.security.jgss/sun/security/krb5 \
modules/java.security.jgss/sun/security/krb5/internal \
modules/java.security.jgss/sun/security/krb5/internal/ccache \
modules/java.security.jgss/sun/security/krb5/internal/crypto \
modules/java.security.jgss/sun/security/krb5/internal/ktab \
modules/java.security.jgss/sun/security/krb5/internal/rcache \
modules/java.security.jgss/sun/security/krb5/internal/util, \
INCLUDE_FILES := modules/java.security.jgss/sun/security/jgss/spi/GSSContextSpi.class, \
EXCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-bin.zip))
JARS += $(IMAGES_OUTPUTDIR)/sec-bin.zip
@ -716,7 +718,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
# sec-windows-bin.zip is used by builds where the corresponding sources are not available
$(eval $(call SetupZipArchive,BUILD_SEC_WINDOWS_BIN_ZIP, \
SRC := $(JDK_OUTPUTDIR), \
INCLUDES := classes/sun/security/krb5/internal/tools, \
INCLUDES := modules/java.security.jgss/sun/security/krb5/internal/tools, \
ZIP := $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip))
JARS += $(IMAGES_OUTPUTDIR)/sec-windows-bin.zip

@ -0,0 +1,169 @@
#
# Copyright (c) 2013, 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
include JavaCompilation.gmk
################################################################################
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
ifneq ($(BUILD_CRYPTO), no)
US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
# NOTE: We currently do not place restrictions on our limited export
# policy. This was not a typo. This means we are shipping the same file
# for both limimted and unlimited US_export_policy.jar.
#
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
US_EXPORT_POLICY_JAR_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
$(install-file)
US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
$(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
endif
ifndef OPENJDK
ifeq ($(UNLIMITED_CRYPTO), true)
$(error No prebuilt unlimited crypto jars available)
endif
$(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
ifeq ($(UNLIMITED_CRYPTO), true)
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(install-file)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
endif
endif
POLICY_JARS += $(US_EXPORT_POLICY_JAR_DST)
################################################################################
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
ifneq ($(BUILD_CRYPTO), no)
LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
LOCAL_POLICY_JAR_LIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
LOCAL_POLICY_JAR_UNLIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
$(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
$(install-file)
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
$(install-file)
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \
$(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
SKIP_METAINF := true))
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
ifndef OPENJDK
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \
$(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt
$(install-file)
TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
endif
endif
ifndef OPENJDK
$(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
ifeq ($(UNLIMITED_CRYPTO), true)
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
$(install-file)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
endif
endif
POLICY_JARS += $(LOCAL_POLICY_JAR_DST)
TARGETS += $(POLICY_JARS)
################################################################################
all: $(TARGETS)

@ -28,11 +28,12 @@ default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Setup.gmk
# The jars created in this file are required for the exploded jdk image to function and
# cannot wait to be built in the images target.
SECURITY_CLASSES_SUBDIR := modules
##########################################################################################
# Create manifest for security jars
#
@ -66,7 +67,7 @@ SUNPKCS11_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunpkcs11.jar
SUNPKCS11_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunpkcs11.jar
$(eval $(call SetupArchive,BUILD_SUNPKCS11_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.pkcs11, \
SUFFIXES := .class, \
INCLUDES := sun/security/pkcs11, \
JAR := $(SUNPKCS11_JAR_UNSIGNED), \
@ -93,7 +94,7 @@ SUNEC_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunec.jar
SUNEC_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunec.jar
$(eval $(call SetupArchive,BUILD_SUNEC_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ec, \
SUFFIXES := .class, \
INCLUDES := sun/security/ec, \
JAR := $(SUNEC_JAR_UNSIGNED), \
@ -121,7 +122,7 @@ SUNJCE_PROVIDER_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunjce_provider.ja
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_SUNJCE_PROVIDER_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \
SUFFIXES := .class, \
INCLUDES := com/sun/crypto/provider, \
JAR := $(SUNJCE_PROVIDER_JAR_UNSIGNED), \
@ -152,7 +153,7 @@ JCE_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/jce.jar
ifneq ($(BUILD_CRYPTO), no)
$(eval $(call SetupArchive,BUILD_JCE_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/java.base, \
SUFFIXES := .class, \
INCLUDES := javax/crypto sun/security/internal, \
JAR := $(JCE_JAR_UNSIGNED), \
@ -178,145 +179,13 @@ TARGETS += $(JCE_JAR_DST)
##########################################################################################
US_EXPORT_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/US_export_policy.jar
ifneq ($(BUILD_CRYPTO), no)
US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/US_export_policy.jar
US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy.jar
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
# NOTE: We currently do not place restrictions on our limited export
# policy. This was not a typo. This means we are shipping the same file
# for both limimted and unlimited US_export_policy.jar.
#
US_EXPORT_POLICY_JAR_SRC_DIR := $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited
US_EXPORT_POLICY_JAR_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/US_export_policy_jar.tmp
$(US_EXPORT_POLICY_JAR_TMP)/%: $(US_EXPORT_POLICY_JAR_SRC_DIR)/%
$(install-file)
US_EXPORT_POLICY_JAR_DEPS := $(US_EXPORT_POLICY_JAR_TMP)/default_US_export.policy
$(eval $(call SetupArchive,BUILD_US_EXPORT_POLICY_JAR, $(US_EXPORT_POLICY_JAR_DEPS), \
SRCS := $(US_EXPORT_POLICY_JAR_TMP), \
SUFFIXES := .policy, \
JAR := $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
$(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(ECHO) $(LOG_INFO) Copying unlimited $(patsubst $(OUTPUT_ROOT)/%,%,$@)
$(install-file)
TARGETS += $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED) \
$(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
endif
ifndef OPENJDK
ifeq ($(UNLIMITED_CRYPTO), true)
$(error No prebuilt unlimited crypto jars available)
endif
$(US_EXPORT_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/US_export_policy.jar
$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
ifeq ($(UNLIMITED_CRYPTO), true)
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_UNLIMITED_UNSIGNED)
$(install-file)
else
$(US_EXPORT_POLICY_JAR_DST): $(US_EXPORT_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
endif
endif
TARGETS += $(US_EXPORT_POLICY_JAR_DST)
##########################################################################################
LOCAL_POLICY_JAR_DST := $(JDK_OUTPUTDIR)/lib/security/local_policy.jar
ifneq ($(BUILD_CRYPTO), no)
LOCAL_POLICY_JAR_LIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy.jar
LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy.jar
#
# TODO fix so that SetupArchive does not write files into SRCS
# then we don't need this extra copying
#
LOCAL_POLICY_JAR_LIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/limited/local_policy_jar.tmp
LOCAL_POLICY_JAR_UNLIMITED_TMP := \
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/local_policy_jar.tmp
$(LOCAL_POLICY_JAR_LIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/limited/%
$(install-file)
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/%: $(JDK_TOPDIR)/make/data/cryptopolicy/unlimited/%
$(install-file)
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_LIMITED, \
$(LOCAL_POLICY_JAR_LIMITED_TMP)/exempt_local.policy \
$(LOCAL_POLICY_JAR_LIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_LIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: limited, \
SKIP_METAINF := true))
$(eval $(call SetupArchive,BUILD_LOCAL_POLICY_JAR_UNLIMITED, \
$(LOCAL_POLICY_JAR_UNLIMITED_TMP)/default_local.policy, \
SRCS := $(LOCAL_POLICY_JAR_UNLIMITED_TMP), \
SUFFIXES := .policy, \
JAR := $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED), \
EXTRA_MANIFEST_ATTR := Crypto-Strength: unlimited, \
SKIP_METAINF := true))
TARGETS += $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED) $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
ifndef OPENJDK
$(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt: \
$(JDK_TOPDIR)/make/closed/javax/crypto/doc/README.txt
$(install-file)
TARGETS += $(JDK_OUTPUTDIR)/jce/unsigned/policy/unlimited/README.txt
endif
endif
ifndef OPENJDK
$(LOCAL_POLICY_JAR_DST): $(JDK_TOPDIR)/make/closed/tools/crypto/jce/local_policy.jar
$(ECHO) $(LOG_INFO) Copying prebuilt $(@F)
$(install-file)
else
ifeq ($(UNLIMITED_CRYPTO), true)
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_UNLIMITED_UNSIGNED)
$(install-file)
else
$(LOCAL_POLICY_JAR_DST): $(LOCAL_POLICY_JAR_LIMITED_UNSIGNED)
$(install-file)
endif
endif
TARGETS += $(LOCAL_POLICY_JAR_DST)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
SUNMSCAPI_JAR_DST := $(JDK_OUTPUTDIR)/lib/ext/sunmscapi.jar
SUNMSCAPI_JAR_UNSIGNED := $(JDK_OUTPUTDIR)/jce/unsigned/sunmscapi.jar
$(eval $(call SetupArchive,BUILD_SUNMSCAPI_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.mscapi, \
SUFFIXES := .class, \
INCLUDES := sun/security/mscapi, \
JAR := $(SUNMSCAPI_JAR_UNSIGNED), \
@ -349,7 +218,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
UCRYPTO_JAR_SRC := $(JDK_TOPDIR)/make/closed/tools/crypto/ucrypto/ucrypto.jar
$(eval $(call SetupArchive,BUILD_UCRYPTO_JAR, , \
SRCS := $(JDK_OUTPUTDIR)/classes_security, \
SRCS := $(JDK_OUTPUTDIR)/$(SECURITY_CLASSES_SUBDIR)/jdk.crypto.ucrypto, \
SUFFIXES := .class, \
INCLUDES := com/oracle/security/ucrypto, \
JAR := $(UCRYPTO_JAR_UNSIGNED), \

@ -26,7 +26,6 @@
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include Setup.gmk
default: images
@ -523,26 +522,29 @@ $(foreach f,$(call CacheFind,$(JDK_OUTPUTDIR)/sample), \
# /db dir
ifndef OPENJDK
$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(JDK_TOPDIR)/src/closed/share/db/%
DB_ZIP_DIR := $(wildcard $(JDK_TOPDIR)/src/closed/db)
$(IMAGES_OUTPUTDIR)/_unzip/%.unzipped: $(DB_ZIP_DIR)/%
$(ECHO) Unzipping $(patsubst $(SRC_ROOT)/%,%,$<)
$(RM) -r $(JDK_IMAGE_DIR)/db
$(MKDIR) -p $(JDK_IMAGE_DIR)/db
cd $(JDK_IMAGE_DIR)/db && $(UNZIP) -q -o $< -x */index.html */KEYS */test/* *javadoc/* */docs/* */demo/* 2> /dev/null
cd $(JDK_IMAGE_DIR)/db && $(MV) db-derby-*-bin/* . && $(RM) -r db-derby-*-bin
$(MKDIR) -p $(@D)
$(TOUCH) $@
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(JDK_TOPDIR)/src/closed/share/db/README-JDK.html
$(JDK_IMAGE_DIR)/db/README-JDK.html: $(DB_ZIP_DIR)/README-JDK.html
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
$(JDK_IMAGE_DIR)/db/3RDPARTY: $(JDK_TOPDIR)/src/closed/share/db/3RDPARTY
$(JDK_IMAGE_DIR)/db/3RDPARTY: $(DB_ZIP_DIR)/3RDPARTY
$(ECHO) $(LOG_INFO) Copying '$(patsubst $(OUTPUT_ROOT)/%,%,$@)'
$(MKDIR) -p $(@D)
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(JDK_TOPDIR)/src/closed/share/db/COPYRIGHTYEAR)/" > $@
$(CAT) $< | $(SED) "s/XXXX/$(shell cat $(DB_ZIP_DIR)/COPYRIGHTYEAR)/" > $@
JDK_DB_TARGETS := $(patsubst $(JDK_TOPDIR)/src/closed/share/db/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \
$(wildcard $(JDK_TOPDIR)/src/closed/share/db/*.zip)) \
JDK_DB_TARGETS := $(patsubst $(DB_ZIP_DIR)/%, $(IMAGES_OUTPUTDIR)/_unzip/%.unzipped, \
$(wildcard $(DB_ZIP_DIR)/*.zip)) \
$(JDK_IMAGE_DIR)/db/README-JDK.html $(JDK_IMAGE_DIR)/db/3RDPARTY
endif
@ -570,8 +572,8 @@ else
JRE_DOC_FILES += README
endif
JDK_DOC_FILES += demo/DEMOS_LICENSE sample/SAMPLES_LICENSE
JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jre
JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/share/doc/jdk
JRE_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/doc/jre
JDK_DOC_LOCATION := $(JDK_TOPDIR)/src/closed/doc/jdk
endif
JRE_DOC_TARGETS := $(addprefix $(JRE_IMAGE_DIR)/, $(JRE_DOC_FILES))
JDKJRE_DOC_TARGETS := $(addprefix $(JDK_IMAGE_DIR)/jre/, $(JRE_DOC_FILES))

@ -28,16 +28,7 @@ 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)
@ -48,68 +39,18 @@ else
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)
$(RM) $$@ $$@.tmp
($(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)
$(RM) $$@ $$@.tmp
($(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)
$(RM) $$@ $$@.tmp
($(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)
#######
################################################################################
define CopyDir
$1_SRC_FILES := $(shell $(FIND) $2 -type f -a \( -name DUMMY $(addprefix -o$(SPACE)-name$(SPACE),$4) \))
$1_DST_FILES := $$(patsubst $2/%,$3/%,$$($1_SRC_FILES))
IMPORT_TARGET_FILES += $$($1_DST_FILES)
HOTSPOT_IMPORT_TARGET_FILES += $$($1_DST_FILES)
$3/%: $2/%
$(ECHO) $(LOG_INFO) Copying $$(@F)
$$(install-file)
endef
#######
################################################################################
#
# Import hotspot
@ -129,22 +70,22 @@ endif
ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(JVM_VARIANT_SERVER), true)
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/server/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
HOTSPOT_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))
HOTSPOT_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)
HOTSPOT_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))
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/client/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(LIBRARY_PREFIX)jsig$(SHARED_LIBRARY_SUFFIX)
ifneq (,$(JSIG_DEBUGINFO))
IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
HOTSPOT_IMPORT_TARGET_FILES += $(INSTALL_LIBRARIES_HERE)/minimal/$(foreach I,$(JSIG_DEBUGINFO),$(notdir $I))
endif
endif
endif
@ -242,45 +183,9 @@ ifneq ($(OPENJDK_TARGET_OS), macosx)
endif
##########################################################################################
# Unpack the binary distributions of the crypto classes if they exist.
SEC_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip
SEC_FILES_WIN_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip
JGSS_WIN32_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip
JGSS_WIN64_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
define unzip-sec-file
$(ECHO) Unzipping $(<F)
$(MKDIR) -p $(@D)
$(RM) $@
($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
$(MV) $@.tmp $@
endef
hotspot: $(HOTSPOT_IMPORT_TARGET_FILES)
$(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
$(call unzip-sec-file)
all: hotspot
$(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP)
$(call unzip-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
$(call unzip-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
$(call unzip-sec-file)
ifneq ($(wildcard $(SEC_FILES_ZIP)), )
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped
ifeq ($(OPENJDK_TARGET_OS), windows)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped
ifeq ($(OPENJDK_TARGET_CPU), x86)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped
endif
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped
endif
endif
endif
##########################################################################################
all: $(IMPORT_TARGET_FILES)
.PHONY: hotspot all

69
jdk/make/ModulesXml.gmk Normal file

@ -0,0 +1,69 @@
#
# Copyright (c) 2014, 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 target declared first
default: all
include $(SPEC)
include MakeBase.gmk
include Tools.gmk
#
# Generate modules.xml for jdeps to use
# It augments $(TOPDIR)/modules.xml to include module membership
#
JDEPS_MODULES_XML := $(JDK_OUTPUTDIR)/modules/jdk.dev/com/sun/tools/jdeps/resources/modules.xml
METADATA := $(JDK_OUTPUTDIR)/btclasses/build/tools/module/modules.xml
$(METADATA): $(TOPDIR)/modules.xml
$(call install-file)
METADATA_FILES := $(METADATA)
ifndef OPENJDK
CLOSED_METADATA := $(JDK_OUTPUTDIR)/btclasses/build/tools/module/closed/modules.xml
$(CLOSED_METADATA): $(TOPDIR)/closed/modules.xml
$(call install-file)
METADATA_FILES += $(CLOSED_METADATA)
endif
$(JDEPS_MODULES_XML): $(BUILD_TOOLS_JDK) $(METADATA_FILES)
$(MKDIR) -p $(@D)
$(RM) $@
$(TOOL_GENMODULESXML) $@ $(JDK_OUTPUTDIR)/modules
#
# Verify access across module boundaries
#
checkdeps: $(JDEPS_MODULES_XML)
$(ECHO) "Checking dependencies across JDK modules"
$(FIXPATH) $(JDK_OUTPUTDIR)/bin/jdeps -verify:access -mp $(JDK_OUTPUTDIR)/modules
gen-modules-xml: $(JDEPS_MODULES_XML)
all: checkdeps
.PHONY: all

@ -265,11 +265,11 @@ NOT_JRE_LIB_FILES += $(CUSTOM_JARS)
include profile-rtjar-includes.txt
# Function to expand foo/*.class into the set of classes
# NOTE: Classfiles with $ in their name are problematic as that is the
# meta-character for both make and the shell! Hence the \$$$$ substitution.
# NOTE: Files found by wildcard are stipped of extra $, so call DoubleDollar
# to keep the file names compatible with make.
# But note that if you echo these values they will NOT display as expected.
class_list = $(patsubst $(JDK_OUTPUTDIR)/classes/%,%, \
$(foreach i, $(1), $(subst $$,\$$$$, $(wildcard $(JDK_OUTPUTDIR)/classes/$i))))
class_list = $(foreach dir, $(JDK_OUT_CLASSES), $(patsubst $(dir)/%,%, \
$(foreach i, $(1), $(call DoubleDollar, $(wildcard $(dir)/$i)))))
ifeq ($(PROFILE), profile_1)
RT_JAR_EXCLUDES += \

@ -1,67 +0,0 @@
#
# Copyright (c) 2011, 2014, 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.
#
DISABLE_WARNINGS := -Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
# To build with all warnings enabled, do the following:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
JAVAC_WARNINGS := -Xlint:all,-deprecation -Werror
# Any java code executed during a JDK build to build other parts of the JDK must be
# executed by the bootstrap JDK (probably with -Xbootclasspath/p: ) and for this
# purpose must be built with -target PREVIOUS for bootstrapping purposes, which
# requires restricting to language level and api of previous JDK.
#
# The generate old bytecode javac setup uses the new compiler to compile for the
# boot jdk to generate tools that need to be run with the boot jdk.
# Thus we force the target bytecode to the previous JDK version.
$(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
JVM := $(JAVA_SMALL), \
JAVAC := $(NEW_JAVAC), \
FLAGS := $(BOOT_JDK_SOURCETARGET) -bootclasspath $(BOOT_RTJAR) $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
# The generate new bytecode javac setup uses the new compiler to compile for the
# new jdk. This new bytecode might only be possible to run using the new jvm.
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
JVM := $(JAVA), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -bootclasspath $(JDK_OUTPUTDIR)/classes -source 8 -target 8 \
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS) \
$(GENERATE_JDKBYTECODE_EXTRA_FLAGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
# After the jdk is built, we want to build demos using only the recently
# generated jdk classes and nothing else, no jdk source, etc etc.
# I.e. the rt.jar, but since rt.jar has not yet been generated
# (it will be in "make images") therefore we use classes instead.
$(eval $(call SetupJavaCompiler,GENERATE_USINGJDKBYTECODE, \
JVM := $(JAVA_SMALL), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -bootclasspath $(JDK_OUTPUTDIR)/classes $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))

@ -23,29 +23,40 @@
# questions.
#
ifndef _TOOLS_GMK
_TOOLS_GMK := 1
default: all
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
include NativeCompilation.gmk
include SetupJava.gmk
# Cache all finds needed for this file.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/make/src/classes))
# The exception handling of swing beaninfo which have the own tool directory
ifeq (, $(BUILD_TOOLS))
$(eval $(call SetupJavaCompilation,BUILD_TOOLS, \
ifeq (, $(BUILD_TOOLS_JDK))
$(eval $(call SetupJavaCompilation,BUILD_TOOLS_JDK, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(JDK_TOPDIR)/make/src/classes, \
BIN := $(JDK_OUTPUTDIR)/btclasses))
endif
$(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/%.template: \
$(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/%.template
$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/%.template
$(call install-file)
BUILD_TOOLS += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/*.template), $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
BUILD_TOOLS_JDK += $(foreach i, $(wildcard $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/*.template), $(JDK_OUTPUTDIR)/btclasses/build/tools/generatenimbus/resources/$(notdir $i))
# Resource used by CheckDeps tool
$(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed: \
$(JDK_TOPDIR)/make/data/checkdeps/refs.allowed
$(call install-file)
BUILD_TOOLS += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed
BUILD_TOOLS_JDK += $(JDK_OUTPUTDIR)/btclasses/build/tools/deps/refs.allowed
# Add a checksum ("jsum") to the end of a text file. Prevents trivial tampering with class lists.
TOOL_ADDJSUM = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
@ -118,9 +129,13 @@ TOOL_CLDRCONVERTER = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.cldrconverter.CLDRConverter
TOOL_CHECKDEPS = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
-cp $(JDK_OUTPUTDIR)/btclasses:$(JDK_OUTPUTDIR) \
-cp "$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)" \
build.tools.deps.CheckDeps
TOOL_GENMODULESXML = $(JAVA_SMALL) -Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR) \
-cp "$(JDK_OUTPUTDIR)/btclasses$(PATH_SEP)$(JDK_OUTPUTDIR)" \
build.tools.module.GenerateModulesXml
TOOL_ADDTORESTRICTEDPKGS = $(JAVA_SMALL) -cp $(JDK_OUTPUTDIR)/btclasses \
build.tools.addtorestrictedpkgs.AddToRestrictedPkgs
@ -149,3 +164,10 @@ $(eval $(call SetupNativeCompilation,FIX_EMPTY_SEC_HDR_FLAGS, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/btbin, \
PROGRAM := fix_empty_sec_hdr_flags))
endif
java-tools: $(BUILD_TOOLS_JDK)
all: java-tools
endif # _TOOLS_GMK

@ -0,0 +1,77 @@
#
# Copyright (c) 2012, 2013, 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
################################################################################
# Unpack the binary distributions of the crypto classes if they exist.
SEC_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-bin.zip
SEC_FILES_WIN_ZIP := $(JDK_TOPDIR)/make/tools/crypto/sec-windows-bin.zip
JGSS_WIN32_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-i586-bin.zip
JGSS_WIN64_FILES_ZIP := $(JDK_TOPDIR)/make/tools/crypto/jgss-windows-x64-bin.zip
define unzip-sec-file
$(ECHO) Unzipping $(<F)
$(MKDIR) -p $(@D)
$(RM) $@
($(CD) $(JDK_OUTPUTDIR) && $(UNZIP) -q -o $< > $@.tmp)
$(MV) $@.tmp $@
endef
$(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped: $(SEC_FILES_ZIP)
$(call unzip-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped: $(SEC_FILES_WIN_ZIP)
$(call unzip-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped: $(JGSS_WIN32_FILES_ZIP)
$(call unzip-sec-file)
$(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped: $(JGSS_WIN64_FILES_ZIP)
$(call unzip-sec-file)
ifneq ($(wildcard $(SEC_FILES_ZIP)), )
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-bin.unzipped
ifeq ($(OPENJDK_TARGET_OS), windows)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.sec-windows-bin.unzipped
ifeq ($(OPENJDK_TARGET_CPU), x86)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-i586-bin.unzipped
endif
ifeq ($(OPENJDK_TARGET_CPU), x86_64)
IMPORT_TARGET_FILES += $(JDK_OUTPUTDIR)/classes/_the.jgss-windows-x64-bin.unzipped
endif
endif
endif
################################################################################
sec: $(IMPORT_TARGET_FILES)
all: sec
.PHONY: sec all

@ -0,0 +1,245 @@
#
# Copyright (c) 2014, 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 CopyCommon.gmk
$(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.base.gmk))
################################################################################
#
# Copy exported header files to outputdir.
#
JAVA_BASE_HEADERS := \
$(INCLUDEDIR)/jni.h \
$(INCLUDEDIR)/jvmti.h \
$(INCLUDEDIR)/jvmticmlr.h \
$(INCLUDEDIR)/classfile_constants.h \
$(OPENJDK_TARGET_OS_INCLUDE)/jni_md.h \
#
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/java.base/share/native/include/%.h
$(call install-file)
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
$(call install-file)
################################################################################
CALENDARS_SRC := $(JDK_TOPDIR)/src/java.base/share/conf
$(LIBDIR)/calendars.properties: $(CALENDARS_SRC)/calendars.properties
$(call install-file)
BASE_CONF_FILES += $(LIBDIR)/calendars.properties
$(LIBDIR)/hijrah-config-umalqura.properties: $(CALENDARS_SRC)/hijrah-config-umalqura.properties
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $< $@
BASE_CONF_FILES += $(LIBDIR)/hijrah-config-umalqura.properties
################################################################################
ifneq ($(findstring $(OPENJDK_TARGET_OS), windows aix),)
TZMAPPINGS_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf
$(LIBDIR)/tzmappings: $(TZMAPPINGS_SRC)/tzmappings
$(call install-file)
BASE_CONF_FILES += $(LIBDIR)/tzmappings
endif
################################################################################
# Copy msvcrXX.dll on windows
ifeq ($(OPENJDK_TARGET_OS), windows)
MSVCR_TARGET := $(JDK_OUTPUTDIR)/bin/$(notdir $(MSVCR_DLL))
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
$(MSVCR_TARGET): $(MSVCR_DLL)
$(call install-file)
$(CHMOD) a+rx $@
endif
################################################################################
#
# How to install jvm.cfg.
#
ifeq ($(JVM_VARIANT_ZERO), true)
JVMCFG_ARCH := zero
else
JVMCFG_ARCH := $(OPENJDK_TARGET_CPU_LEGACY)
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/macosx/conf/$(JVMCFG_ARCH)/jvm.cfg
else
JVMCFG_SRC := $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/conf/$(JVMCFG_ARCH)/jvm.cfg
endif
JVMCFG_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
JVMCFG := $(JVMCFG_DIR)/jvm.cfg
# To do: should this also support -zeroshark?
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
COPY_JVM_CFG_FILE := true
else
# On 32-bit machines we have three potential VMs: client, server and minimal.
# Historically we usually have both client and server and so that is what the
# committed jvm.cfg expects (including platform specific ergonomics switches
# to decide whether to use client or server by default). So when we have anything
# other than client and server we need to define a new jvm.cfg file.
# The main problem is deciding whether to use aliases for the VMs that are not
# present and the current position is that we add aliases for client and server, but
# not for minimal.
CLIENT_AND_SERVER := $(and $(findstring true, $(JVM_VARIANT_SERVER)), $(findstring true, $(JVM_VARIANT_CLIENT)))
ifeq ($(CLIENT_AND_SERVER), true)
COPY_JVM_CFG_FILE := true
else
# For zero, the default jvm.cfg file is sufficient
ifeq ($(JVM_VARIANT_ZERO), true)
COPY_JVM_CFG_FILE := true
endif
endif
endif
ifeq ($(COPY_JVM_CFG_FILE), true)
$(JVMCFG): $(JVMCFG_SRC)
$(call install-file)
else
$(JVMCFG):
$(MKDIR) -p $(@D)
$(RM) $(@)
# Now check for other permutations
ifeq ($(JVM_VARIANT_SERVER), true)
$(PRINTF) "-server KNOWN\n">>$(@)
$(PRINTF) "-client ALIASED_TO -server\n">>$(@)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
$(PRINTF) "-minimal KNOWN\n">>$(@)
endif
else
ifeq ($(JVM_VARIANT_CLIENT), true)
$(PRINTF) "-client KNOWN\n">>$(@)
$(PRINTF) "-server ALIASED_TO -client\n">>$(@)
ifeq ($(JVM_VARIANT_MINIMAL1), true)
$(PRINTF) "-minimal KNOWN\n">>$(@)
endif
else
ifeq ($(JVM_VARIANT_MINIMAL1), true)
$(PRINTF) "-minimal KNOWN\n">>$(@)
$(PRINTF) "-server ALIASED_TO -minimal\n">>$(@)
$(PRINTF) "-client ALIASED_TO -minimal\n">>$(@)
endif
endif
endif
endif
BASE_CONF_FILES += $(JVMCFG)
################################################################################
POLICY_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.policy
POLICY_DST := $(JDK_OUTPUTDIR)/lib/security/java.policy
POLICY_SRC_LIST :=
ifeq ($(OPENJDK_TARGET_OS), windows)
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
endif
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy-win32
else
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy-win64
endif
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
POLICY_SRC_LIST += $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/conf/security/java.policy
endif
endif
POLICY_SRC_LIST += $(POLICY_SRC)
$(POLICY_DST): $(POLICY_SRC_LIST)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(foreach f,$(POLICY_SRC_LIST),$(CAT) $(f) >> $@.tmp;)
$(MV) $@.tmp $@
BASE_CONF_FILES += $(POLICY_DST)
################################################################################
ifeq ($(CACERTS_FILE), )
CACERTS_FILE := $(JDK_TOPDIR)/src/java.base/share/conf/security/cacerts
endif
CACERTS_DST := $(JDK_OUTPUTDIR)/lib/security/cacerts
$(CACERTS_DST): $(CACERTS_FILE)
$(call install-file)
BASE_CONF_FILES += $(CACERTS_DST)
################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
SUNPKCS11_CFG_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/sunpkcs11-solaris.cfg
SUNPKCS11_CFG_DST := $(JDK_OUTPUTDIR)/lib/security/sunpkcs11-solaris.cfg
$(SUNPKCS11_CFG_DST): $(SUNPKCS11_CFG_SRC)
$(call install-file)
BASE_CONF_FILES += $(SUNPKCS11_CFG_DST)
endif
################################################################################
$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/java.base/share/conf/net.properties
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/java.base/${OPENJDK_TARGET_OS_API_DIR}/conf/sdp/sdp.conf.template
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
NET_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
endif
################################################################################
java.base: $(BASE_CONF_FILES) $(NET_CONF_FILES) $(JAVA_BASE_HEADERS) $(MSVCR_TARGET)
all: java.base
.PHONY: all java.base

@ -0,0 +1,153 @@
#
# Copyright (c) 2014, 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 CopyCommon.gmk
$(eval $(call IncludeCustomExtension, jdk, copy/Copy-java.desktop.gmk))
################################################################################
JAVA_DESKTOP_HEADERS := \
$(INCLUDEDIR)/jawt.h \
$(OPENJDK_TARGET_OS_INCLUDE)/jawt_md.h \
#
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/java.desktop/share/native/include/%.h
$(call install-file)
$(OPENJDK_TARGET_OS_INCLUDE)/%.h: \
$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include/%.h
$(call install-file)
################################################################################
ICCPROFILE_DEST_DIR := $(LIBDIR)/cmm
ifdef OPENJDK
ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/java.desktop/share/conf/cmm/lcms
else
ICCPROFILE_SRC_DIR := $(JDK_TOPDIR)/src/closed/java.desktop/share/conf/cmm/kcms
endif
ICCPROFILE_SRCS := $(wildcard $(ICCPROFILE_SRC_DIR)/*.pf)
ICCPROFILE_TARGET_FILES := $(subst $(ICCPROFILE_SRC_DIR),$(ICCPROFILE_DEST_DIR),$(ICCPROFILE_SRCS))
$(ICCPROFILE_DEST_DIR)%.pf: $(ICCPROFILE_SRC_DIR)%.pf
$(call install-file)
$(CHMOD) 444 $@
DESKTOP_CONF_FILES += $(ICCPROFILE_TARGET_FILES)
################################################################################
ifneq ($(FREETYPE_BUNDLE_LIB_PATH), )
# We need to bundle the freetype library, so it will be available at runtime as well as link time.
#
# NB: Default freetype build system uses -h linker option and
# result .so contains hardcoded library name that is later
# used for adding dependencies to other objects
# (e.g. libfontmanager.so).
#
# It is not obvious how to extract that hardcoded name (libfreetype.so.6)
# without overcomplicating logic here.
# To workaround this we hardcode .6 suffix for now.
#
# Note that .so.6 library will not be found by System.loadLibrary()
# but fortunately we need to load FreeType library explicitly
# on windows only
#
#TODO: rework this to avoid hardcoding library name in the makefile
#
ifeq ($(OPENJDK_TARGET_OS), windows)
FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/bin/$(call SHARED_LIBRARY,freetype)
else
FREETYPE_TARGET_LIB := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/$(call SHARED_LIBRARY,freetype).6
endif
$(FREETYPE_TARGET_LIB): $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype)
$(CP) $(FREETYPE_BUNDLE_LIB_PATH)/$(call SHARED_LIBRARY,freetype) $@
ifeq ($(OPENJDK_BUILD_OS), windows)
$(CHMOD) +rx $@
endif
endif
################################################################################
$(JDK_OUTPUTDIR)/lib/sound.properties: $(JDK_TOPDIR)/src/java.desktop/share/conf/sound.properties
$(call install-file)
DESKTOP_CONF_FILES += $(JDK_OUTPUTDIR)/lib/sound.properties
################################################################################
#
# Copy property files from sun/print to LIBDIR
#
PSFONTPROPFILE_SRC_DIR := $(JDK_TOPDIR)/src/java.desktop/share/conf
PSFONTPROPFILE_SRCS := $(wildcard $(PSFONTPROPFILE_SRC_DIR)/psfont*.properties*)
PSFONTPROPFILE_TARGET_FILES := $(subst $(PSFONTPROPFILE_SRC_DIR),$(LIBDIR),$(PSFONTPROPFILE_SRCS))
$(LIBDIR)/%: $(PSFONTPROPFILE_SRC_DIR)/%
$(call install-file)
DESKTOP_CONF_FILES += $(PSFONTPROPFILE_TARGET_FILES)
################################################################################
#
# Copy cursor.properties and cursors gif files to LIBDIR
#
ifneq ($(OPENJDK_TARGET_OS), macosx)
OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/conf
else
OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/conf
endif
CURSORS_DEST_DIR := $(LIBDIR)/images/cursors
CURSORS_OPENJDK_TARGET_OS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/conf/images/cursors
$(CURSORS_DEST_DIR)/cursors.properties: $(CURSORS_OPENJDK_TARGET_OS_LIB_SRC)/cursors.properties
$(call install-file)
DESKTOP_CONF_FILES += $(CURSORS_DEST_DIR)/cursors.properties
CURSORS_LIB_SRC := $(JDK_TOPDIR)/src/java.desktop/share/conf/images/cursors
ifeq ($(OPENJDK_TARGET_OS), windows)
CURSORS_SRC_FILES := $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/win32_*.gif)
else # OPENJDK_TARGET_OS
CURSORS_SRC_FILES := $(CURSORS_LIB_SRC)/invalid32x32.gif $(wildcard $(CURSORS_LIB_SRC)/motif_*.gif)
endif # OPENJDK_TARGET_OS
CURSORS_TARGET_FILES := $(subst $(CURSORS_LIB_SRC),$(CURSORS_DEST_DIR),$(CURSORS_SRC_FILES))
$(CURSORS_DEST_DIR)/%: $(CURSORS_LIB_SRC)/%
$(call install-file)
DESKTOP_CONF_FILES += $(CURSORS_TARGET_FILES)
################################################################################
java.desktop: $(DESKTOP_CONF_FILES) $(FREETYPE_TARGET_LIB) $(JAVA_DESKTOP_HEADERS)
all: java.desktop
.PHONY: all java.desktop

@ -0,0 +1,43 @@
#
# Copyright (c) 2014, 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 CopyCommon.gmk
################################################################################
LOGGING_LIB_SRC := $(JDK_TOPDIR)/src/java.logging/share/conf
$(LIBDIR)/logging.properties: $(LOGGING_LIB_SRC)/logging.properties
$(call install-file)
LOGGING_CONF_FILES := $(LIBDIR)/logging.properties
################################################################################
java.logging: $(LOGGING_CONF_FILES)
all: java.logging
.PHONY: all java.logging

@ -0,0 +1,56 @@
#
# Copyright (c) 2014, 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 CopyCommon.gmk
################################################################################
MGMT_LIBDIR := $(LIBDIR)/management
MGMT_LIB_SRC := $(JDK_TOPDIR)/src/java.management/share/conf
MGMT_SRC_FILES := $(wildcard $(MGMT_LIB_SRC)/*)
MGMT_TARGET_FILES := $(subst $(MGMT_LIB_SRC),$(MGMT_LIBDIR),$(MGMT_SRC_FILES))
$(MGMT_LIBDIR)/management.properties: $(MGMT_LIB_SRC)/management.properties
$(call install-file)
$(CHMOD) 644 $@
# this file has different permissions...don't know why...
$(MGMT_LIBDIR)/jmxremote.access: $(MGMT_LIB_SRC)/jmxremote.access
$(call install-file)
$(CHMOD) 644 $@
$(MGMT_LIBDIR)/%: $(MGMT_LIB_SRC)/%
$(call install-file)
$(CHMOD) 444 $@
MANAGEMENT_CONF_FILES := $(MGMT_TARGET_FILES)
################################################################################
java.management: $(MANAGEMENT_CONF_FILES)
all: java.management
.PHONY: all java.management

@ -0,0 +1,43 @@
#
# Copyright (c) 2014, 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 CopyCommon.gmk
################################################################################
HPROF_SRC := $(JDK_TOPDIR)/src/demo/share/jvmti/hprof/jvm.hprof.txt
$(LIBDIR)/jvm.hprof.txt: $(HPROF_SRC)
$(call install-file)
HPROF_CONF_FILES := $(LIBDIR)/jvm.hprof.txt
################################################################################
jdk.hprof.agent: $(HPROF_CONF_FILES)
all: jdk.hprof.agent
.PHONY: all jdk.hprof.agent

@ -0,0 +1,42 @@
#
# Copyright (c) 2014, 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 CopyCommon.gmk
################################################################################
JDK_DEBUG_AGENT_HEADERS := $(INCLUDEDIR)/jdwpTransport.h
$(INCLUDEDIR)/%.h: $(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include/%.h
$(call install-file)
################################################################################
jdk.jdwp.agent: $(JDK_DEBUG_AGENT_HEADERS)
all: jdk.jdwp.agent
.PHONY: all jdk.jdwp.agent

@ -0,0 +1,40 @@
#
# Copyright (c) 2011, 2014, 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
INCLUDEDIR = $(JDK_OUTPUTDIR)/include
LIBDIR := $(JDK_OUTPUTDIR)/lib
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/$(OPENJDK_TARGET_OS)
ifeq ($(OPENJDK_TARGET_OS), windows)
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/win32
else ifeq ($(OPENJDK_TARGET_OS), macosx)
OPENJDK_TARGET_OS_INCLUDE = $(INCLUDEDIR)/darwin
endif

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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
@ -23,41 +23,25 @@
# questions.
#
default: all
include GendataCommon.gmk
include $(SPEC)
include MakeBase.gmk
include JavaCompilation.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, gendata/Gendata-java.base.gmk))
# Setup the java compilers for the JDK build.
include Setup.gmk
# We need the tools.
include Tools.gmk
# Now include all the rules that generate data resources.
# These are written directly into classes dir.
GENDATA :=
include gendata/GendataBreakIterator.gmk
include GendataBreakIterator.gmk
GENDATA += $(BREAK_ITERATOR)
include gendata/GendataFontConfig.gmk
GENDATA += $(GENDATA_FONT_CONFIG)
include gendata/GendataTZDB.gmk
include GendataTZDB.gmk
GENDATA += $(GENDATA_TZDB)
include gendata/GendataHtml32dtd.gmk
GENDATA += $(GENDATA_HTML32DTD)
include gendata/GendataBlacklistedCerts.gmk
include GendataBlacklistedCerts.gmk
GENDATA += $(GENDATA_BLACKLISTED_CERTS)
##########################################################################################
GENDATA_UNINAME := $(JDK_OUTPUTDIR)/classes/java/lang/uniName.dat
GENDATA_UNINAME := $(JDK_OUTPUTDIR)/modules/java.base/java/lang/uniName.dat
$(GENDATA_UNINAME): $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt $(BUILD_TOOLS)
$(GENDATA_UNINAME): $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(TOOL_CHARACTERNAME) $< $@
@ -65,9 +49,9 @@ GENDATA += $(GENDATA_UNINAME)
##########################################################################################
GENDATA_CURDATA := $(JDK_OUTPUTDIR)/classes/java/util/currency.data
GENDATA_CURDATA := $(JDK_OUTPUTDIR)/modules/java.base/java/util/currency.data
$(GENDATA_CURDATA): $(JDK_TOPDIR)/make/data/currency/CurrencyData.properties $(BUILD_TOOLS)
$(GENDATA_CURDATA): $(JDK_TOPDIR)/make/data/currency/CurrencyData.properties $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(RM) $@
$(TOOL_GENERATECURRENCYDATA) -o $@.tmp < $<
@ -78,11 +62,32 @@ GENDATA += $(GENDATA_CURDATA)
##########################################################################################
$(GENDATA): $(BUILD_TOOLS)
PROPS_SRC := $(JDK_TOPDIR)/src/java.base/share/conf/security/java.security-$(OPENJDK_TARGET_OS)
PROPS_DST := $(JDK_OUTPUTDIR)/lib/security/java.security
$(JDK_OUTPUTDIR)/classes/_the.gendata: $(GENDATA)
$(TOUCH) $@
# Optionally set this variable to a file to add extra restricted packages.
ifneq ($(RESTRICTED_PKGS_SRC), )
all: $(JDK_OUTPUTDIR)/classes/_the.gendata
$(PROPS_DST): $(PROPS_SRC) $(RESTRICTED_PKGS_SRC)
$(MKDIR) -p $(@D)
$(TOOL_ADDTORESTRICTEDPKGS) $(PROPS_SRC) $@.tmp `$(CAT) $(RESTRICTED_PKGS_SRC) | $(TR) "\n" " "`
$(MV) $@.tmp $@
.PHONY: all
else
$(PROPS_DST): $(PROPS_SRC)
$(call install-file)
endif
GENDATA += $(PROPS_DST)
##########################################################################################
$(GENDATA): $(BUILD_TOOLS_JDK)
java.base: $(GENDATA)
all: java.base
.PHONY: all java.base

@ -0,0 +1,40 @@
#
# Copyright (c) 2011, 2014, 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 GendataCommon.gmk
include GendataFontConfig.gmk
GENDATA += $(GENDATA_FONT_CONFIG)
include GendataHtml32dtd.gmk
GENDATA += $(GENDATA_HTML32DTD)
$(GENDATA): $(BUILD_TOOLS_JDK)
java.desktop: $(GENDATA)
all: $(GENDATA)
.PHONY: all java.desktop

@ -33,7 +33,8 @@
# They are used at JDK build phase in order to create $(BIFILES) which
# are used on runtime instead.
#
TEXT_SRCDIR = $(JDK_TOPDIR)/src/share/classes
TEXT_SRCDIR = $(JDK_TOPDIR)/src/java.base/share/classes \
$(JDK_TOPDIR)/src/jdk.localedata/share/classes
TEXT_PKG = sun/text/resources
TEXT_SOURCES = $(TEXT_PKG)/BreakIteratorRules.java \
$(TEXT_PKG)/BreakIteratorInfo.java \
@ -54,7 +55,7 @@ $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR, \
SETUP := GENERATE_OLDBYTECODE, \
SRC := $(TEXT_SRCDIR), \
DISABLE_SJAVAC := true, \
JAVAC_SOURCE_PATH_OVERRIDE := $(TEXT_SRCDIR)/$(TEXT_PKG), \
JAVAC_SOURCE_PATH_OVERRIDE := $(patsubst %, %/$(TEXT_PKG), $(TEXT_SRCDIR)), \
INCLUDES := $(TEXT_PKG), \
INCLUDE_FILES := $(TEXT_SOURCES), \
BIN := $(BREAK_ITERATOR_CLASSES)))
@ -64,33 +65,34 @@ $(eval $(call SetupJavaCompilation,BUILD_BREAKITERATOR, \
UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata/UnicodeData.txt
# output
DATA_PKG_DIR = $(JDK_OUTPUTDIR)/classes/sun/text/resources
BIFILES = $(DATA_PKG_DIR)/CharacterBreakIteratorData \
$(DATA_PKG_DIR)/WordBreakIteratorData \
$(DATA_PKG_DIR)/LineBreakIteratorData \
$(DATA_PKG_DIR)/SentenceBreakIteratorData
BIFILES_TH = $(DATA_PKG_DIR)/th/WordBreakIteratorData_th \
$(DATA_PKG_DIR)/th/LineBreakIteratorData_th
BASE_DATA_PKG_DIR = $(JDK_OUTPUTDIR)/modules/java.base/sun/text/resources
SL_DATA_PKG_DIR = $(JDK_OUTPUTDIR)/modules/jdk.localedata/sun/text/resources
BIFILES = $(BASE_DATA_PKG_DIR)/CharacterBreakIteratorData \
$(BASE_DATA_PKG_DIR)/WordBreakIteratorData \
$(BASE_DATA_PKG_DIR)/LineBreakIteratorData \
$(BASE_DATA_PKG_DIR)/SentenceBreakIteratorData
BIFILES_TH = $(SA_DATA_PKG_DIR)/th/WordBreakIteratorData_th \
$(SA_DATA_PKG_DIR)/th/LineBreakIteratorData_th
$(BIFILES): $(DATA_PKG_DIR)/_the.bifiles
$(DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(BIFILES): $(BASE_DATA_PKG_DIR)/_the.bifiles
$(BASE_DATA_PKG_DIR)/_the.bifiles: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(BASE_DATA_PKG_DIR)/_the.bifiles: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(ECHO) $(LOG_INFO) "Generating BreakIteratorData"
$(MKDIR) -p $(DATA_PKG_DIR)
$(MKDIR) -p $(@D)
$(RM) $(BIFILES)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(DATA_PKG_DIR) \
-o $(@D) \
-spec $(UNICODEDATA)
$(TOUCH) $@
$(BIFILES_TH): $(DATA_PKG_DIR)/_the.bifiles_th
$(DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(BIFILES_TH): $(SL_DATA_PKG_DIR)/_the.bifiles_th
$(SL_DATA_PKG_DIR)/_the.bifiles_th: JAVA_FLAGS += -Xbootclasspath/p:$(BREAK_ITERATOR_CLASSES)
$(SL_DATA_PKG_DIR)/_the.bifiles_th: $(BUILD_TOOLS) $(UNICODEDATA) $(BUILD_BREAKITERATOR)
$(ECHO) $(LOG_INFO) "Generating BreakIteratorData_th"
$(MKDIR) -p $(DATA_PKG_DIR)/th
$(MKDIR) -p $(@D)/th
$(RM) $(BIFILES_TH)
$(TOOL_GENERATEBREAKITERATORDATA) \
-o $(DATA_PKG_DIR) \
-o $(@D) \
-spec $(UNICODEDATA) \
-language th
$(TOUCH) $@

@ -0,0 +1,36 @@
#
# Copyright (c) 2011, 2014, 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
include JavaCompilation.gmk
# Setup the java compilers for the JDK build.
include SetupJava.gmk
# We need the tools.
include Tools.gmk

@ -25,7 +25,7 @@
GENDATA_HTML32DTD :=
HTML32DTD = $(JDK_OUTPUTDIR)/classes/javax/swing/text/html/parser/html32.bdtd
HTML32DTD = $(JDK_OUTPUTDIR)/modules/java.desktop/javax/swing/text/html/parser/html32.bdtd
$(HTML32DTD): $(BUILD_TOOLS)
$(ECHO) "Generating HTML DTD file"
$(MKDIR) -p $(@D)

@ -36,6 +36,7 @@ GENDATA_TZDB_DAT := $(JDK_OUTPUTDIR)/lib/tzdb.dat
$(GENDATA_TZDB_DAT): $(TZDATA_TZFILES)
$(RM) $(GENDATA_TZDB_DAT)
$(MKDIR) -p $(@D)
$(TOOL_TZDB) -srcdir $(TZDATA_DIR) -dstfile $(GENDATA_TZDB_DAT) $(TZDATA_TZFILE)
GENDATA_TZDB += $(GENDATA_TZDB_DAT)

@ -0,0 +1,45 @@
#
# Copyright (c) 2011, 2013, 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 GensrcCommon.gmk
# TODO: maybe split into separate modules?
include GensrcProperties.gmk
GENSRC_JAVA_BASE += $(GENSRC_PROPERTIES)
include GensrcLocaleDataMetaInfo.gmk
include GensrcCharacterData.gmk
include GensrcMisc.gmk
include GensrcCharsetMapping.gmk
include GensrcCharsetCoder.gmk
include GensrcBuffer.gmk
include GensrcExceptions.gmk
include GensrcCLDR.gmk
java.base: $(GENSRC_JAVA_BASE)
all: java.base
.PHONY: all java.base

@ -0,0 +1,45 @@
#
# Copyright (c) 2011, 2014, 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 GensrcCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, gensrc/Gensrc-java.desktop.gmk))
ifneq ($(OPENJDK_TARGET_OS), windows)
include GensrcIcons.gmk
ifneq ($(OPENJDK_TARGET_OS), macosx)
include GensrcX11Wrappers.gmk
endif
endif
include GensrcSwing.gmk
java.desktop: $(GENSRC_JAVA_DESKTOP)
all: java.desktop
.PHONY: all java.desktop

@ -0,0 +1,34 @@
#
# Copyright (c) 2011, 2013, 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 GensrcCommon.gmk
include GensrcProviders.gmk
jdk.attach: $(GENSRC_JDK_ATTACH)
all: jdk.attach
.PHONY: all jdk.attach

@ -0,0 +1,34 @@
#
# Copyright (c) 2011, 2013, 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 GensrcCommon.gmk
include GensrcCharsetMapping.gmk
jdk.charsets: $(GENSRC_JDK_CHARSETS)
all: jdk.charsets
.PHONY: all jdk.charsets

@ -0,0 +1,45 @@
#
# Copyright (c) 2011, 2013, 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 GensrcCommon.gmk
##########################################################################################
# Version file for jconsole
$(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java: \
$(JDK_TOPDIR)/src/jdk.jconsole/share/classes/sun/tools/jconsole/Version.java.template
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(ECHO) $(LOG_INFO) Generating sun/tools/jconsole/Version.java
$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
$(MV) $@.tmp $@
GENSRC_JDK_JCONSOLE += $(JDK_OUTPUTDIR)/gensrc/jdk.jconsole/sun/tools/jconsole/Version.java
jdk.jconsole: $(GENSRC_JDK_JCONSOLE)
all: jdk.jconsole
.PHONY: all jdk.jconsole

@ -0,0 +1,35 @@
#
# Copyright (c) 2011, 2013, 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 GensrcCommon.gmk
include GensrcJDWP.gmk
include GensrcProviders.gmk
jdk.jdi: $(GENSRC_JDK_JDI)
all: jdk.jdi
.PHONY: all jdk.jdi

@ -26,9 +26,9 @@
GENSRC_BUFFER :=
GENSRC_BUFFER_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
GENSRC_BUFFER_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
GENSRC_BUFFER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
###
@ -377,4 +377,5 @@ $(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF), type:=dou
###
$(GENSRC_BUFFER): $(BUILD_TOOLS)
$(GENSRC_BUFFER): $(BUILD_TOOLS_JDK)
GENSRC_JAVA_BASE += $(GENSRC_BUFFER)

@ -24,16 +24,29 @@
#
CLDRVERSION := 21.0.1
CLDRSRCDIR := $(JDK_TOPDIR)/src/share/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
CLDRSRCDIR := $(JDK_TOPDIR)/src/jdk.localedata/share/classes/sun/util/cldr/resources/$(subst .,_,$(CLDRVERSION))
GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc
GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/jdk.localedata
BASE_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc/java.base
CLDR_METAINFO_FILE := $(GENSRC_DIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java
CLDR_METAINFO_FILE := $(BASE_GENSRC_DIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java
$(CLDR_METAINFO_FILE): $(wildcard $(CLDRSRCDIR)/common/dtd/*.dtd) \
$(wildcard $(CLDRSRCDIR)/common/main/*.xml) \
$(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml)
$(MKDIR) -p $(@D)
$(wildcard $(CLDRSRCDIR)/common/supplemental/*.xml) \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(GENSRC_DIR)
$(TOOL_CLDRCONVERTER) -base $(CLDRSRCDIR) -o $(GENSRC_DIR)
$(MKDIR) -p $(BASE_GENSRC_DIR)/sun/text/resources/cldr
$(MKDIR) -p $(BASE_GENSRC_DIR)/sun/util/resources/cldr
$(RM) -r $(BASE_GENSRC_DIR)/sun/text/resources/cldr/en \
$(BASE_GENSRC_DIR)/sun/util/resources/cldr/en
$(MV) $(GENSRC_DIR)/sun/text/resources/cldr/en $(BASE_GENSRC_DIR)/sun/text/resources/cldr/en
$(MV) $(GENSRC_DIR)/sun/util/resources/cldr/en $(BASE_GENSRC_DIR)/sun/util/resources/cldr/en
$(MV) $(GENSRC_DIR)/sun/text/resources/cldr/*.java $(BASE_GENSRC_DIR)/sun/text/resources/cldr
$(MV) $(GENSRC_DIR)/sun/util/resources/cldr/*.java $(BASE_GENSRC_DIR)/sun/util/resources/cldr
$(MKDIR) -p $(@D)
$(MV) $(GENSRC_DIR)/sun/util/cldr/CLDRLocaleDataMetaInfo.java $@
GENSRC_CLDR := $(CLDR_METAINFO_FILE)
GENSRC_JAVA_BASE += $(GENSRC_CLDR)

@ -33,7 +33,7 @@ CHARACTERDATA = $(JDK_TOPDIR)/make/data/characterdata
UNICODEDATA = $(JDK_TOPDIR)/make/data/unicodedata
define SetupCharacterData
$(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java: $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS)
$(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: $(CHARACTERDATA)/$1.java.template $(BUILD_TOOLS_JDK)
$(MKDIR) -p $$(@D)
$(ECHO) $(LOG_INFO) Generating $1.java
$(TOOL_GENERATECHARACTER) $2 \
@ -41,10 +41,10 @@ define SetupCharacterData
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
-proplist $(UNICODEDATA)/PropList.txt \
-o $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java -string \
-o $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java -string \
-usecharforbyte $3
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/$1.java
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java
endef
$(eval $(call SetupCharacterData,CharacterDataLatin1, , -latin1 8))
@ -54,11 +54,12 @@ $(eval $(call SetupCharacterData,CharacterData02, -plane 2, 11 4 1))
$(eval $(call SetupCharacterData,CharacterData0E, -plane 14, 11 4 1))
# Copy two Java files that need no preprocessing.
$(JDK_OUTPUTDIR)/gensrc/java/lang/%.java: $(CHARACTERDATA)/%.java.template
$(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/%.java: $(CHARACTERDATA)/%.java.template
$(ECHO) $(LOG_INFO) Generating $(@F)
$(call install-file)
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataUndefined.java \
$(JDK_OUTPUTDIR)/gensrc/java/lang/CharacterDataPrivateUse.java
GENSRC_CHARACTERDATA += $(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataUndefined.java \
$(JDK_OUTPUTDIR)/gensrc/java.base/java/lang/CharacterDataPrivateUse.java
GENSRC_JAVA_BASE += $(GENSRC_CHARACTERDATA)
$(GENSRC_CHARACTERDATA): $(BUILD_TOOLS)
$(GENSRC_CHARACTERDATA): $(BUILD_TOOLS_JDK)

@ -26,9 +26,9 @@
GENSRC_CHARSETCODER :=
GENSRC_CHARSETCODER_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio/charset
GENSRC_CHARSETCODER_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio/charset
GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
GENSRC_CHARSETCODER_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
@ -101,7 +101,8 @@ $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MV) $@.tmp $@
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
GENSRC_JAVA_BASE += $(GENSRC_CHARSETCODER)
###
$(GENSRC_CHARSETCODER): $(BUILD_TOOLS)
$(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK)

@ -31,54 +31,57 @@ CHARSET_DATA_DIR := $(JDK_TOPDIR)/make/data/charsetmapping
### Generate files using the charsetmapping tool
###
CHARSET_GENSRC_JAVA_DIR := $(JDK_OUTPUTDIR)/gensrc/sun/nio/cs
CHARSET_DONE := $(CHARSET_GENSRC_JAVA_DIR)/_the.charsetmapping
CHARSET_GENSRC_JAVA_DIR_CS := $(JDK_OUTPUTDIR)/gensrc/jdk.charsets/sun/nio/cs/ext
CHARSET_GENSRC_JAVA_DIR_BASE := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/cs
CHARSET_DONE_CS := $(CHARSET_GENSRC_JAVA_DIR_CS)/_the.charsetmapping
CHARSET_DONE_BASE := $(CHARSET_GENSRC_JAVA_DIR_BASE)/_the.charsetmapping
CHARSET_COPYRIGHT_HEADER_BASE := $(JDK_TOPDIR)/make/src/classes/build/tools/charsetmapping
CHARSET_TEMPLATES := \
$(CHARSET_DATA_DIR)/SingleByte-X.java.template \
$(CHARSET_DATA_DIR)/DoubleByte-X.java.template
# This target should be referenced using the order-only operator (|)
$(CHARSET_GENSRC_JAVA_DIR)/ext:
$(CHARSET_GENSRC_JAVA_DIR_CS):
$(ECHO) "Generating charset mappings"
$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR)/ext
$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR_CS)
$(MKDIR) -p $(CHARSET_GENSRC_JAVA_DIR_BASE)
$(CHARSET_DONE)-sbcs: $(CHARSET_DATA_DIR)/sbcs \
$(CHARSET_TEMPLATES) $(BUILD_TOOLS) | $(CHARSET_GENSRC_JAVA_DIR)/ext
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR) sbcs
$(CHARSET_DONE_BASE)-sbcs: $(CHARSET_DATA_DIR)/sbcs \
$(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK) | $(CHARSET_GENSRC_JAVA_DIR_CS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_BASE) sbcs
$(TOUCH) '$@'
$(CHARSET_DONE)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs \
$(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext extsbcs
$(CHARSET_DONE_CS)-extsbcs: $(CHARSET_DATA_DIR)/extsbcs \
$(CHARSET_DONE_BASE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) extsbcs
$(TOUCH) '$@'
$(CHARSET_DONE)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
$(CHARSET_DONE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext dbcs
$(CHARSET_DONE_CS)-dbcs: $(CHARSET_DATA_DIR)/dbcs \
$(CHARSET_DONE_BASE)-sbcs $(CHARSET_TEMPLATES) $(BUILD_TOOLS_JDK)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) dbcs
$(TOUCH) '$@'
$(CHARSET_DONE)-hkscs: $(CHARSET_COPYRIGHT_HEADER_BASE)/HKSCS.java \
$(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext hkscs '$<'
$(CHARSET_DONE_CS)-hkscs: $(CHARSET_COPYRIGHT_HEADER_BASE)/HKSCS.java \
$(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) hkscs '$<'
$(TOUCH) '$@'
$(CHARSET_DONE)-euctw: $(CHARSET_COPYRIGHT_HEADER_BASE)/EUC_TW.java \
$(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR)/ext euctw '$<'
$(CHARSET_DONE_CS)-euctw: $(CHARSET_COPYRIGHT_HEADER_BASE)/EUC_TW.java \
$(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
$(TOOL_CHARSETMAPPING) $(CHARSET_DATA_DIR) $(CHARSET_GENSRC_JAVA_DIR_CS) euctw '$<'
$(TOUCH) '$@'
$(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
$(CHARSET_DONE)-sbcs $(BUILD_TOOLS)
$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat: $(CHARSET_DATA_DIR)/sjis0213.map \
$(CHARSET_DONE_BASE)-sbcs $(BUILD_TOOLS_JDK)
$(TOOL_CHARSETMAPPING) '$<' '$@' sjis0213
GENSRC_CHARSETMAPPING += \
$(CHARSET_DONE)-sbcs \
$(CHARSET_DONE)-extsbcs \
$(CHARSET_DONE)-dbcs \
$(CHARSET_DONE)-hkscs \
$(CHARSET_DONE)-euctw \
$(CHARSET_GENSRC_JAVA_DIR)/ext/sjis0213.dat \
GENSRC_JAVA_BASE += $(CHARSET_DONE_BASE)-sbcs
GENSRC_JDK_CHARSETS += \
$(CHARSET_DONE_CS)-extsbcs \
$(CHARSET_DONE_CS)-dbcs \
$(CHARSET_DONE_CS)-hkscs \
$(CHARSET_DONE_CS)-euctw \
$(CHARSET_GENSRC_JAVA_DIR_CS)/sjis0213.dat \
#
###
@ -144,20 +147,20 @@ $(CHARSET_STANDARD_GENSRC_DIR)/classes-map: $(CHARSET_STANDARD_DATA) \
$(NAWK) < '$<' > '$@' $(CHARSET_CLASSES_MAP_AWK)
$(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map \
$(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
$(BUILD_TOOLS_JDK) | $(CHARSET_STANDARD_GENSRC_DIR)
$(TOOL_HASHER) -i Aliases < '$<' > '$@'
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
$(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
$(BUILD_TOOLS_JDK) | $(CHARSET_STANDARD_GENSRC_DIR)
$(TOOL_HASHER) -i Classes < '$<' > '$@'
$(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet: $(CHARSET_STANDARD_GENSRC_DIR)/classes-map \
$(BUILD_TOOLS) | $(CHARSET_STANDARD_GENSRC_DIR)
$(BUILD_TOOLS_JDK) | $(CHARSET_STANDARD_GENSRC_DIR)
$(TOOL_HASHER) -i -e Cache -t Charset < '$<' > '$@'
$(eval $(call SetupTextFileProcessing, BUILD_CHARSET_STANDARD, \
SOURCE_FILES := $(JDK_TOPDIR)/src/share/classes/$(CHARSET_STANDARD_JAVA).template, \
OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/$(CHARSET_STANDARD_JAVA), \
SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/$(CHARSET_STANDARD_JAVA).template, \
OUTPUT_FILE := $(JDK_OUTPUTDIR)/gensrc/java.base/$(CHARSET_STANDARD_JAVA), \
INCLUDES := \
_INCLUDE_ALIASES_TABLES_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-tables.java.snippet ; \
_INCLUDE_ALIASES_MAP_ => $(CHARSET_STANDARD_GENSRC_DIR)/aliases-map.java.snippet ; \
@ -172,4 +175,4 @@ $(BUILD_CHARSET_STANDARD): \
$(CHARSET_STANDARD_GENSRC_DIR)/classes-map.java.snippet \
$(CHARSET_STANDARD_GENSRC_DIR)/cache-map.java.snippet
GENSRC_CHARSETMAPPING += $(BUILD_CHARSET_STANDARD)
GENSRC_JAVA_BASE += $(BUILD_CHARSET_STANDARD)

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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
@ -32,63 +32,7 @@ include NativeCompilation.gmk
include TextFileProcessing.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
include SetupJava.gmk
# We need the tools.
include Tools.gmk
# Now include all the rules that generate Java sources.
# The Java sources are written into the gensrc_.... directories.
include gensrc/GensrcProperties.gmk
GENSRC += $(GENSRC_PROPERTIES)
include gensrc/GensrcLocaleDataMetaInfo.gmk
GENSRC += $(GENSRC_LOCALEDATAMETAINFO)
include gensrc/GensrcCharacterData.gmk
GENSRC += $(GENSRC_CHARACTERDATA)
include gensrc/GensrcJDWP.gmk
GENSRC += $(GENSRC_JDWP)
include gensrc/GensrcMisc.gmk
GENSRC += $(GENSRC_MISC)
include gensrc/GensrcCharsetMapping.gmk
GENSRC += $(GENSRC_CHARSETMAPPING)
include gensrc/GensrcCharsetCoder.gmk
GENSRC += $(GENSRC_CHARSETCODER)
include gensrc/GensrcBuffer.gmk
GENSRC += $(GENSRC_BUFFER)
include gensrc/GensrcExceptions.gmk
GENSRC += $(GENSRC_EXCEPTIONS)
ifneq ($(OPENJDK_TARGET_OS), windows)
include gensrc/GensrcIcons.gmk
GENSRC += $(GENSRC_AWT_ICONS)
ifeq ($(OPENJDK_TARGET_OS), macosx)
GENSRC += $(GENSRC_OSX_ICONS)
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
include gensrc/GensrcX11Wrappers.gmk
GENSRC += $(GENSRC_X11WRAPPERS)
endif
endif
include gensrc/GensrcCLDR.gmk
GENSRC += $(GENSRC_CLDR)
include gensrc/GensrcSwing.gmk
GENSRC += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)
$(GENSRC): $(BUILD_TOOLS)
all: $(GENSRC)
.PHONY: all

@ -26,9 +26,9 @@
GENSRC_EXCEPTIONS :=
GENSRC_EXCEPTIONS_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc/java/nio
GENSRC_EXCEPTIONS_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/java/nio
GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/share/classes/java/nio
GENSRC_EXCEPTIONS_SRC := $(JDK_TOPDIR)/src/java.base/share/classes/java/nio
GENSRC_EXCEPTIONS_CMD := $(JDK_TOPDIR)/make/scripts/genExceptions.sh
GENSRC_EXCEPTIONS_SRC_DIRS := . charset channels
@ -51,5 +51,6 @@ $(GENSRC_EXCEPTIONS_DST)/_the.%.marker: $(GENSRC_EXCEPTIONS_SRC)/%/exceptions \
$(TOUCH) $@
GENSRC_EXCEPTIONS += $(foreach D,$(GENSRC_EXCEPTIONS_SRC_DIRS),$(GENSRC_EXCEPTIONS_DST)/_the.$(D).marker)
GENSRC_JAVA_BASE += $(GENSRC_EXCEPTIONS)
$(GENSRC_EXCEPTIONS): $(BUILD_TOOLS)
$(GENSRC_EXCEPTIONS): $(BUILD_TOOLS_JDK)

@ -26,12 +26,12 @@
GENSRC_AWT_ICONS :=
GENSRC_AWT_ICONS_SRC :=
GENSRC_AWT_ICONS_TMP := $(JDK_OUTPUTDIR)/gensrc
GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/sun/awt/
GENSRC_AWT_ICONS_DST := $(GENSRC_AWT_ICONS_TMP)/java.desktop/sun/awt/
ifdef OPENJDK
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)
else
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/solaris
X11_ICONS_PATH_PREFIX := $(JDK_TOPDIR)/src/closed/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)
endif
GENSRC_AWT_ICONS_SRC += \
@ -41,7 +41,7 @@ GENSRC_AWT_ICONS_SRC += \
$(X11_ICONS_PATH_PREFIX)/classes/sun/awt/X11/java-icon48.png
AWT_ICONPATH := $(JDK_TOPDIR)/src/share/classes/sun/awt/resources
AWT_ICONPATH := $(JDK_TOPDIR)/src/java.desktop/share/classes/sun/awt/resources
GENSRC_AWT_ICONS_SRC += \
$(AWT_ICONPATH)/security-icon-bw16.png \
@ -80,7 +80,7 @@ define SetupGensrcAWTIcon
$1_NAME64 := $(call GENSRC_AWT_ICONS_DST_NAME,$1,64)
$1_TARGET64 := $(GENSRC_AWT_ICONS_DST)/$$($1_NAME64).java
$$($1_TARGET32): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
$$($1_TARGET32): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir $(BUILD_TOOLS_JDK)
$(RM) $$@ $$@.tmp
$(ECHO) "package sun.awt;" > $$@.tmp
$(ECHO) "public class $$($1_NAME32) {" >> $$@.tmp
@ -91,7 +91,7 @@ define SetupGensrcAWTIcon
GENSRC_AWT_ICONS += $$($1_TARGET32)
$$($1_TARGET64): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir
$$($1_TARGET64): $2/$1 $(GENSRC_AWT_ICONS_TMP)/_the.icons.dir $(BUILD_TOOLS_JDK)
$(RM) $$@ $$@.tmp
$(ECHO) "package sun.awt;" > $$@.tmp
$(ECHO) "public class $$($1_NAME64) {" >> $$@.tmp
@ -105,6 +105,8 @@ endef
$(foreach I, $(GENSRC_AWT_ICONS_SRC), $(eval $(call SetupGensrcAWTIcon,$(notdir $(I)),$(dir $(I)))))
GENSRC_JAVA_DESKTOP += $(GENSRC_AWT_ICONS)
###
ifeq ($(OPENJDK_TARGET_OS), macosx)
@ -118,7 +120,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
GENSRC_OSX_ICONS_SRC := $(JDK_TOPDIR)/make/closed/data/macosxicons/JavaApp.icns
endif
$(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC)
$(GENSRC_OSX_ICONS): $(GENSRC_OSX_ICONS_SRC) $(BUILD_TOOLS_JDK)
$(RM) $@ $@.tmp
$(MKDIR) -p $(dir $@)
$(ECHO) "static unsigned char sAWTIconData[] = { " >> $@.tmp
@ -126,4 +128,5 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
$(ECHO) "};" >> $@.tmp
$(MV) $@.tmp $@
GENSRC_JAVA_DESKTOP += $(GENSRC_OSX_ICONS)
endif

@ -30,19 +30,22 @@ JDWP_SPEC_FILE := $(JDK_TOPDIR)/make/data/jdwp/jdwp.spec
$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h: $(JDWP_SPEC_FILE)
$(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java: $(JDWP_SPEC_FILE)
$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java: \
$(JDWP_SPEC_FILE) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_jdwp_headers
$(RM) $@ $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
$(ECHO) $(LOG_INFO) Creating JDWP.java and JDWPCommands.h from jdwp.spec
$(TOOL_JDWPGEN) $< -jdi $@ -include $(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h
$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html: $(JDWP_SPEC_FILE)
$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html: $(JDWP_SPEC_FILE) \
$(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(RM) $@
$(ECHO) $(LOG_INFO) Creating $(@F) from jdwp.spec
$(TOOL_JDWPGEN) $< -doc $@
GENSRC_JDWP := $(JDK_OUTPUTDIR)/gensrc/com/sun/tools/jdi/JDWP.java \
GENSRC_JDWP := $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/com/sun/tools/jdi/JDWP.java \
$(JDK_OUTPUTDIR)/gensrc_jdwp_headers/JDWPCommands.h \
$(JDK_OUTPUTDIR)/gensrc_jdwp_doc/jdwp-protocol.html
GENSRC_JDK_JDI += $(GENSRC_JDWP)

@ -24,11 +24,11 @@
#
# Scan for all locale resources and extract for which locales there exists
# resources. Then put this meta information about exiting (supported?) locales
# resources. Then put this meta information about existing (supported?) locales
# into LocaleDataMetaInfo.java
# First go look for all locale files
LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/share/classes \
LOCALE_FILES := $(shell $(FIND) $(JDK_TOPDIR)/src/*/share/classes \
-name "FormatData_*.java" -o -name "FormatData_*.properties" -o \
-name "CollationData_*.java" -o -name "CollationData_*.properties" -o \
-name "TimeZoneNames_*.java" -o -name "TimeZoneNames_*.properties" -o \
@ -101,27 +101,28 @@ $(eval $(call CaptureLocale,CalendarData))
SED_ARGS += -e 's/$(HASH)AvailableLocales_ENLocales$(HASH)/$(sort $(ALL_EN_LOCALES))/g'
SED_ARGS += -e 's/$(HASH)AvailableLocales_NonENLocales$(HASH)/$(sort $(ALL_NON_EN_LOCALES))/g'
$(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/LocaleDataMetaInfo.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/util/locale/provider/LocaleDataMetaInfo-XLocales.java.template
$(MKDIR) -p $(@D)
$(ECHO) Creating sun/util/LocaleDataMetaInfo.java from $(words $(LOCALE_RESOURCES)) found resources.
$(PRINTF) "PREV_LOCALE_RESOURCES:=$(LOCALE_RESOURCES)" > $(JDK_OUTPUTDIR)/gensrc/_the.locale_resources
$(SED) $(SED_ARGS) $< > $@
GENSRC_LOCALEDATAMETAINFO := $(JDK_OUTPUTDIR)/gensrc/sun/util/locale/provider/LocaleDataMetaInfo.java
GENSRC_LOCALEDATAMETAINFO := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/locale/provider/LocaleDataMetaInfo.java
###
################################################################################
GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc/sun/util/CoreResourceBundleControl.java
GENSRC_CRBC_DST := $(JDK_OUTPUTDIR)/gensrc/java.base/sun/util/CoreResourceBundleControl.java
GENSRC_CRBC_CMD := $(JDK_TOPDIR)/make/scripts/localelist.sh
JRE_NONEXIST_LOCALES := en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
$(GENSRC_CRBC_DST): $(JDK_TOPDIR)/src/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template \
$(GENSRC_CRBC_DST): $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/CoreResourceBundleControl-XLocales.java.template \
$(GENSRC_CRBC_CMD)
$(MKDIR) -p $(@D)
NAWK="$(NAWK)" SED="$(SED)" $(SH) $(GENSRC_CRBC_CMD) "$(JRE_NONEXIST_LOCALES)" $< $@
GENSRC_LOCALEDATAMETAINFO += $(GENSRC_CRBC_DST)
GENSRC_JAVA_BASE += $(GENSRC_LOCALEDATAMETAINFO)
###
################################################################################

@ -30,9 +30,9 @@ include ProfileNames.gmk
# string and the runtime name into the Version.java file.
# To be printed by java -version
$(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java \
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java \
$(PROFILE_VERSION_JAVA_TARGETS): \
$(JDK_TOPDIR)/src/share/classes/sun/misc/Version.java.template
$(JDK_TOPDIR)/src/java.base/share/classes/sun/misc/Version.java.template
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(ECHO) Generating sun/misc/Version.java $(call profile_version_name, $@)
@ -44,25 +44,12 @@ $(PROFILE_VERSION_JAVA_TARGETS): \
$< > $@.tmp
$(MV) $@.tmp $@
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/misc/Version.java \
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/misc/Version.java \
$(PROFILE_VERSION_JAVA_TARGETS)
##########################################################################################
# Version file for jconsole
$(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java: \
$(JDK_TOPDIR)/src/share/classes/sun/tools/jconsole/Version.java.template
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
$(ECHO) $(LOG_INFO) Generating sun/tools/jconsole/Version.java
$(SED) -e 's/@@jconsole_version@@/$(FULL_VERSION)/g' $< > $@.tmp
$(MV) $@.tmp $@
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/tools/jconsole/Version.java
##########################################################################################
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java
GENSRC_SOR_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/ch
GENSRC_SOR_SRC_FILE := genSocketOptionRegistry.c
@ -81,17 +68,17 @@ $(eval $(call SetupNativeCompilation,BUILD_GENSRC_SOR_EXE, \
OUTPUT_DIR := $(GENSRC_SOR_BIN), \
PROGRAM := genSocketOptionRegistry))
SOR_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
SOR_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/classes/sun/nio/ch/SocketOptionRegistry-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
ifeq ($(wildcard $(SOR_PREGEN_FILE)), )
$(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java: $(BUILD_GENSRC_SOR_EXE)
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(BUILD_GENSRC_SOR_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOR_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_SOR_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
$(JDK_OUTPUTDIR)/gensrc/sun/nio/ch/SocketOptionRegistry.java: $(SOR_PREGEN_FILE)
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/ch/SocketOptionRegistry.java: $(SOR_PREGEN_FILE)
$(call install-file)
endif
@ -99,7 +86,7 @@ endif
ifneq ($(OPENJDK_TARGET_OS), windows)
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java
GENSRC_UC_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/fs
GENSRC_UC_SRC_FILE := genUnixConstants.c
@ -119,17 +106,17 @@ ifneq ($(OPENJDK_TARGET_OS), windows)
OUTPUT_DIR := $(GENSRC_UC_BIN), \
PROGRAM := genUnixConstants))
UC_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/solaris/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
UC_PREGEN_FILE := $(JDK_TOPDIR)/src/closed/java.base/$(OPENJDK_TARGET_OS)/classes/sun/nio/fs/UnixConstants-$(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU_ARCH).java.template
ifeq ($(wildcard $(UC_PREGEN_FILE)), )
$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java: $(BUILD_GENSRC_UC_EXE)
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(BUILD_GENSRC_UC_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(UC_COPYRIGHT_YEARS)" > $@.tmp
$(BUILD_GENSRC_UC_EXE) >> $@.tmp
$(MV) $@.tmp $@
else
$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/UnixConstants.java: $(UC_PREGEN_FILE)
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/UnixConstants.java: $(UC_PREGEN_FILE)
$(call install-file)
endif
@ -139,7 +126,7 @@ endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
GENSRC_MISC += $(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java
GENSRC_JAVA_BASE += $(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java
GENSRC_SOL_SRC := $(JDK_TOPDIR)/make/src/native/genconstants/fs
GENSRC_SOL_SRC_FILE := genSolarisConstants.c
@ -158,7 +145,7 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
OUTPUT_DIR := $(GENSRC_SOL_BIN), \
PROGRAM := genSolarisConstants))
$(JDK_OUTPUTDIR)/gensrc/sun/nio/fs/SolarisConstants.java: $(BUILD_GENSRC_SOL_EXE)
$(JDK_OUTPUTDIR)/gensrc/java.base/sun/nio/fs/SolarisConstants.java: $(BUILD_GENSRC_SOL_EXE)
$(MKDIR) -p $(@D)
$(RM) $@ $@.tmp
NAWK="$(NAWK)" SH="$(SH)" $(SH) -e $(JDK_TOPDIR)/make/scripts/addNotices.sh "$(SOL_COPYRIGHT_YEARS)" > $@.tmp
@ -169,49 +156,3 @@ ifeq ($(OPENJDK_TARGET_OS), solaris)
endif
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
AB_GENSRC_DIR := $(JDK_OUTPUTDIR)/gensrc_ab
AB_SRC_DIR := $(JDK_TOPDIR)/src/closed/windows/classes/com/sun/java/accessibility
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
$(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
$(AB_SRC_DIR)/32bit/AccessBridgeLoader.java
$(install-file)
$(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java: \
$(AB_SRC_DIR)/AccessBridge.java
$(install-file)
$(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java: \
$(AB_SRC_DIR)/legacy/AccessBridgeLoader.java
$(install-file)
$(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java: \
$(AB_SRC_DIR)/AccessBridge.java
$(install-file)
GENSRC_MISC += $(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridgeLoader.java \
$(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridgeLoader.java \
$(AB_GENSRC_DIR)/32bit/com/sun/java/accessibility/AccessBridge.java \
$(AB_GENSRC_DIR)/legacy/com/sun/java/accessibility/AccessBridge.java
else
$(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java: \
$(AB_SRC_DIR)/64bit/AccessBridgeLoader.java
$(install-file)
$(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java: \
$(AB_SRC_DIR)/AccessBridge.java
$(install-file)
GENSRC_MISC += $(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridgeLoader.java \
$(AB_GENSRC_DIR)/64bit/com/sun/java/accessibility/AccessBridge.java
endif
endif
endif
##########################################################################################

@ -24,9 +24,7 @@
#
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/windows/classes \
$(JDK_TOPDIR)/src/macosx/classes))
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/*/*/classes)))
# All .properties files to be compiled are appended to this variable.
ALL_COMPILED_PROPSOURCES :=
@ -40,63 +38,65 @@ define add_properties_to_compile
# $2 is the files belonging to this group
# $3 is the super class for the generated java file.
# Strip away prefix and suffix,
# leaving for example: sun/util/resources/CurrencyNames_sv
$1_PROPPATHS := $$(patsubst $(JDK_TOPDIR)/src/windows/classes/%.properties, %, \
$$(patsubst $(JDK_TOPDIR)/src/macosx/classes/%.properties, %, \
$$(patsubst $(JDK_TOPDIR)/src/share/classes/%.properties, %, $2)))
# Convert <root>/jdk/src/<module>/share/classes/sun/util/resources/CurrencyNames_sv.properties
# to <build>/jdk/gensrc/<module/sun/util/resources/CurrencyNames_sv.java
$1_PROPJAVAS := $$(patsubst $(JDK_TOPDIR)/src/%.properties, \
$(JDK_OUTPUTDIR)/gensrc/%.java, \
$$(subst /share/classes,, \
$$(subst /$(OPENJDK_TARGET_OS_API_DIR)/classes,, \
$$(subst /$(OPENJDK_TARGET_OS)/classes,, $2))))
# Accumulate all found properties files.
ALL_COMPILED_PROPSOURCES += $2
# Generate the list of to be created java files.
ALL_COMPILED_PROPJAVAS += $$(patsubst %, $(JDK_OUTPUTDIR)/gensrc/%.java, $$($1_PROPPATHS))
ALL_COMPILED_PROPJAVAS += $$($1_PROPJAVAS)
# Now generate a sequence of
# "-compile ...CurrencyNames_sv.properties ...CurrencyNames_sv.java ListResourceBundle"
# suitable to be fed into the CompileProperties command.
COMPILE_PROPCMDLINE += $$(subst _SPACE_,$(SPACE),$$(join $$(addprefix -compile_SPACE_, $2), \
$$(addsuffix _SPACE_$(strip $3), \
$$(addprefix _SPACE_$(JDK_OUTPUTDIR)/gensrc/, \
$$(addsuffix .java, $$($1_PROPPATHS))))))
$$(addprefix _SPACE_, $$($1_PROPJAVAS)))))
endef
################################################################################
# Some packages have properties that need to be converted to java source files.
COMPILE_PROP_SRC_FILES := \
$(filter %.properties, $(call CacheFind, \
$(JDK_TOPDIR)/src/share/classes/com/sun/accessibility/internal/resources \
$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/motif/resources \
$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/windows/resources \
$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/basic/resources \
$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/metal/resources \
$(JDK_TOPDIR)/src/share/classes/com/sun/swing/internal/plaf/synth/resources \
$(JDK_TOPDIR)/src/share/classes/com/sun/tools/jdi/resources \
$(JDK_TOPDIR)/src/share/classes/sun/awt/resources \
$(JDK_TOPDIR)/src/share/classes/sun/launcher/resources \
$(JDK_TOPDIR)/src/share/classes/sun/management/resources \
$(JDK_TOPDIR)/src/share/classes/sun/print/resources \
$(JDK_TOPDIR)/src/share/classes/sun/tools/jar/resources \
$(JDK_TOPDIR)/src/share/classes/sun/util/logging/resources)) \
$(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/accessibility/internal/resources \
$(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/java/swing/plaf/motif/resources \
$(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/java/swing/plaf/windows/resources \
$(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/swing/internal/plaf/basic/resources \
$(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/swing/internal/plaf/metal/resources \
$(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/swing/internal/plaf/synth/resources \
$(JDK_TOPDIR)/src/jdk.jdi/share/classes/com/sun/tools/jdi/resources \
$(JDK_TOPDIR)/src/java.desktop/share/classes/sun/awt/resources \
$(JDK_TOPDIR)/src/java.base/share/classes/sun/launcher/resources \
$(JDK_TOPDIR)/src/java.management/share/classes/sun/management/resources \
$(JDK_TOPDIR)/src/java.desktop/share/classes/sun/print/resources \
$(JDK_TOPDIR)/src/jdk.dev/share/classes/sun/tools/jar/resources \
$(JDK_TOPDIR)/src/jdk.dev/share/classes/jdk/jigsaw/tools/jlink/resources \
$(JDK_TOPDIR)/src/java.logging/share/classes/sun/util/logging/resources)) \
#
ifeq ($(OPENJDK_TARGET_OS), macosx)
COMPILE_PROP_SRC_FILES += \
$(filter %.properties, $(call CacheFind, \
$(JDK_TOPDIR)/src/macosx/classes/com/apple/laf/resources \
$(JDK_TOPDIR)/src/macosx/classes/sun/awt/resources)) \
$(JDK_TOPDIR)/src/java.desktop/macosx/classes/com/apple/laf/resources \
$(JDK_TOPDIR)/src/java.desktop/macosx/classes/sun/awt/resources)) \
#
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
COMPILE_PROP_SRC_FILES += \
$(filter %.properties, $(call CacheFind, \
$(JDK_TOPDIR)/src/windows/classes/sun/awt/windows)) \
$(JDK_TOPDIR)/src/java.desktop/windows/classes/sun/awt/windows)) \
#
else # ! windows
COMPILE_PROP_SRC_FILES += \
$(filter %.properties, $(call CacheFind, \
$(JDK_TOPDIR)/src/share/classes/com/sun/java/swing/plaf/gtk/resources)) \
$(JDK_TOPDIR)/src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/resources)) \
#
endif
@ -106,12 +106,13 @@ $(eval $(call add_properties_to_compile,LIST_RESOURCE_BUNDLE, \
# sun/util/resources
$(eval $(call add_properties_to_compile,SUN_UTIL, \
$(filter %.properties, \
$(call CacheFind, $(JDK_TOPDIR)/src/share/classes/sun/util/resources)), \
$(call CacheFind, $(JDK_TOPDIR)/src/java.base/share/classes/sun/util/resources) \
$(call CacheFind, $(JDK_TOPDIR)/src/jdk.localedata/share/classes/sun/util/resources)), \
sun.util.resources.LocaleNamesBundle))
################################################################################
# Now setup the rule for the generation of the resource bundles.
$(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties: $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS)
$(JDK_OUTPUTDIR)/gensrc/_the.compiled_properties: $(ALL_COMPILED_PROPSOURCES) $(BUILD_TOOLS_JDK)
# Generate all output directories in advance since the build tool does not do that...
$(MKDIR) -p $(sort $(dir $(ALL_COMPILED_PROPJAVAS)))
$(ECHO) Compiling $(words $(ALL_COMPILED_PROPSOURCES)) properties into resource bundles
@ -129,19 +130,27 @@ define convert_tw_to_hk
$(CAT) $< | $(SED) -e '/class/s/_zh_TW/_zh_HK/' > $@
endef
$(JDK_OUTPUTDIR)/gensrc/%_zh_HK.java: $(JDK_TOPDIR)/src/share/classes/%_zh_TW.java
# Some are copies of existing sources
$(JDK_OUTPUTDIR)/gensrc/java.desktop/%_zh_HK.java: \
$(JDK_TOPDIR)/src/java.desktop/share/classes/%_zh_TW.java
$(call convert_tw_to_hk)
$(JDK_OUTPUTDIR)/gensrc/java.base/%_zh_HK.java: \
$(JDK_TOPDIR)/src/java.base/share/classes/%_zh_TW.java
$(call convert_tw_to_hk)
# Others are copies of sources generated by this makefile
$(JDK_OUTPUTDIR)/gensrc/%_zh_HK.java: $(JDK_OUTPUTDIR)/gensrc/%_zh_TW.java
$(call convert_tw_to_hk)
ZH_HK_JAVA := sun/applet/resources/MsgAppletViewer_zh_HK.java \
sun/misc/resources/Messages_zh_HK.java \
sun/security/util/AuthResources_zh_HK.java \
sun/security/util/Resources_zh_HK.java
# The existing sources
ZH_HK_JAVA := java.desktop/sun/applet/resources/MsgAppletViewer_zh_HK.java \
java.base/sun/misc/resources/Messages_zh_HK.java \
java.base/sun/security/util/AuthResources_zh_HK.java \
java.base/sun/security/util/Resources_zh_HK.java
ZH_HK_JAVA_FILES := $(addprefix $(JDK_OUTPUTDIR)/gensrc/, $(ZH_HK_JAVA)) \
$(filter-out $(JDK_OUTPUTDIR)/gensrc/sun/util/resources/zh/%, \
$(filter-out $(JDK_OUTPUTDIR)/gensrc/jdk.localedata/sun/util/resources/zh/%, \
$(subst _zh_TW,_zh_HK,$(filter %_zh_TW.java, $(ALL_COMPILED_PROPJAVAS))))
################################################################################

@ -0,0 +1,51 @@
#
# Copyright (c) 2014, 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.
#
################################################################################
define process-provider
$(MKDIR) -p $(@D)
$(CAT) $^ | $(SED) -e "s/^#\[$(OPENJDK_TARGET_OS)\]//" > $@
endef
################################################################################
# Filter com.sun.tools.attach.spi.AttachProvider
$(JDK_OUTPUTDIR)/gensrc/jdk.attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider: \
$(JDK_TOPDIR)/src/jdk.attach/share/classes/META-INF/services/com.sun.tools.attach.spi.AttachProvider
$(process-provider)
GENSRC_JDK_ATTACH += $(JDK_OUTPUTDIR)/gensrc/jdk.attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider
################################################################################
# Filter com.sun.jdi.connect.Connector
$(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector: \
$(JDK_TOPDIR)/src/jdk.jdi/share/classes/META-INF/services/com.sun.jdi.connect.Connector
$(process-provider)
GENSRC_JDK_JDI += $(JDK_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector
################################################################################

@ -27,14 +27,14 @@
# Generate java files for javax.swing.plaf package
#
NIMBUS_PACKAGE = javax.swing.plaf
NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/javax/swing/plaf/nimbus
NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/share/classes/javax/swing/plaf/nimbus/skin.laf
NIMBUS_GENSRC_DIR = $(JDK_OUTPUTDIR)/gensrc/java.desktop/javax/swing/plaf/nimbus
NIMBUS_SKIN_FILE = $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf
$(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS)
$(JDK_OUTPUTDIR)/gensrc/_the.generated_nimbus: $(NIMBUS_SKIN_FILE) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(@D)
$(ECHO) "Generating Nimbus source files"
$(TOOL_GENERATENIMBUS) $(LOG_INFO) \
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc \
-skinFile $(NIMBUS_SKIN_FILE) -buildDir $(JDK_OUTPUTDIR)/gensrc/java.desktop \
-packagePrefix $(NIMBUS_PACKAGE).nimbus -lafName Nimbus
$(ECHO) $(LOG_INFO) "Finished generating Nimbus source files"
$(TOUCH) $@
@ -62,8 +62,8 @@ BEANS = AbstractButton Box JComponent JApplet JButton \
# javax.swing.text package
BEANS_TEXT = JTextComponent
BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/%.java) \
$(BEANS_TEXT:%=$(JDK_TOPDIR)/src/share/classes/javax/swing/text/%.java)
BEANS_SRC = $(BEANS:%=$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/%.java) \
$(BEANS_TEXT:%=$(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing/text/%.java)
# Dummy variable so far, in the old build system it was false by default
SWINGBEAN_DEBUG_FLAG = false
@ -71,33 +71,40 @@ SWINGBEAN_DEBUG_FLAG = false
# LocaleDataMetaInfo needs to be generated before running this to avoid confusing errors
# in the build log.
$(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo: $(BEANS_SRC) \
$(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java \
$(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS) \
$(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/SwingBeanInfoBase.java \
$(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/swing/BeanInfoUtils.java $(BUILD_TOOLS_JDK) \
| $(GENSRC_LOCALEDATAMETAINFO)
$(ECHO) Generating beaninfo
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing
$(JAVA) -Djava.awt.headless=true $(NEW_JAVADOC) \
-sourcepath "$(JDK_TOPDIR)/src/share/classes$(PATH_SEP)$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes$(PATH_SEP)$(JDK_OUTPUTDIR)/gensrc" \
-sourcepath "$(subst $(SPACE),$(PATH_SEP),\
$(if $(SHUFFLED),$(wildcard $(JDK_TOPDIR)/src/*/*/classes) \
$(JDK_OUTPUTDIR)/gensrc/java.base, \
$(JDK_TOPDIR)/src/share/classes \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes \
$(JDK_OUTPUTDIR)/gensrc))" \
-doclet build.tools.swingbeaninfo.GenDocletBeanInfo \
-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing \
-x $(SWINGBEAN_DEBUG_FLAG) -d $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing \
-t $(DOCLET_DATA_DIR)/SwingBeanInfo.template -docletpath $(JDK_OUTPUTDIR)/btclasses \
-XDignore.symbol.file=true \
-classpath $(JDK_OUTPUTDIR)/btclasses $(BEANS_SRC) $(LOG_INFO)
# Move the JTextComponent into its proper package directory.
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text
$(MV) $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/JTextComponentBeanInfo.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/text/JTextComponentBeanInfo.java
$(MKDIR) -p $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/text
$(MV) $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/JTextComponentBeanInfo.java $(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/text/JTextComponentBeanInfo.java
$(TOUCH) $@
# This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
# Should it be moved under $(JDK_TOPDIR)/src/share/classes/javax/swing instead?
$(JDK_OUTPUTDIR)/gensrc_no_srczip/javax/swing/SwingBeanInfoBase.java: $(DOCLET_DATA_DIR)/javax/swing/SwingBeanInfoBase.java
# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/javax/swing instead?
$(JDK_OUTPUTDIR)/gensrc_no_srczip/java.desktop/javax/swing/SwingBeanInfoBase.java: $(DOCLET_DATA_DIR)/javax/swing/SwingBeanInfoBase.java
$(call install-file)
# This file is the part of dt.jar
# For some reason it is under $(JDK_TOPDIR)/make/data/swingbeaninfo
# Should it be moved under $(JDK_TOPDIR)/src/share/classes/sun/swing instead?
$(JDK_OUTPUTDIR)/gensrc/sun/swing/BeanInfoUtils.java: $(DOCLET_DATA_DIR)/sun/swing/BeanInfoUtils.java
# Should it be moved under $(JDK_TOPDIR)/src/java.desktop/share/classes/sun/swing instead?
$(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/swing/BeanInfoUtils.java: $(DOCLET_DATA_DIR)/sun/swing/BeanInfoUtils.java
$(call install-file)
GENSRC_SWING_BEANINFO = $(JDK_OUTPUTDIR)/gensrc_no_srczip/_the.generated_beaninfo
GENSRC_JAVA_DESKTOP += $(GENSRC_SWING_BEANINFO) $(GENSRC_SWING_NIMBUS)

@ -39,7 +39,7 @@ GENSRC_X11WRAPPERS :=
# Also put verification offset file here as well.
GENSRC_X11WRAPPERS_TMP := $(JDK_OUTPUTDIR)/gensrc_x11wrappers
# Put the generated Java classes used to interface X11 from awt here.
GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/sun/awt/X11
GENSRC_X11WRAPPERS_DST := $(JDK_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
# The pre-calculated offset file are stored here:
GENSRC_SIZER_DIR := $(JDK_TOPDIR)/make/data/x11wrappergen
@ -69,7 +69,7 @@ $(GENSRC_X11WRAPPERS_TMP)/sizes.%: $(GENSRC_SIZER_DIR)/sizes.%
# Run the tool on the offset files copied from the source repository to generate several Java classes
# used in awt.
$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS)
$(JDK_OUTPUTDIR)/gensrc/_the.generated.x11: $(GENSRC_X11_SIZES_USED) $(BUILD_TOOLS_JDK)
$(MKDIR) -p $(GENSRC_X11WRAPPERS_DST)
$(TOOL_WRAPPERGENERATOR) $(GENSRC_X11WRAPPERS_DST) $(GENSRC_SIZER_DIR)/xlibtypes.txt "gen" $(GENSRC_X11WRAPPERS_TMP)/sizes
$(TOUCH) $@
@ -81,7 +81,7 @@ ifneq ($(COMPILE_TYPE), cross)
# can compare it with the version in the source code repository.
# Generate the C code for the program that will output the offset file.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS)
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.c: $(GENSRC_SIZER_DIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
$(ECHO) "Generating X11 wrapper ($*-bit version)"
$(MKDIR) -p $(@D)
$(TOOL_WRAPPERGENERATOR) $(@D) $(GENSRC_SIZER_DIR)/xlibtypes.txt "sizer" $*
@ -91,20 +91,23 @@ ifneq ($(COMPILE_TYPE), cross)
MEMORY_MODEL_FLAG="$(COMPILER_TARGET_BITS_FLAG)$*"
endif
SIZER_CFLAGS := -I$(JDK_OUTPUTDIR)/include \
-I$(JDK_TOPDIR)/src/java.base/share/native/include \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_EXPORT_DIR)/native/include \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
-I$(JDK_TOPDIR)/src/java.desktop/$(OPENJDK_TARGET_OS_API_DIR)/native/common/sun/awt \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/common/sun/awt/debug \
-I$(JDK_TOPDIR)/src/java.desktop/share/native/libawt/sun/awt/image/cvutils \
#
# Compile the C code into an executable.
$(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
$(MKDIR) -p $(@D)
(cd $(@D) && $(CC) $(MEMORY_MODEL_FLAG) -o $@ $< \
$(X_CFLAGS) \
$(X_LIBS) \
-I$(JDK_OUTPUTDIR)/include \
-I$(JDK_TOPDIR)/src/share/javavm/export \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_EXPORT_DIR)/javavm/export \
-I$(JDK_TOPDIR)/src/share/native/common \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/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)
$(SIZER_CFLAGS) -lc)
.PRECIOUS: $(GENSRC_X11WRAPPERS_TMP)/sizer.%.exe $(GENSRC_X11WRAPPERS_TMP)/sizer.%.c
@ -119,3 +122,5 @@ ifneq ($(COMPILE_TYPE), cross)
GENSRC_X11WRAPPERS += $(GENSRC_X11WRAPPERS_TMP)/sizes.$(OPENJDK_TARGET_CPU_BITS).verification
endif
GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS)

@ -0,0 +1,167 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
################################################################################
# On windows, the debuginfo files get the same name as for java.dll. Build
# into another dir and copy selectively so debuginfo for java.dll isn't
# overwritten.
$(eval $(call SetupLauncher,java, \
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JAVA_VERSION_INFO_RESOURCE), $(JDK_OUTPUTDIR)/objs/java_objs,true))
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
$(MKDIR) -p $(@D)
$(RM) $@
$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,javaw, \
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
$(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
$(JAVA_VERSION_INFO_RESOURCE),,true))
endif
$(eval $(call SetupLauncher,keytool, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }'))
################################################################################
BUILD_JEXEC :=
BUILD_JEXEC_SRC :=
BUILD_JEXEC_INC :=
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
#
# UNHANDLED:
# - COMPILE_APPROACH = normal
#
#
# jdk/make/java/Makefile
#
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
BUILD_JEXEC := 1
endif
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_JEXEC := 1
endif # OPENJDK_TARGET_OS
#
# jdk/make/java/jexec/Makefile
#
ifeq ($(BUILD_JEXEC), 1)
ifeq ($(OPENJDK_TARGET_OS), windows)
else ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher
else
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/launcher
endif
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli
endif
endif
#
# Note that the two Makefile's seems to contradict each other,
# and that src/macosx/bin/jexec.c seems unused
#
ifneq ($(BUILD_JEXEC_SRC), )
$(eval $(call SetupNativeCompilation,BUILD_JEXEC, \
SRC := $(BUILD_JEXEC_SRC), \
INCLUDE_FILES := jexec.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) \
$(BUILD_JEXEC_INC), \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jexec_obj, \
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \
DEBUG_SYMBOLS := true, \
PROGRAM := jexec))
LIBRARIES += $(BUILD_JEXEC)
endif
################################################################################
BUILD_JSPAWNHELPER :=
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o
LINK_JSPAWNHELPER_FLAGS :=
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), )
BUILD_JSPAWNHELPER := 1
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib
endif
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64)
LINK_JSPAWNHELPER_FLAGS += $(COMPILER_TARGET_BITS_FLAG)64
endif
ifeq ($(BUILD_JSPAWNHELPER), 1)
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \
SRC := $(BUILD_JSPAWNHELPER_SRC), \
INCLUDE_FILES := jspawnhelper.c, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \
LDFLAGS_SUFFIX := $(LINK_JSPAWNHELPER_OBJECTS), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/jspawnhelper, \
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \
PROGRAM := jspawnhelper))
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS)
LIBRARIES += $(BUILD_JSPAWNHELPER)
endif
################################################################################
java.base: $(LAUNCHERS) $(LIBRARIES)
all: java.base
.PHONY: all java.base

@ -0,0 +1,53 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,idlj, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
$(eval $(call SetupLauncher,orbd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
$(eval $(call SetupLauncher,servertool, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
$(eval $(call SetupLauncher,tnameserv, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
java.corba: $(LAUNCHERS)
all: java.corba
.PHONY: all java.corba

@ -0,0 +1,41 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, jdk, launcher/Launcher-java.desktop.gmk))
ifndef BUILD_HEADLESS_ONLY
$(eval $(call SetupLauncher,appletviewer, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',, \
$(XLIBS)))
endif
java.desktop: $(LAUNCHERS)
all: java.desktop
.PHONY: all java.desktop

@ -0,0 +1,69 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,rmid, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
$(eval $(call SetupLauncher,rmiregistry, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
##########################################################################################
#
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
#
JAVA_RMI_CGI := $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
ifeq ($(OPENJDK_TARGET_OS), linux)
LAUNCHERS += $(JAVA_RMI_CGI)
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
LAUNCHERS += $(JAVA_RMI_CGI)
endif
# TODO:
# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all
# this time anyway. Since jdk6, it has been built from the wrong source and resulted
# in a (almost) copy of the standard java launcher named "java-rmi.exe" ending up in
# the final 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 ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,java-rmi, , \
$(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/make/java/main/java/mapfile-$(OPENJDK_TARGET_CPU)),,,,,,,,,RMI))
else
$(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/java.rmi/unix/bin/java-rmi.cgi.sh
$(call install-file)
$(CHMOD) a+x $@
endif
##########################################################################################
java.rmi: $(LAUNCHERS)
all: java.rmi
.PHONY: all java.rmi

@ -0,0 +1,35 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,jrunscript, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
java.scripting: $(LAUNCHERS)
all: java.scripting
.PHONY: all java.scripting

@ -0,0 +1,43 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupLauncher,kinit, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
$(eval $(call SetupLauncher,klist, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
$(eval $(call SetupLauncher,ktab, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
endif
java.security.jgss: $(LAUNCHERS)
all: java.security.jgss
.PHONY: all java.security.jgss

@ -0,0 +1,58 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,javac, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
ifeq ($(ENABLE_SJAVAC), yes)
$(eval $(call SetupLauncher,sjavac, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }'))
endif
$(eval $(call SetupLauncher,javah, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,javap, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,serialver, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
jdk.compiler: $(LAUNCHERS)
all: jdk.compiler
.PHONY: all jdk.compiler

@ -0,0 +1,52 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,extcheck, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jar, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jarsigner, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jdeps, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,jhat, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
$(eval $(call SetupLauncher,native2ascii, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
jdk.dev: $(LAUNCHERS)
all: jdk.dev
.PHONY: all jdk.dev

@ -0,0 +1,37 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,jsadebugd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
jdk.hotspot.agent: $(LAUNCHERS)
all: jdk.hotspot.agent
.PHONY: all jdk.hotspot.agent

@ -0,0 +1,37 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,javadoc, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
jdk.javadoc: $(LAUNCHERS)
all: jdk.javadoc
.PHONY: all jdk.javadoc

@ -0,0 +1,65 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,jinfo, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jinfo.JInfo"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
$(eval $(call SetupLauncher,jmap, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jmap.JMap"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
$(eval $(call SetupLauncher,jps, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
$(eval $(call SetupLauncher,jstack, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
"sun.tools.jstack.JStack"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
,,,,,,,,,Info-privileged.plist))
$(eval $(call SetupLauncher,jstat, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
$(eval $(call SetupLauncher,jcmd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
jdk.jcmd: $(LAUNCHERS)
all: jdk.jcmd
.PHONY: all jdk.jcmd

@ -0,0 +1,39 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
BUILD_LAUNCHER_jconsole_CFLAGS_windows := -DJAVAW
BUILD_LAUNCHER_jconsole_LDFLAGS_windows := user32.lib
$(eval $(call SetupLauncher,jconsole, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
jdk.jconsole: $(LAUNCHERS)
all: jdk.jconsole
.PHONY: all jdk.jconsole

@ -0,0 +1,36 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,jdb, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
jdk.jdi: $(LAUNCHERS)
all: jdk.jdi
.PHONY: all jdk.jdi

@ -0,0 +1,35 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,jstatd, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
jdk.jvmstat: $(LAUNCHERS)
all: jdk.jvmstat
.PHONY: all jdk.jvmstat

@ -0,0 +1,36 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,rmic, \
-DEXPAND_CLASSPATH_WILDCARDS \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
jdk.rmic: $(LAUNCHERS)
all: jdk.rmic
.PHONY: all jdk.rmic

@ -0,0 +1,147 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
ifndef BUILD_HEADLESS_ONLY
$(eval $(call SetupLauncher,policytool, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',, \
$(XLIBS)))
endif
$(eval $(call SetupLauncher,pack200, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) }'))
################################################################################
# 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.
UNPACKEXE_SRC := $(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \
$(JDK_TOPDIR)/src/jdk.runtime/share/native/unpack200
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava
ifeq ($(USE_EXTERNAL_LIBZ), true)
UNPACKEXE_CFLAGS += -DSYSTEM_ZLIB
UNPACKEXE_ZIPOBJS := -lz
else
UNPACKEXE_CFLAGS += -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
endif
UNPACKEXE_LANG := C
ifeq ($(OPENJDK_TARGET_OS), solaris)
UNPACKEXE_LANG := C++
endif
UNPACKEXE_DEBUG_SYMBOLS := true
# On windows, unpack200 is linked completely differently to all other
# executables, using the compiler with the compiler arguments.
# It's also linked incrementally, producing a .ilk file that needs to
# be kept away.
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_UNPACKEXE_LDEXE := $(CC)
EXE_OUT_OPTION_save := $(EXE_OUT_OPTION)
EXE_OUT_OPTION := -Fe
# With the current way unpack200 is built, debug symbols aren't supported
# anyway.
UNPACKEXE_DEBUG_SYMBOLS :=
endif
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
# if feeded with a version script which contains named tags.
ifeq ($(USING_BROKEN_SUSE_LD), yes)
UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200.anonymous
else
UNPACK_MAPFILE = $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers-unpack200
endif
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE, \
SRC := $(UNPACKEXE_SRC), \
LANG := $(UNPACKEXE_LANG), \
OPTIMIZATION := LOW, \
CFLAGS := $(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE) \
-DFULL, \
CFLAGS_release := -DPRODUCT, \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC, \
CFLAGS_macosx := -fPIC, \
MAPFILE := $(UNPACK_MAPFILE),\
LDFLAGS := $(UNPACKEXE_ZIPOBJS), \
LDFLAGS_windows := $(CXXFLAGS_JDKEXE), \
LDFLAGS_posix := $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_linux := -lc, \
LDFLAGS_solaris := $(UNPACKEXE_LDFLAGS_solaris) -lc, \
LDFLAGS_SUFFIX := $(LIBCXX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR), \
PROGRAM := unpack200, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack200.exe" \
-D "JDK_INTERNAL_NAME=unpack200" \
-D "JDK_FTYPE=0x1L", \
DEBUG_SYMBOLS := $(UNPACKEXE_DEBUG_SYMBOLS), \
MANIFEST := $(JDK_TOPDIR)/src/jdk.runtime/windows/native/unpack200/unpack200_proto.exe.manifest))
ifeq ($(OPENJDK_TARGET_OS), windows)
EXE_OUT_OPTION := $(EXE_OUT_OPTION_save)
endif
ifneq ($(USE_EXTERNAL_LIBZ), true)
$(BUILD_UNPACKEXE): $(UNPACKEXE_ZIPOBJS)
endif
# Build into object dir and copy executable afterwards to avoid .ilk file in
# image. The real fix would be clean up linking of unpack200 using
# -link -incremental:no
# like all other launchers.
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE)
$(call install-file)
LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX)
################################################################################
jdk.runtime: $(LAUNCHERS)
all: jdk.runtime
.PHONY: all jdk.runtime

@ -0,0 +1,35 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,jjs, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }'))
jdk.scripting.nashorn: $(LAUNCHERS)
all: jdk.scripting.nashorn
.PHONY: all jdk.scripting.nashorn

@ -0,0 +1,38 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,schemagen, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
$(eval $(call SetupLauncher,xjc, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
jdk.xml.bind: $(LAUNCHERS)
all: jdk.xml.bind
.PHONY: all jdk.xml.bind

@ -0,0 +1,38 @@
#
# Copyright (c) 2011, 2014, 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 LauncherCommon.gmk
$(eval $(call SetupLauncher,wsgen, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
$(eval $(call SetupLauncher,wsimport, \
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
jdk.xml.ws: $(LAUNCHERS)
all: jdk.xml.ws
.PHONY: all jdk.xml.ws

@ -0,0 +1,234 @@
#
# Copyright (c) 2011, 2014, 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
include NativeCompilation.gmk
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src/java.base/share/native/launcher))
# Build tools
include Tools.gmk
# When building a legacy overlay image (on solaris 64 bit), the launchers
# need to be built with a different rpath and a different output dir.
ifeq ($(OVERLAY_IMAGES), true)
ORIGIN_ROOT := /../..
OUTPUT_SUBDIR := $(OPENJDK_TARGET_CPU_ISADIR)
else
ORIGIN_ROOT := /..
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN)
else
ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
endif
#
# Applications expect to be able to link against libjawt without invoking
# System.loadLibrary("jawt") first. This was the behaviour described in the
# devloper documentation of JAWT and what worked with OpenJDK6.
#
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris), )
ORIGIN_ARG += $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR))
endif
LAUNCHER_SRC := $(JDK_TOPDIR)/src/java.base/share/native/launcher
LAUNCHER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/launcher \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjli \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
#
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
JAVA_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/launcher/java.rc
MACOSX_PLIST_DIR := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher
# Until the shuffle is permanent, we can't add this in configure
CFLAGS_JDKEXE := $(filter-out %javavm/export, $(CFLAGS_JDKEXE))
CFLAGS_JDKEXE += -I$(JDK_TOPDIR)/src/java.base/share/native/include \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/include
CXXFLAGS_JDKEXE := $(filter-out %javavm/export, $(CXXFLAGS_JDKEXE))
CXXFLAGS_JDKEXE += -I$(JDK_TOPDIR)/src/java.base/share/native/include \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/include
JAVA_MANIFEST := $(JDK_TOPDIR)/src/java.base/windows/native/launcher/java.manifest
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 is extra CFLAGS
# Parameter 3 is extra LDFLAGS
# Parameter 4 is extra LDFLAGS_SUFFIX_posix
# Parameter 5 is extra LDFLAGS_SUFFIX_windows
# 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 if set, link statically with c runtime on windows.
# Parameter 11 if set, override plist file on macosx.
$(call LogSetupMacroEntry,SetupLauncher($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11))
$(if $(13),$(error Internal makefile error: Too many arguments to SetupLauncher, please update CompileLaunchers.gmk))
$1_WINDOWS_JLI_LIB := $(JDK_OUTPUTDIR)/objs/libjli/jli.lib
ifneq ($6, )
$1_WINDOWS_JLI_LIB := $6
endif
$1_VERSION_INFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE)
ifneq ($8, )
$1_VERSION_INFO_RESOURCE := $8
endif
$1_LDFLAGS := $3
$1_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), macosx)
$1_PLIST_FILE := Info-cmdline.plist
ifneq ($(11), )
$1_PLIST_FILE := $(11)
ifneq ($$(findstring privileged, $$($1_PLIST_FILE)), )
$1_CODESIGN := true
endif
endif
$1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices \
-sectcreate __TEXT __info_plist $(MACOSX_PLIST_DIR)/$$($1_PLIST_FILE)
$1_LDFLAGS_SUFFIX += -pthread
endif
ifeq ($(OPENJDK_TARGET_OS), aix)
$1_LDFLAGS_SUFFIX += -L$(JDK_OUTPUTDIR)/objs -ljli_static
endif
ifeq ($(USE_EXTERNAL_LIBZ), true)
$1_LDFLAGS_SUFFIX += -lz
endif
$1_OUTPUT_DIR_ARG := $9
ifeq (, $$($1_OUTPUT_DIR_ARG))
$1_OUTPUT_DIR_ARG := $(JDK_OUTPUTDIR)/bin
endif
# TODO: maybe it's better to move this if-statement out of this function
ifeq ($1, java)
$1_OPTIMIZATION_ARG := HIGH
$1_LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
else
$1_OPTIMIZATION_ARG := LOW
endif
$1_CFLAGS := $(CFLAGS_JDKEXE)
ifeq ($(10), true)
$1_CFLAGS := $(filter-out -MD, $(CFLAGS_JDKEXE))
endif
# The linker on older SuSE distros (e.g. on SLES 10) complains with:
# "Invalid version tag `SUNWprivate_1.1'. Only anonymous version tag is allowed in executable."
# if feeded with a version script which contains named tags.
ifeq ($(USING_BROKEN_SUSE_LD),yes)
ifneq ($(wildcard $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous), )
$1_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU).anonymous
else
$1_MAPFILE :=
endif
else
ifneq ($(wildcard $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)), )
$1_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)
else
$1_MAPFILE :=
endif
endif
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1, \
SRC := $(LAUNCHER_SRC), \
INCLUDE_FILES := main.c, \
LANG := C, \
OPTIMIZATION := $$($1_OPTIMIZATION_ARG), \
CFLAGS := $$($1_CFLAGS) \
$(LAUNCHER_CFLAGS) \
-DFULL_VERSION='"$(FULL_VERSION)"' \
-DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
-DPROGNAME='"$1"' $(DPACKAGEPATH) \
$2, \
CFLAGS_linux := -fPIC, \
CFLAGS_solaris := -KPIC -DHAVE_GETHRTIME, \
LDFLAGS := $(LDFLAGS_JDKEXE) \
$(ORIGIN_ARG) \
$$($1_LDFLAGS), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_NAME,$1), \
LDFLAGS_linux := -lpthread \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
MAPFILE := $$($1_MAPFILE), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_posix := $4, \
LDFLAGS_SUFFIX_windows := $$($1_WINDOWS_JLI_LIB) \
$(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5, \
LDFLAGS_SUFFIX_linux := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_solaris := -L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR), \
OUTPUT_DIR := $$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR), \
PROGRAM := $1, \
DEBUG_SYMBOLS := true, \
VERSIONINFO_RESOURCE := $$($1_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \
-D "JDK_INTERNAL_NAME=$1" \
-D "JDK_FTYPE=0x1L" \
$7, \
MANIFEST := $(JAVA_MANIFEST), \
CODESIGN := $$($1_CODESIGN))
LAUNCHERS += $$(BUILD_LAUNCHER_$1)
ifneq (,$(filter $(OPENJDK_TARGET_OS), macosx aix))
$$(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 := $(X_LIBS) -lX11
ifeq ($(OPENJDK_TARGET_OS), macosx)
DPACKAGEPATH := -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
XLIBS :=
endif
JAVA_RC_FLAGS += -i $(JDK_TOPDIR)/src/java.base/windows/native/common
ifdef OPENJDK
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons"
else
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/java.base/windows/native/launcher/icons"
endif

File diff suppressed because it is too large Load Diff

@ -33,15 +33,17 @@ ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBFDLIBM_OPTIMIZATION := NONE
endif
LIBFDLIBM_SRC := $(JDK_TOPDIR)/src/java.base/share/native/libfdlibm
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC)
ifneq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \
STATIC_LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs, \
SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
SRC := $(LIBFDLIBM_SRC), \
LANG := C, \
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
CFLAGS_windows_debug := -DLOGGING, \
CFLAGS_aix := -qfloat=nomaf, \
ARFLAGS := $(ARFLAGS), \
@ -55,10 +57,9 @@ else
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \
LIBRARY := fdlibm, \
OUTPUT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
SRC := $(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/src, \
SRC := $(LIBFDLIBM_SRC), \
LANG := C, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \
LDFLAGS := -nostdlib -r -arch x86_64, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libfdlibm, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
@ -69,8 +70,6 @@ else
endif
BUILD_LIBRARIES += $(BUILD_LIBFDLIBM)
##########################################################################################
BUILD_LIBVERIFY_SRC := check_code.c check_format.c
@ -91,8 +90,7 @@ endif
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
LIBRARY := verify, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/common, \
INCLUDE_FILES := $(BUILD_LIBVERIFY_SRC), \
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \
LANG := C, \
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB), \
@ -101,7 +99,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := -ljvm -lc, \
LDFLAGS_SUFFIX_windows := jvm.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=verify.dll" \
-D "JDK_INTERNAL_NAME=verify" \
@ -110,39 +108,19 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libverify, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
BASE_LIBRARIES += $(BUILD_LIBVERIFY)
##########################################################################################
LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang/reflect \
$(JDK_TOPDIR)/src/share/native/java/io \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
$(JDK_TOPDIR)/src/share/native/java/nio \
$(JDK_TOPDIR)/src/share/native/java/security \
$(JDK_TOPDIR)/src/share/native/common \
$(JDK_TOPDIR)/src/share/native/sun/misc \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/misc \
$(JDK_TOPDIR)/src/share/native/sun/reflect \
$(JDK_TOPDIR)/src/share/native/java/util \
$(JDK_TOPDIR)/src/share/native/java/util/concurrent/atomic \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/common \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util
LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java)
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/util/locale/provider
else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/native/sun/util/locale/provider
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_EXCLUDE_FILES += $(JDK_TOPDIR)/src/java.base/unix/native/libjava/HostLocaleProviderAdapter_md.c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/provider \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/io
endif
LIBJAVA_CFLAGS := $(foreach dir, $(LIBJAVA_SRC_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/share/native/java/lang/fdlibm/include \
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"'
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
@ -154,8 +132,6 @@ ifneq (, $(JDK_UPDATE_VERSION))
LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"'
endif
LIBJAVA_EXCLUDE_FILES := check_code.c check_format.c jspawnhelper.c
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBJAVA_EXCLUDE_FILES += java_props_macosx.c
else
@ -163,21 +139,6 @@ else
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAVA_EXCLUDE_FILES += \
UNIXProcess_md.c \
UnixFileSystem_md.c \
FileSystemPreferences.c
else
LIBJAVA_EXCLUDE_FILES += \
ProcessImpl_md.c \
WinNTFileSystem_md.c \
dirent_md.c \
WindowsPreferences.c \
sun/security/provider/WinCAPISeedGenerator.c \
sun/io/Win32ErrorMode.c
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifneq ($(OPENJDK_TARGET_CPU), x86_64)
LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU)
@ -209,7 +170,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \
advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java.dll" \
-D "JDK_INTERNAL_NAME=java" \
@ -218,9 +179,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJAVA)
$(BUILD_LIBJAVA): $(LIBJLI_BINARY)
BASE_LIBRARIES += $(BUILD_LIBJAVA)
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY)
@ -230,10 +189,7 @@ $(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM)
BUILD_LIBZIP_EXCLUDES :=
ifeq ($(USE_EXTERNAL_LIBZ), true)
LIBZ := -lz
LIBZIP_EXCLUDES += zlib-1.2.8
else
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
endif
BUILD_LIBZIP_REORDER :=
@ -252,12 +208,13 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
LANG := C, \
OPTIMIZATION := LOW, \
SRC := $(JDK_TOPDIR)/src/share/native/java/util/zip, \
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \
EXCLUDES := $(LIBZIP_EXCLUDES), \
CFLAGS := $(CFLAGS_JDKLIB) \
$(ZLIB_CPPFLAGS) \
-I$(JDK_TOPDIR)/src/share/native/java/io \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io, \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjava \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base, \
CFLAGS_posix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \
REORDER := $(BUILD_LIBZIP_REORDER), \
@ -271,7 +228,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \
LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\
LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=zip.dll" \
-D "JDK_INTERNAL_NAME=zip" \
@ -282,77 +239,14 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
$(BUILD_LIBZIP): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBZIP)
BASE_LIBRARIES += $(BUILD_LIBZIP)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/macosx/native/java/util/prefs
else
LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/util/prefs
endif
BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/native/libjli \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli
$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
LIBRARY := prefs, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBPREF_SRC_DIRS), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lc, \
LDFLAGS_SUFFIX_aix := -ljvm -ljava, \
LDFLAGS_SUFFIX_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation -framework Foundation, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=prefs.dll" \
-D "JDK_INTERNAL_NAME=prefs" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libprefs, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBPREFS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBPREFS)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LIBRARY := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack, \
EXCLUDE_FILES := main.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL, \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack.dll" \
-D "JDK_INTERNAL_NAME=unpack" \
-D "JDK_FTYPE=0x2L", \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBUNPACK)
##########################################################################################
BUILD_LIBJLI_SRC_DIRS := $(JDK_TOPDIR)/src/share/bin $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) $(foreach dir, $(BUILD_LIBJLI_SRC_DIRS), -I$(dir))
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB)
BUILD_LIBJLI_FILES := \
java.c \
@ -373,8 +267,7 @@ else
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJLI_CFLAGS += -I$(JDK_TOPDIR)/src/macosx/bin
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/macosx/bin
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/java.base/macosx/native/libjli
BUILD_LIBJLI_FILES += java_md_common.c java_md_macosx.c
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c
@ -395,13 +288,15 @@ else ifneq ($(OPENJDK_TARGET_OS), macosx)
# if the architecture specific ergo file exists then
# use it, else use the generic definitions from ergo.c
ifneq ($(wildcard $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin/$(ERGO_ARCH_FILE)), )
ifneq ($(wildcard $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libjli/$(ERGO_ARCH_FILE)), )
BUILD_LIBJLI_FILES += $(ERGO_ARCH_FILE)
else # !ERGO_ARCH_FILE
LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO
endif # ERGO_ARCH_FILE
endif #WINDOWS
LIBJLI_CFLAGS += $(foreach dir, $(BUILD_LIBJLI_SRC_DIRS), -I$(dir))
# Append defines depending on target platform
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS)
@ -410,7 +305,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
endif
ifneq ($(USE_EXTERNAL_LIBZ), true)
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.8
BUILD_LIBJLI_SRC_DIRS += $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS)
BUILD_LIBJLI_FILES += \
inflate.c \
@ -460,7 +355,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
advapi32.lib \
comctl32.lib \
user32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jli.dll" \
-D "JDK_INTERNAL_NAME=jli" \
@ -468,7 +363,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjli, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJLI)
BASE_LIBRARIES += $(BUILD_LIBJLI)
# On windows, the static library has the same suffix as the import library created by
# with the shared library, so the static library is given a different name. No harm
@ -487,6 +382,7 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
BASE_STATIC_LIBRARIES += $(BUILD_LIBJLI_STATIC)
else ifeq ($(OPENJDK_TARGET_OS), macosx)
#
@ -509,6 +405,7 @@ else ifeq ($(OPENJDK_TARGET_OS), macosx)
$(call install-file)
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
BASE_STATIC_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
else ifeq ($(OPENJDK_TARGET_OS), aix)
# AIX also requires a static libjli because the compiler doesn't support '-rpath'
@ -523,6 +420,8 @@ else ifeq ($(OPENJDK_TARGET_OS), aix)
ARFLAGS:=$(ARFLAGS),\
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/libjli_static))
BUILD_LIBRARIES += $(JDK_OUTPUTDIR)/objs/libjli_static.a
BUILD_LIBRARIES += $(BUILD_LIBJLI_STATIC)
BASE_STATIC_LIBRARIES += $(BUILD_LIBJLI_STATIC)
endif

@ -0,0 +1,36 @@
#
# Copyright (c) 2011, 2013, 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 LibCommon.gmk
include CoreLibraries.gmk
include NetworkingLibraries.gmk
include NioLibraries.gmk
java.base: $(BASE_LIBRARIES) $(BASE_STATIC_LIBRARIES) $(NPT_LIBRARIES)
all: java.base
.PHONY: all java.base

@ -0,0 +1,36 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
include PlatformLibraries.gmk
include Awt2dLibraries.gmk
include SoundLibraries.gmk
java.desktop: $(DESKTOP_LIBRARIES)
all: java.desktop
.PHONY: all java.desktop

@ -0,0 +1,101 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/java.instrument/share/native/libinstrument \
$(JDK_TOPDIR)/src/java.instrument/$(OPENJDK_TARGET_OS_API_DIR)/native/libinstrument \
#
LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(LIBINSTRUMENT_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.instrument \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjli \
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
#
LIBINSTRUMENT_LDFLAGS :=
LIBINSTRUMENT_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
-export:Agent_OnAttach advapi32.lib
# Statically link the C runtime so that there are not dependencies on modules
# not on the search patch when invoked from the Windows system directory
# (or elsewhere).
LIBINSTRUMENT_CFLAGS := $(filter-out -MD, $(LIBINSTRUMENT_CFLAGS))
# equivalent of strcasecmp is stricmp on Windows
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
else
LIBINSTRUMENT_LDFLAGS_SUFFIX := -ljava
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
LIBRARY := instrument, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBINSTRUMENT_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBINSTRUMENT_CFLAGS) $(CFLAGS_WARNINGS_ARE_ERRORS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(LIBINSTRUMENT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(JDK_OUTPUTDIR)/objs -ljli_static $(LIBDL),\
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=instrument.dll" \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument, \
DEBUG_SYMBOLS := true))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
$(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
else
$(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
endif
$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
INSTRUMENT_LIBRARIES += $(BUILD_LIBINSTRUMENT)
################################################################################
java.instrument: $(INSTRUMENT_LIBRARIES)
all: java.instrument
.PHONY: all java.instrument

@ -0,0 +1,92 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/java.management/share/native/libmanagement \
$(JDK_TOPDIR)/src/java.management/$(OPENJDK_TARGET_OS_API_DIR)/native/libmanagement
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/java.management/share/native/include \
$(addprefix -I,$(BUILD_LIBMANAGEMENT_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.management \
$(LIBJAVA_HEADER_FLAGS) \
#
BUILD_LIBMANAGEMENT_EXCLUDES :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
endif
LIBMANAGEMENT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBRARY := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMANAGEMENT_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
LANG := C, \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -lkstat, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
LDFLAGS_SUFFIX_aix := -lperfstat,\
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management.dll" \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
MANAGEMENT_LIBRARIES += $(BUILD_LIBMANAGEMENT)
################################################################################
java.management: $(MANAGEMENT_LIBRARIES)
all: java.management
.PHONY: all java.management

@ -0,0 +1,70 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/java.prefs/macosx/native/libprefs
else
LIBPREF_SRC_DIRS := $(JDK_TOPDIR)/src/java.prefs/$(OPENJDK_TARGET_OS_API_DIR)/native/libprefs
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBPREFS, \
LIBRARY := prefs, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBPREF_SRC_DIRS), \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBPREF_SRC_DIRS)) \
$(LIBJAVA_HEADER_FLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libprefs/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava, \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava -lc, \
LDFLAGS_SUFFIX_aix := -ljvm -ljava, \
LDFLAGS_SUFFIX_windows := advapi32.lib jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_macosx := -ljvm -framework CoreFoundation -framework Foundation, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=prefs.dll" \
-D "JDK_INTERNAL_NAME=prefs" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libprefs, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBPREFS): $(BUILD_LIBJAVA)
PREFS_LIBRARIES += $(BUILD_LIBPREFS)
################################################################################
java.prefs: $(PREFS_LIBRARIES)
all: java.prefs
.PHONY: all java.prefs

@ -0,0 +1,106 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
ifneq ($(OPENJDK_TARGET_OS), windows)
LIBJ2GSS_SRC := $(JDK_TOPDIR)/src/java.security.jgss/share/native/libj2gss \
$(JDK_TOPDIR)/src/java.security.jgss/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2gss \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
LIBRARY := j2gss, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2GSS_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2GSS_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.security.jgss, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_KERBEROS_LIBRARIES += $(BUILD_LIBJ2GSS)
endif
################################################################################
ifneq ($(BUILD_CRYPTO), no)
BUILD_LIBKRB5_NAME :=
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBKRB5_NAME := w2k_lsa_auth
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/java.security.jgss/$(OPENJDK_TARGET_OS_API_DIR)/native/libw2k_lsa_auth
BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
else ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBKRB5_NAME := osxkrb5
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/java.security.jgss/macosx/native/libosxkrb5
BUILD_LIBKRB5_LIBS := \
-framework JavaNativeFoundation \
-framework Cocoa \
-framework SystemConfiguration \
-framework Kerberos
endif
ifneq ($(BUILD_LIBKRB5_NAME), )
$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
LIBRARY := $(BUILD_LIBKRB5_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBKRB5_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(addprefix -I, $(BUILD_LIBKRB5_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.security.jgss, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_KERBEROS_LIBRARIES += $(BUILD_LIBKRB5)
endif
endif
################################################################################
java.security.jgss: $(SECURITY_KERBEROS_LIBRARIES)
all: java.security.jgss
.PHONY: all java.security.jgss

@ -0,0 +1,66 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
LIBJ2PCSC_SRC := $(JDK_TOPDIR)/src/java.smartcardio/share/native/libj2pcsc \
$(JDK_TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2pcsc
LIBJ2PCSC_CPPFLAGS := $(addprefix -I,$(LIBJ2PCSC_SRC)) \
-I$(JDK_TOPDIR)/src/java.smartcardio/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2pcsc/MUSCLE \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.smartcardio
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LIBRARY := j2pcsc, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2PCSC_SRC), \
LANG := C, \
CFLAGS_posix := -D__sun_jdk, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJ2PCSC_CPPFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pcsc/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_windows := winscard.lib, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pcsc.dll" \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_SMARTCARDIO_LIBRARIES += $(BUILD_LIBJ2PCSC)
################################################################################
java.smartcardio: $(SECURITY_SMARTCARDIO_LIBRARIES)
all: java.smartcardio
.PHONY: all java.smartcardio

@ -0,0 +1,88 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
ifeq ($(OPENJDK_TARGET_OS), aix)
LIBATTACH_OS_API_DIR := aix
else
LIBATTACH_OS_API_DIR := $(OPENJDK_TARGET_OS_API_DIR)
endif
LIBATTACH_SRC := $(JDK_TOPDIR)/src/jdk.attach/$(LIBATTACH_OS_API_DIR)/native/libattach
LIBATTACH_EXCLUDE_FILES :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBATTACH_EXCLUDE_FILES += SolarisVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS),aix)
LIBATTACH_EXCLUDE_FILES += AixVirtualMachine.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LIBRARY := attach, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBATTACH_SRC), \
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.attach \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_windows := /Gy, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=attach.dll" \
-D "JDK_INTERNAL_NAME=attach" \
-D "JDK_FTYPE=0x2L", \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -ldoor, \
LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBATTACH): $(BUILD_LIBJAVA)
ATTACH_LIBRARIES += $(BUILD_LIBATTACH)
################################################################################
jdk.attach: $(ATTACH_LIBRARIES)
all: jdk.attach
.PHONY: all jdk.attach

@ -0,0 +1,80 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
ifeq ($(ENABLE_INTREE_EC), yes)
LIBSUNEC_SRC := $(JDK_TOPDIR)/src/jdk.crypto.ec/share/native/libsunec
BUILD_LIBSUNEC_FLAGS := $(addprefix -I, $(SUNEC_SRC))
#
# On sol-sparc...all libraries are compiled with -xregs=no%appl
# (set in CFLAGS_REQUIRED_sparc)
#
# except!!! libsunec.so
#
ECC_JNI_SOLSPARC_FILTER :=
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
LIBRARY := sunec, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSUNEC_SRC), \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBCXX), \
LDFLAGS_SUFFIX_linux := -lc, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunec.dll" \
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_SUNEC_LIBRARIES += $(BUILD_LIBSUNEC)
endif
################################################################################
jdk.crypto.ec: $(SECURITY_SUNEC_LIBRARIES)
all: jdk.crypto.ec
.PHONY: all jdk.crypto.ec

@ -0,0 +1,62 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBSUNMSCAPI_SRC := $(JDK_TOPDIR)/src/jdk.crypto.mscapi/$(OPENJDK_TARGET_OS_API_DIR)/native/libsunmscapi
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
LIBRARY := sunmscapi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBSUNMSCAPI_SRC), \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(LIBSUNMSCAPI_SRC), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunmscapi.dll" \
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_MSCAPI_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
endif
################################################################################
jdk.crypto.mscapi: $(SECURITY_MSCAPI_LIBRARIES)
all: jdk.crypto.mscapi
.PHONY: all jdk.crypto.mscapi

@ -0,0 +1,63 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
LIBJ2PKCS11_SRC := $(JDK_TOPDIR)/src/jdk.crypto.pkcs11/share/native/libj2pkcs11 \
$(JDK_TOPDIR)/src/jdk.crypto.pkcs11/$(OPENJDK_TARGET_OS_API_DIR)/native/libj2pkcs11
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
LIBRARY := j2pkcs11, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJ2PKCS11_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(addprefix -I, $(LIBJ2PKCS11_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.crypto.pkcs11, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pkcs11.dll" \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SECURITY_PKCS11_LIBRARIES += $(BUILD_LIBJ2PKCS11)
################################################################################
jdk.crypto.pkcs11: $(SECURITY_PKCS11_LIBRARIES)
all: jdk.crypto.pkcs11
.PHONY: all jdk.crypto.pkcs11

@ -0,0 +1,102 @@
#
# Copyright (c) 2011, 2013, 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 LibCommon.gmk
ifeq ($(OPENJDK_TARGET_OS), macosx)
################################################################################
LIBAPPLESCRIPTENGINE_SRC := $(JDK_TOPDIR)/src/jdk.deploy.osx/macosx/native/libapplescriptengine
$(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE, \
LIBRARY := AppleScriptEngine, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBAPPLESCRIPTENGINE_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(LIBAPPLESCRIPTENGINE_SRC) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.deploy.osx, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -framework Cocoa \
-framework Carbon \
-framework JavaNativeFoundation \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA)
DEPLOY_OSX_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
################################################################################
LIBOSX_DIRS := $(JDK_TOPDIR)/src/jdk.deploy.osx/macosx/native/libosx
LIBOSX_CFLAGS := -I$(LIBOSX_DIRS) \
-I$(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.desktop \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.deploy.osx \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
LIBRARY := osx, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBOSX_DIRS), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(LIBOSX_CFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-losxapp \
-framework Cocoa \
-framework ApplicationServices \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework Security \
-framework SystemConfiguration \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
DEPLOY_OSX_LIBRARIES += $(BUILD_LIBOSX)
$(BUILD_LIBOSX): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
$(BUILD_LIBOSX): $(BUILD_LIBJAVA)
################################################################################
endif
jdk.deploy.osx: $(DEPLOY_OSX_LIBRARIES)
all: jdk.deploy.osx
.PHONY: all jdk.deploy.osx

@ -0,0 +1,102 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/demo/share/jvmti/hprof \
$(JDK_TOPDIR)/src/demo/$(OPENJDK_TARGET_OS_API_DIR)/jvmti/hprof
BUILD_LIBHPROF_CFLAGS := $(addprefix -I, $(BUILD_LIBHPROF_SRC)) \
-I$(JDK_TOPDIR)/src/demo/share/jvmti/java_crw_demo
BUILD_LIBHPROF_LDFLAGS :=
LIBHPROF_OPTIMIZATION := HIGHEST
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBHPROF_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
LIBRARY := hprof, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBHPROF_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := wsock32.lib winmm.lib advapi32.lib, \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl $(LIBDL) -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=hprof.dll" \
-D "JDK_INTERNAL_NAME=hprof" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \
DEBUG_SYMBOLS := true))
HPROF_LIBRARIES += $(BUILD_LIBHPROF)
################################################################################
LIBJAVA_CRW_DEMO_SRC := $(JDK_TOPDIR)/src/demo/share/jvmti/java_crw_demo
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
LIBRARY := java_crw_demo, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJAVA_CRW_DEMO_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
$(addprefix -I, $(LIBJAVA_CRW_DEMO_SRC)), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java_crw_demo.dll" \
-D "JDK_INTERNAL_NAME=java_crw_demo" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \
DEBUG_SYMBOLS := true))
CRW_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
################################################################################
jdk.hprof.agent: $(HPROF_LIBRARIES) $(CRW_LIBRARIES)
all: jdk.hprof.agent
.PHONY: all jdk.hprof.agent

@ -0,0 +1,71 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBDT_SHMEM_SRC := $(JDK_TOPDIR)/src/jdk.jdi/share/native/libdt_shmem \
$(JDK_TOPDIR)/src/jdk.jdi/$(OPENJDK_TARGET_OS_API_DIR)/native/libdt_shmem \
#
LIBDT_SHMEM_CPPFLAGS := -I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
$(addprefix -I, $(LIBDT_SHMEM_SRC)) \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libjdwp/export \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.jdi \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
LIBRARY := dt_shmem, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBDT_SHMEM_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
$(LIBDT_SHMEM_CPPFLAGS), \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_shmem.dll" \
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
JDI_TRANSPORT_LIBRARIES += $(BUILD_LIBDT_SHMEM)
endif # OPENJDK_TARGET_OS
################################################################################
jdk.jdi: $(JDI_TRANSPORT_LIBRARIES)
all: jdk.jdi
.PHONY: all jdk.jdi

@ -0,0 +1,110 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
LIBDT_SOCKET_SRC := $(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libdt_socket \
$(JDK_TOPDIR)/src/jdk.jdwp.agent/$(OPENJDK_TARGET_OS_API_DIR)/native/libdt_socket
LIBDT_SOCKET_CPPFLAGS := \
$(addprefix -I, $(LIBDT_SOCKET_SRC)) \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libjdwp/export \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libjdwp \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include \
#
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
LIBRARY := dt_socket, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBDT_SOCKET_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
$(LIBDT_SOCKET_CPPFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread, \
LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_socket.dll" \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA)
# Include socket transport with JDWP agent to allow for remote debugging
JDWP_LIBRARIES += $(BUILD_LIBDT_SOCKET)
################################################################################
LIBJDWP_SRC := $(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libjdwp \
$(JDK_TOPDIR)/src/jdk.jdwp.agent/$(OPENJDK_TARGET_OS_API_DIR)/native/libjdwp
LIBJDWP_CPPFLAGS := \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/libjdwp/export \
-I$(JDK_TOPDIR)/src/jdk.jdwp.agent/share/native/include \
$(addprefix -I, $(LIBJDWP_SRC))
# JDWP_LOGGING causes log messages to be compiled into the library.
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
LIBRARY := jdwp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJDWP_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
$(LIBJDWP_CPPFLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jdwp.dll" \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJDWP): $(BUILD_LIBJAVA)
JDWP_LIBRARIES += $(BUILD_LIBJDWP)
################################################################################
jdk.jdwp.agent: $(JDWP_LIBRARIES)
all: jdk.jdwp.agent
.PHONY: all jdk.jdwp.agent

@ -0,0 +1,101 @@
#
# Copyright (c) 2011, 2013, 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 LibCommon.gmk
################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBUNPACK, \
LIBRARY := unpack, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/jdk.runtime/share/native/libunpack \
$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CXXFLAGS_JDKLIB) \
-DNO_ZLIB -DUNPACK_JNI -DFULL \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
-I$(JDK_TOPDIR)/src/jdk.runtime/share/native/common-unpack \
$(LIBJAVA_HEADER_FLAGS), \
CFLAGS_release := -DPRODUCT, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libunpack/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := -map:$(JDK_OUTPUTDIR)/objs/unpack.map -debug \
jvm.lib $(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_posix := -ljvm $(LIBCXX) -ljava -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libunpack, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=unpack.dll" \
-D "JDK_INTERNAL_NAME=unpack" \
-D "JDK_FTYPE=0x2L", \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBUNPACK): $(BUILD_LIBJAVA)
UNPACK_LIBRARIES += $(BUILD_LIBUNPACK)
################################################################################
LIBJSDT_SRC := $(JDK_TOPDIR)/src/jdk.runtime/share/native/libjsdt \
$(JDK_TOPDIR)/src/jdk.runtime/$(OPENJDK_TARGET_OS_API_DIR)/native/libjsdt
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
LIBRARY := jsdt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBJSDT_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
$(addprefix -I, $(LIBJSDT_SRC)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.runtime, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsdt.dll" \
-D "JDK_INTERNAL_NAME=jsdt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
JSDT_LIBRARIES += $(BUILD_LIBJSDT)
################################################################################
jdk.runtime: $(JSDT_LIBRARIES) $(UNPACK_LIBRARIES)
all: jdk.runtime
.PHONY: all jdk.runtime

@ -0,0 +1,76 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
ifeq ($(OPENJDK_TARGET_OS_API), posix)
ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
# Suppress unused parameters required by exported JNI functions.
SCTP_WERROR := -Werror -Wno-error=unused-parameter
ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
SCTP_WERROR :=
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
LIBRARY := sctp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/jdk.sctp/$(OPENJDK_TARGET_OS_API_DIR)/native/libsctp, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnio/ch \
-I $(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \
$(addprefix -I, $(call FindSrcDirsForLib, java.base, net)) \
$(LIBJAVA_HEADER_FLAGS) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.sctp \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base, \
CFLAGS_linux := $(SCTP_WERROR), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
LDFLAGS_SUFFIX_posix := -lnio -lnet, \
LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
SCTP_LIBRARIES += $(BUILD_LIBSCTP)
$(BUILD_LIBSCTP): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)nio$(SHARED_LIBRARY_SUFFIX)
endif
endif
################################################################################
jdk.sctp: $(SCTP_LIBRARIES)
all: jdk.sctp
.PHONY: all jdk.sctp

@ -0,0 +1,75 @@
#
# Copyright (c) 2011, 2014, 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 LibCommon.gmk
################################################################################
LIBJAAS_MAPFILE :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBJAAS_EXCLUDE_FILES := Solaris.c
else
# only on solaris...wonder why
LIBJAAS_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjaas/mapfile-vers
endif
LIBJAAS_NAME := jaas_unix
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAAS_NAME := jaas_nt
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
LIBRARY := $(LIBJAAS_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/jdk.security.auth/$(OPENJDK_TARGET_OS_API_DIR)/native/libjaas, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) -I$(JDK_OUTPUTDIR)/gensrc_headers/jdk.security.auth, \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := -lc, \
EXCLUDE_FILES := $(LIBJAAS_EXCLUDE_FILES), \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
SECURITY_JAAS_LIBRARIES += $(BUILD_LIBJAAS)
################################################################################
jdk.security.auth: $(SECURITY_JAAS_LIBRARIES)
all: jdk.security.auth
.PHONY: all jdk.security.auth

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2014, 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
@ -29,21 +29,13 @@ include $(SPEC)
include MakeBase.gmk
include NativeCompilation.gmk
# Setup the java compilers for the JDK build.
include Setup.gmk
# Copy files (can now depend on $(COPY_FILES))
include CopyFiles.gmk
# Prepare the find cache.
$(eval $(call FillCacheFind, $(JDK_TOPDIR)/src))
$(eval $(call FillCacheFind, $(wildcard $(JDK_TOPDIR)/src/*/*/native)))
# Build tools
include Tools.gmk
# Include the javah generated headers.
CFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
CXXFLAGS_JDKLIB += -I$(JDK_OUTPUTDIR)/gensrc_headers
GLOBAL_VERSION_INFO_RESOURCE := $(JDK_TOPDIR)/src/java.base/windows/native/common/version.rc
# Put the libraries here. Different locations for different target apis.
ifeq ($(OPENJDK_TARGET_OS_API), posix)
@ -52,8 +44,6 @@ else
INSTALL_LIBRARIES_HERE := $(JDK_OUTPUTDIR)/bin
endif
BUILD_LIBRARIES =
# Absolute paths to lib files on windows for use in LDFLAGS. Should figure out a more
# elegant solution to this.
WIN_JAVA_LIB := $(JDK_OUTPUTDIR)/objs/libjava/java.lib
@ -69,26 +59,30 @@ ifdef OPENJDK
DEBUG_ALL_BINARIES := true
endif
##########################################################################################
################################################################################
include lib/CoreLibraries.gmk
# Find the default set of src dirs for a native library.
# Param 1 - module name
# Param 2 - library name
FindSrcDirsForLib = $(call uniq, $(wildcard \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/$(OPENJDK_TARGET_OS_API_DIR)/native/lib$(strip $2) \
$(JDK_TOPDIR)/src/$(strip $1)/share/native/lib$(strip $2)))
include lib/PlatformLibraries.gmk
################################################################################
include lib/NetworkingLibraries.gmk
# A lot of libraries are dependent on libjava. Define the name of that
# library here to make dependency declarations to it possible in other files.
BUILD_LIBJAVA := $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)java$(SHARED_LIBRARY_SUFFIX)
include lib/NioLibraries.gmk
# Also define the header include flags needed to compile against it.
LIBJAVA_HEADER_FLAGS := $(addprefix -I, $(call FindSrcDirsForLib, java.base, java))
include lib/SecurityLibraries.gmk
################################################################################
include lib/ServiceabilityLibraries.gmk
include lib/Awt2dLibraries.gmk
include lib/SoundLibraries.gmk
##########################################################################################
all: $(COPY_FILES) $(BUILD_LIBRARIES)
.PHONY: all
# Define it here since there are multiple uses.
ifeq ($(USE_EXTERNAL_LIBZ), true)
LIBZ := -lz
else
ZLIB_CPPFLAGS := -I$(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8
endif

@ -23,19 +23,12 @@
# questions.
#
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/share/native/java/net \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/ \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/dns \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/spi
LIBNET_SRC_DIRS := $(JDK_TOPDIR)/src/java.base/share/native/libnet \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnet
LIBNET_CFLAGS += -I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
$(LIBJAVA_HEADER_FLAGS)
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/www/protocol/http/ntlm
else
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/net/sdp
endif
LIBNET_CFLAGS := $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
LIBNET_CFLAGS += $(foreach dir, $(LIBNET_SRC_DIRS), -I$(dir))
LIBNET_EXCLUDE_FILES :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
@ -54,14 +47,6 @@ ifeq ($(OPENJDK_TARGET_OS), aix)
LIBNET_SRC_DIRS += $(JDK_TOPDIR)/src/aix/native/java/net/
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBNET_EXCLUDE_FILES += PlainSocketImpl.c PlainDatagramSocketImpl.c SdpSupport.c
else
LIBNET_EXCLUDE_FILES += TwoStacksPlainSocketImpl.c DualStackPlainSocketImpl.c \
TwoStacksPlainDatagramSocketImpl.c DualStackPlainDatagramSocketImpl.c \
NTLMAuthSequence.c NetworkInterface_winXP.c
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
LIBRARY := net, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
@ -81,7 +66,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
LDFLAGS_SUFFIX_windows := ws2_32.lib jvm.lib secur32.lib iphlpapi.lib \
delayimp.lib $(WIN_JAVA_LIB) advapi32.lib \
-DELAYLOAD:secur32.dll -DELAYLOAD:iphlpapi.dll, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=net.dll" \
-D "JDK_INTERNAL_NAME=net" \
@ -91,18 +76,5 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNET, \
$(BUILD_LIBNET): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBNET)
BASE_LIBRARIES += $(BUILD_LIBNET)
$(JDK_OUTPUTDIR)/lib/net.properties: $(JDK_TOPDIR)/src/share/lib/net.properties
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
COPY_FILES += $(JDK_OUTPUTDIR)/lib/net.properties
ifeq ($(OPENJDK_TARGET_OS), solaris)
$(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template: $(JDK_TOPDIR)/src/${OPENJDK_TARGET_OS_API_DIR}/lib/sdp/sdp.conf.template
$(ECHO) $(LOG_INFO) Copying $(@F)
$(call install-file)
COPY_FILES += $(JDK_OUTPUTDIR)/lib/sdp/sdp.conf.template
endif

@ -24,99 +24,38 @@
#
BUILD_LIBNIO_SRC := \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/nio \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/fs
$(JDK_TOPDIR)/src/java.base/share/native/libnio/ch \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnio \
$(sort $(wildcard \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnio/ch \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_API_DIR)/native/libnio/fs \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/ch \
$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libnio/fs)) \
#
BUILD_LIBNIO_CFLAGS := \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/java/io \
-I$(JDK_TOPDIR)/src/share/native/java/net \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net
BUILD_LIBNIO_FILES := \
DatagramChannelImpl.c \
DatagramDispatcher.c \
FileChannelImpl.c \
FileDispatcherImpl.c \
FileKey.c \
IOUtil.c \
MappedByteBuffer.c \
Net.c \
ServerSocketChannelImpl.c \
SocketChannelImpl.c \
SocketDispatcher.c
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBNIO_FILES += \
Iocp.c \
RegistryFileTypeDetector.c \
WindowsAsynchronousFileChannelImpl.c \
WindowsAsynchronousServerSocketChannelImpl.c \
WindowsAsynchronousSocketChannelImpl.c \
WindowsNativeDispatcher.c \
WindowsSelectorImpl.c
endif
$(addprefix -I, $(BUILD_LIBNIO_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers/java.base \
$(LIBJAVA_HEADER_FLAGS) \
$(addprefix -I, $(BUILD_LIBNET_SRC))
ifeq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_FILES += \
EPoll.c \
EPollArrayWrapper.c \
EPollPort.c \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
GnomeFileTypeDetector.c \
MagicFileTypeDetector.c \
LinuxNativeDispatcher.c \
LinuxWatchService.c \
UnixCopyFile.c \
UnixNativeDispatcher.c
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_SRC += $(JDK_TOPDIR)/src/macosx/native/sun/nio/ch
BUILD_LIBNIO_FILES += \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
BsdNativeDispatcher.c \
MacOSXNativeDispatcher.c \
UnixCopyFile.c \
UnixNativeDispatcher.c \
KQueue.c \
KQueuePort.c \
KQueueArrayWrapper.c
BUILD_LIBNIO_EXFILES += \
GnomeFileTypeDetector.c \
#
endif
ifeq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBNIO_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_FILES += \
DevPollArrayWrapper.c \
InheritedChannel.c \
NativeThread.c \
PollArrayWrapper.c \
SolarisEventPort.c \
UnixAsynchronousServerSocketChannelImpl.c \
UnixAsynchronousSocketChannelImpl.c \
GnomeFileTypeDetector.c \
SolarisNativeDispatcher.c \
SolarisWatchService.c \
UnixCopyFile.c \
UnixNativeDispatcher.c
endif
ifeq ($(OPENJDK_TARGET_OS), aix)
BUILD_LIBNIO_MAPFILE:=$(JDK_TOPDIR)/make/mapfiles/libnio/mapfile-$(OPENJDK_TARGET_OS)
BUILD_LIBNIO_SRC += \
$(JDK_TOPDIR)/src/aix/native/sun/nio/ch \
$(JDK_TOPDIR)/src/aix/native/sun/nio/fs
BUILD_LIBNIO_FILES += \
AixPollPort.c \
InheritedChannel.c \
@ -134,7 +73,8 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
LIBRARY := nio, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBNIO_SRC), \
INCLUDE_FILES := $(BUILD_LIBNIO_FILES), \
EXCLUDE_FILES := $(BUILD_LIBNIO_EXFILES), \
EXCLUDES := sctp, \
LANG := C, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) \
@ -151,7 +91,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
advapi32.lib, \
LDFLAGS_SUFFIX_macosx := -ljava -lnet -pthread -framework CoreFoundation, \
LDFLAGS_SUFFIX :=, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=nio.dll" \
-D "JDK_INTERNAL_NAME=nio" \
@ -159,47 +99,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBNIO, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libnio, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBNIO)
BASE_LIBRARIES += $(BUILD_LIBNIO)
$(BUILD_LIBNIO): $(BUILD_LIBNET)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS_API), posix)
ifeq (, $(filter $(OPENJDK_TARGET_OS), macosx aix))
# Suppress unused parameters required by exported JNI functions.
SCTP_WERROR := -Werror -Wno-error=unused-parameter
ifeq ($(OPENJDK_TARGET_CPU_ARCH), ppc)
SCTP_WERROR :=
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSCTP, \
LIBRARY := sctp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch/sctp, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/share/native/sun/nio/ch/sctp \
-I$(JDK_TOPDIR)/src/share/native/java/net \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/nio/ch \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/net, \
CFLAGS_linux := $(SCTP_WERROR), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsctp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread $(LIBDL) -ljava -ljvm, \
LDFLAGS_SUFFIX_posix := -lnio -lnet, \
LDFLAGS_SUFFIX_solaris := -lsocket -ljava -ljvm -lc, \
LDFLAGS_SUFFIX_macosx := -ljava -ljvm, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsctp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSCTP)
$(BUILD_LIBSCTP): $(BUILD_LIBNIO)
endif
endif

@ -23,43 +23,20 @@
# questions.
#
ifeq ($(OPENJDK_TARGET_OS), macosx)
$(eval $(call SetupNativeCompilation,BUILD_LIBAPPLESCRIPTENGINE, \
LIBRARY := AppleScriptEngine, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/apple/applescript, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/apple/applescript, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := -framework Cocoa \
-framework Carbon \
-framework JavaNativeFoundation \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libAppleScriptEngine, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBAPPLESCRIPTENGINE): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBAPPLESCRIPTENGINE)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSXAPP_SRC := $(JDK_TOPDIR)/src/java.desktop/macosx/native/libosxapp
$(eval $(call SetupNativeCompilation,BUILD_LIBOSXAPP, \
LIBRARY := osxapp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \
SRC := $(LIBOSXAPP_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp \
$(addprefix -I, $(LIBOSXAPP_SRC)) \
-I$(JDK_OUTPUTDIR)/gensrc_headers_icons, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -79,149 +56,7 @@ ifeq ($(OPENJDK_TARGET_OS), macosx)
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosxapp, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSXAPP)
DESKTOP_LIBRARIES += $(BUILD_LIBOSXAPP)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBOSX_DIRS := \
$(JDK_TOPDIR)/src/macosx/native/com/apple/concurrent \
$(JDK_TOPDIR)/src/macosx/native/com/apple/eio \
$(JDK_TOPDIR)/src/macosx/native/apple/security
$(eval $(call SetupNativeCompilation,BUILD_LIBOSX, \
LIBRARY := osx, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBOSX_DIRS), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
$(foreach dir, $(LIBOSX_DIRS), -I$(dir)) \
-I$(JDK_TOPDIR)/src/macosx/native/sun/osxapp, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_macosx := \
-losxapp \
-framework Cocoa \
-framework ApplicationServices \
-framework JavaNativeFoundation \
-framework JavaRuntimeSupport \
-framework Security \
-framework SystemConfiguration \
$(LDFLAGS_JDKLIB_SUFFIX), \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libosx, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBOSX)
$(BUILD_LIBOSX): $(BUILD_LIBOSXAPP)
$(BUILD_LIBOSX): $(BUILD_LIBJAVA)
endif
##########################################################################################
ifndef OPENJDK
ifeq ($(OPENJDK_TARGET_OS), windows)
ACCESSBRIDGE_SRCDIR := $(JDK_TOPDIR)/src/closed/windows/native/sun/bridge
define SetupAccessBridge
# Parameter 1 Suffix
# Parameter 2 Machine
# Parameter 3 ACCESSBRIDGE_ARCH_ suffix and name of directory where gensrc headers
# are found.
$(call SetupNativeCompilation,BUILD_JAWTACCESSBRIDGE$1, \
LIBRARY = JAWTAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := JAWTAccessBridge.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib jawt.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/JAWTAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=JAWTAccessBridge$1.dll" \
-D "JDK_INTERNAL_NAME=JAWTAccessBridge$1" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjawtaccessbridge$1, \
DEBUG_SYMBOLS := true)
$$(BUILD_JAWTACCESSBRIDGE$1): $(JDK_OUTPUTDIR)/lib/$(LIBRARY_PREFIX)jawt$(STATIC_LIBRARY_SUFFIX)
$(call SetupNativeCompilation,BUILD_JAVAACCESSBRIDGE$1, \
LIBRARY = JavaAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := AccessBridgeATInstance.cpp AccessBridgeDebug.cpp \
AccessBridgeJavaEntryPoints.cpp \
AccessBridgeMessages.cpp JavaAccessBridge.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/JavaAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=JavaAccessBridge$1.dll" \
-D "JDK_INTERNAL_NAME=JavaAccessBridge$1" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjavaaccessbridge$1, \
DEBUG_SYMBOLS := true)
$(call SetupNativeCompilation,BUILD_WINDOWSACCESSBRIDGE$1, \
LIBRARY = WindowsAccessBridge$1, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(ACCESSBRIDGE_SRCDIR), \
INCLUDE_FILES := AccessBridgeJavaVMInstance.cpp AccessBridgeMessageQueue.cpp \
AccessBridgeMessages.cpp AccessBridgeWindowsEntryPoints.cpp \
WinAccessBridge.cpp AccessBridgeDebug.cpp \
AccessBridgeEventHandler.cpp, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT \
-DACCESSBRIDGE_ARCH_$3 \
-I$(JDK_OUTPUTDIR)/gensrc_headers_ab/$3, \
LDFLAGS := $(LDFLAGS_JDKLIB) kernel32.lib user32.lib gdi32.lib \
winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib \
-subsystem:windows -machine:$2 \
-def:$(ACCESSBRIDGE_SRCDIR)/WinAccessBridge.DEF, \
VERSIONINFO_RESOURCE := $(ACCESSBRIDGE_SRCDIR)/AccessBridgeStatusWindow.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=WindowsAccessBridge$1.dll" \
-D "JDK_INTERNAL_NAME=WindowsAccessBridge$1" \
-D "JDK_FTYPE=0x02L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libwindowsaccessbridge$1, \
DEBUG_SYMBOLS := true)
BUILD_LIBRARIES += $$(BUILD_JAWTACCESSBRIDGE$1) $$(BUILD_JAVAACCESSBRIDGE$1) \
$$(BUILD_WINDOWSACCESSBRIDGE$1)
endef
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
$(eval $(call SetupAccessBridge,-32,I386,32))
$(eval $(call SetupAccessBridge,,I386,legacy))
else
$(eval $(call SetupAccessBridge,-64,X64,64))
endif
endif
endif

@ -1,294 +0,0 @@
#
# Copyright (c) 2011, 2014, 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.
#
LIBJAAS_MAPFILE :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBJAAS_EXCLUDE_FILES := Solaris.c
else
# only on solaris...wonder why
LIBJAAS_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjaas/mapfile-vers
endif
LIBJAAS_NAME := jaas_unix
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBJAAS_NAME := jaas_nt
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBJAAS, \
LIBRARY := $(LIBJAAS_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/security/auth/module, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB), \
MAPFILE := $(LIBJAAS_MAPFILE), \
LDFLAGS := $(filter-out -ljava, $(LDFLAGS_JDKLIB)) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := netapi32.lib user32.lib mpr.lib advapi32.lib, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_solaris := -lc, \
EXCLUDE_FILES := $(LIBJAAS_EXCLUDE_FILES), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(LIBJAAS_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(LIBJAAS_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjaas, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJAAS): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJAAS)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PCSC, \
LIBRARY := j2pcsc, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio, \
LANG := C, \
CFLAGS_posix := -D__sun_jdk, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/smartcardio \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/smartcardio/MUSCLE, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pcsc/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_windows := winscard.lib, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pcsc.dll" \
-D "JDK_INTERNAL_NAME=j2pcsc" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pcsc, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2PCSC)
##########################################################################################
ifneq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2GSS, \
LIBRARY := j2gss, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/jgss/wrapper \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/jgss/wrapper, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2gss/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2gss, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2GSS)
endif
##########################################################################################
ifneq ($(BUILD_CRYPTO), no)
BUILD_LIBKRB5_NAME :=
ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBKRB5_NAME := w2k_lsa_auth
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := advapi32.lib Secur32.lib netapi32.lib kernel32.lib user32.lib \
gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib \
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib
else ifeq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBKRB5_NAME := osxkrb5
BUILD_LIBKRB5_SRC := $(JDK_TOPDIR)/src/share/native/sun/security/krb5 \
$(JDK_TOPDIR)/src/macosx/native/sun/security/krb5
BUILD_LIBKRB5_LIBS := \
-framework JavaNativeFoundation \
-framework Cocoa \
-framework SystemConfiguration \
-framework Kerberos
endif
ifneq ($(BUILD_LIBKRB5_NAME), )
$(eval $(call SetupNativeCompilation,BUILD_LIBKRB5, \
LIBRARY := $(BUILD_LIBKRB5_NAME), \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBKRB5_SRC), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/krb5, \
CFLAGS_windows := -I$(JDK_TOPDIR)/src/windows/native/sun/security/krb5, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(BUILD_LIBKRB5_LIBS), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=$(BUILD_LIBKRB5_NAME).dll" \
-D "JDK_INTERNAL_NAME=$(BUILD_LIBKRB5_NAME)" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libkrb5, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBKRB5)
endif
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNMSCAPI, \
LIBRARY := sunmscapi, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/mscapi, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := Crypt32.Lib advapi32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunmscapi.dll" \
-D "JDK_INTERNAL_NAME=sunmscapi" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunmscapi, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNMSCAPI)
endif
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2PKCS11, \
LIBRARY := j2pkcs11, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11 \
-I$(JDK_TOPDIR)/src/share/native/sun/security/pkcs11/wrapper \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/security/pkcs11/wrapper, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2pkcs11/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_posix := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=j2pkcs11.dll" \
-D "JDK_INTERNAL_NAME=j2pkcs11" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2pkcs11, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJ2PKCS11)
##########################################################################################
ifeq ($(ENABLE_INTREE_EC), yes)
BUILD_LIBSUNEC_FLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/security/ec \
-I$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl
#
# On sol-sparc...all libraries are compiled with -xregs=no%appl
# (set in CFLAGS_REQUIRED_sparc)
#
# except!!! libsunec.so
#
ECC_JNI_SOLSPARC_FILTER :=
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
ECC_JNI_SOLSPARC_FILTER := -xregs=no%appl
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBSUNEC, \
LIBRARY := sunec, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/security/ec \
$(JDK_TOPDIR)/src/share/native/sun/security/ec/impl, \
LANG := C++, \
OPTIMIZATION := LOW, \
CFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS) \
-DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \
CXXFLAGS := $(filter-out $(ECC_JNI_SOLSPARC_FILTER), $(CXXFLAGS_JDKLIB)) \
$(BUILD_LIBSUNEC_FLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX := $(LIBCXX), \
LDFLAGS_SUFFIX_linux := -lc, \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=sunec.dll" \
-D "JDK_INTERNAL_NAME=sunec" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libsunec, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBSUNEC)
endif
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), solaris)
ifndef OPENJDK
$(eval $(call SetupNativeCompilation,BUILD_LIBJ2UCRYPTO, \
LIBRARY := j2ucrypto, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/closed/solaris/native/com/oracle/security/ucrypto, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libj2ucrypto/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_SUFFIX := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libj2ucrypto, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
$(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJ2UCRYPTO)
endif
endif

@ -1,436 +0,0 @@
#
# Copyright (c) 2011, 2014, 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.
#
LIBATTACH_EXCLUDE_FILES :=
ifneq ($(OPENJDK_TARGET_OS), solaris)
LIBATTACH_EXCLUDE_FILES += SolarisVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
LIBATTACH_EXCLUDE_FILES += LinuxVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
LIBATTACH_EXCLUDE_FILES += BsdVirtualMachine.c
endif
ifneq ($(OPENJDK_TARGET_OS),aix)
LIBATTACH_EXCLUDE_FILES += AixVirtualMachine.c
endif
LIBATTACH_SRC_FILES := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tools/attach
ifeq ($(OPENJDK_TARGET_OS),aix)
LIBATTACH_SRC_FILES += $(JDK_TOPDIR)/src/aix/native/sun/tools/attach
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBATTACH, \
LIBRARY := attach, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBATTACH_SRC_FILES), \
EXCLUDE_FILES := $(LIBATTACH_EXCLUDE_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS), \
CFLAGS_windows := /Gy, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libattach/mapfile-$(OPENJDK_TARGET_OS), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=attach.dll" \
-D "JDK_INTERNAL_NAME=attach" \
-D "JDK_FTYPE=0x2L", \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -ldoor, \
LDFLAGS_windows := /ORDER:@$(JDK_TOPDIR)/make/mapfiles/libattach/reorder-windows-$(OPENJDK_TARGET_CPU), \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := $(WIN_JAVA_LIB) advapi32.lib psapi.lib, \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libattach, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBATTACH): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBATTACH)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SOCKET, \
LIBRARY := dt_socket, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/transport/socket \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/socket \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/socket \
-I$(JDK_TOPDIR)/src/share/back/export \
-I$(JDK_TOPDIR)/src/share/back, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libdt_socket/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := -lpthread, \
LDFLAGS_SUFFIX_solaris := -lnsl -lsocket -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) -export:jdwpTransport_OnLoad ws2_32.lib, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_socket.dll" \
-D "JDK_INTERNAL_NAME=dt_socket" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_socket, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBDT_SOCKET): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBDT_SOCKET)
##########################################################################################
ifeq ($(OPENJDK_TARGET_OS), windows)
$(eval $(call SetupNativeCompilation,BUILD_LIBDT_SHMEM, \
LIBRARY := dt_shmem, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/com/sun/tools/jdi \
$(JDK_TOPDIR)/src/share/transport/shmem \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DUSE_MMAP \
-I$(INCLUDEDIR) -I$(JDK_OUTPUTDIR)/include/$(OPENJDK_TARGET_OS) \
-I$(JDK_TOPDIR)/src/share/transport/shmem \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/transport/shmem \
-I$(JDK_TOPDIR)/src/share/back/export, \
LDFLAGS := $(LDFLAGS_JDKLIB), \
LDFLAGS_windows := -export:jdwpTransport_OnLoad, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=dt_shmem.dll" \
-D "JDK_INTERNAL_NAME=dt_shmem" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libdt_shmem, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBDT_SHMEM)
endif # OPENJDK_TARGET_OS
##########################################################################################
# JDWP_LOGGING causes log messages to be compiled into the library.
$(eval $(call SetupNativeCompilation,BUILD_LIBJDWP, \
LIBRARY := jdwp, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/back $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) -DJDWP_LOGGING \
-I$(JDK_TOPDIR)/src/share/transport/export \
-I$(JDK_TOPDIR)/src/share/back/export \
-I$(JDK_TOPDIR)/src/share/back \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/back \
-I$(JDK_OUTPUTDIR)/gensrc_jdwp_headers, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjdwp/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := $(LIBDL) -lc, \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jdwp.dll" \
-D "JDK_INTERNAL_NAME=jdwp" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjdwp, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJDWP): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJDWP)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJSDT, \
LIBRARY := jsdt, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/tracing/dtrace, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
-I$(JDK_TOPDIR)/src/share/native/sun/tracing/dtrace, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjsdt/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_windows := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jsdt.dll" \
-D "JDK_INTERNAL_NAME=jsdt" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjsdt, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBJSDT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBJSDT)
##########################################################################################
LIBINSTRUMENT_SRC := $(JDK_TOPDIR)/src/share/instrument \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument
LIBINSTRUMENT_FILES := \
EncodingSupport.c \
EncodingSupport_md.c \
FileSystemSupport_md.c \
InstrumentationImplNativeMethods.c \
InvocationAdapter.c \
JarFacade.c \
JPLISAgent.c \
JPLISAssert.c \
JavaExceptions.c \
PathCharsValidator.c \
Reentrancy.c \
Utilities.c
LIBINSTRUMENT_DIR := $(JDK_OUTPUTDIR)/objs/libinstrument
LIBINSTRUMENT_CFLAGS := $(CFLAGS_JDKLIB) \
-I$(JDK_TOPDIR)/src/share/instrument \
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/instrument \
-I$(JDK_TOPDIR)/src/share/bin
LIBINSTRUMENT_LDFLAGS :=
LIBINSTRUMENT_LDFLAGS_SUFFIX :=
ifeq ($(OPENJDK_TARGET_OS), windows)
LIBINSTRUMENT_LDFLAGS += $(JDK_OUTPUTDIR)/objs/jli_static.lib $(WIN_JAVA_LIB) \
-export:Agent_OnAttach advapi32.lib
# Statically link the C runtime so that there are not dependencies on modules
# not on the search patch when invoked from the Windows system directory
# (or elsewhere).
LIBINSTRUMENT_CFLAGS := $(filter-out -MD, $(LIBINSTRUMENT_CFLAGS))
# equivalent of strcasecmp is stricmp on Windows
LIBINSTRUMENT_CFLAGS += -Dstrcasecmp=stricmp
else
LIBINSTRUMENT_LDFLAGS_SUFFIX := -ljava
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBINSTRUMENT, \
LIBRARY := instrument, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(LIBINSTRUMENT_SRC), \
INCLUDE_FILES := $(LIBINSTRUMENT_FILES), \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(LIBINSTRUMENT_CFLAGS) $(CFLAGS_WARNINGS_ARE_ERRORS), \
CFLAGS_debug := -DJPLIS_LOGGING, \
CFLAGS_release := -DNO_JPLIS_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libinstrument/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(LIBINSTRUMENT_LDFLAGS), \
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/jli), \
LDFLAGS_macosx := -Xlinker -all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
-framework Cocoa -framework Security -framework ApplicationServices, \
LDFLAGS_SUFFIX := $(LIBINSTRUMENT_LDFLAGS_SUFFIX), \
LDFLAGS_SUFFIX_macosx := -liconv $(LIBZ), \
LDFLAGS_SUFFIX_solaris := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL) -lc, \
LDFLAGS_SUFFIX_linux := $(LIBZ) -L $(INSTALL_LIBRARIES_HERE)/jli -ljli $(LIBDL), \
LDFLAGS_SUFFIX_aix := $(LIBZ) -L$(JDK_OUTPUTDIR)/objs -ljli_static $(LIBDL),\
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=instrument.dll" \
-D "JDK_INTERNAL_NAME=instrument" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(LIBINSTRUMENT_DIR), \
DEBUG_SYMBOLS := true))
ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
$(BUILD_LIBINSTRUMENT): $(JDK_OUTPUTDIR)/objs/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
else
$(BUILD_LIBINSTRUMENT): $(INSTALL_LIBRARIES_HERE)/jli/$(LIBRARY_PREFIX)jli$(SHARED_LIBRARY_SUFFIX)
endif
$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT)
##########################################################################################
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management
BUILD_LIBMANAGEMENT_EXCLUDES :=
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management
ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), linux)
BUILD_LIBMANAGEMENT_EXCLUDES += LinuxOperatingSystem.c
endif
ifneq ($(OPENJDK_TARGET_OS), macosx)
BUILD_LIBMANAGEMENT_EXCLUDES += MacosxOperatingSystem.c
endif
LIBMANAGEMENT_OPTIMIZATION := HIGH
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBMANAGEMENT_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBMANAGEMENT, \
LIBRARY := management, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBMANAGEMENT_SRC), \
EXCLUDE_FILES := $(BUILD_LIBMANAGEMENT_EXCLUDES), \
LANG := C, \
OPTIMIZATION := $(LIBMANAGEMENT_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) $(BUILD_LIBMANAGEMENT_CFLAGS), \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libmanagement/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_solaris := -lkstat, \
LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
LDFLAGS_SUFFIX_windows := jvm.lib psapi.lib $(WIN_JAVA_LIB) advapi32.lib, \
LDFLAGS_SUFFIX_aix := -lperfstat,\
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=management.dll" \
-D "JDK_INTERNAL_NAME=management" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libmanagement, \
DEBUG_SYMBOLS := true))
$(BUILD_LIBMANAGEMENT): $(BUILD_LIBJAVA)
BUILD_LIBRARIES += $(BUILD_LIBMANAGEMENT)
##########################################################################################
BUILD_LIBHPROF_SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/hprof $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/demo/jvmti/hprof
BUILD_LIBHPROF_CFLAGS := -I$(JDK_TOPDIR)/src/share/demo/jvmti/hprof \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo
ifeq ($(OPENJDK_TARGET_OS), aix)
BUILD_LIBHPROF_SRC += $(JDK_TOPDIR)/src/aix/porting
BUILD_LIBHPROF_CFLAGS += -I$(JDK_TOPDIR)/src/aix/porting
endif
BUILD_LIBHPROF_LDFLAGS :=
LIBHPROF_OPTIMIZATION := HIGHEST
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), )
ifeq ($(ENABLE_DEBUG_SYMBOLS), true)
LIBHPROF_OPTIMIZATION := LOW
endif
endif
$(eval $(call SetupNativeCompilation,BUILD_LIBHPROF, \
LIBRARY := hprof, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(BUILD_LIBHPROF_SRC), \
LANG := C, \
OPTIMIZATION := $(LIBHPROF_OPTIMIZATION), \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
$(BUILD_LIBHPROF_CFLAGS), \
CFLAGS_debug := -DHPROF_LOGGING, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libhprof/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_windows := wsock32.lib winmm.lib advapi32.lib, \
LDFLAGS_SUFFIX_linux := $(LIBDL), \
LDFLAGS_SUFFIX_macosx := $(LIBDL), \
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl $(LIBDL) -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=hprof.dll" \
-D "JDK_INTERNAL_NAME=hprof" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libhprof_jvmti, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBHPROF)
##########################################################################################
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA_CRW_DEMO, \
LIBRARY := java_crw_demo, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
-I$(JDK_TOPDIR)/src/share/demo/jvmti/java_crw_demo, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava_crw_demo/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=java_crw_demo.dll" \
-D "JDK_INTERNAL_NAME=java_crw_demo" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjava_crw_demo, \
DEBUG_SYMBOLS := true))
BUILD_LIBRARIES += $(BUILD_LIBJAVA_CRW_DEMO)
##########################################################################################
ifndef OPENJDK
ifeq ($(ENABLE_JFR), true)
$(eval $(call SetupNativeCompilation,BUILD_LIBJFR, \
LIBRARY := jfr, \
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
SRC := $(JDK_TOPDIR)/src/closed/share/native/oracle/jfr, \
LANG := C, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) $(CFLAGS_WARNINGS_ARE_ERRORS) \
-I$(JDK_TOPDIR)/src/closed/share/javavm/export, \
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjfr/mapfile-vers, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS_SUFFIX_solaris := -lc, \
VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
RC_FLAGS := $(RC_FLAGS) \
-D "JDK_FNAME=jfr.dll" \
-D "JDK_INTERNAL_NAME=jfr" \
-D "JDK_FTYPE=0x2L", \
OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjfr, \
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
BUILD_LIBRARIES += $(BUILD_LIBJFR)
endif
endif

Some files were not shown because too many files have changed in this diff Show More