1 # 2 # Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 include LauncherCommon.gmk 27 28 $(eval $(call IncludeCustomExtension, launcher/Launcher-java.base.gmk)) 29 30 JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/common 31 JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/launcher/icons 32 33 ################################################################################ 34 35 # On windows, the debuginfo files get the same name as for java.dll. Build 36 # into another dir and copy selectively so debuginfo for java.dll isn't 37 # overwritten. 38 $(eval $(call SetupBuildLauncher, java, \ 39 CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \ 40 LDFLAGS_solaris := -R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR), \ 41 EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \ 42 VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \ 43 OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs, \ 44 OPTIMIZATION := HIGH, \ 45 )) 46 47 $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java) 48 $(call MakeTargetDir) 49 $(RM) $@ 50 $(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs/java$(EXE_SUFFIX) $@ 51 52 TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX) 53 54 ifeq ($(OPENJDK_TARGET_OS), windows) 55 $(eval $(call SetupBuildLauncher, javaw, \ 56 CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \ 57 EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \ 58 VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \ 59 )) 60 endif 61 62 $(eval $(call SetupBuildLauncher, keytool, \ 63 MAIN_CLASS := sun.security.tools.keytool.Main, \ 64 )) 65 66 ################################################################################ 67 68 ifeq ($(OPENJDK_TARGET_OS), linux) 69 $(eval $(call SetupJdkExecutable, BUILD_JEXEC, \ 70 NAME := jexec, \ 71 SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \ 72 INCLUDE_FILES := jexec.c, \ 73 OPTIMIZATION := LOW, \ 74 CFLAGS := $(CFLAGS_JDKEXE) \ 75 -I$(TOPDIR)/src/$(MODULE)/share/native/libjli, \ 76 CFLAGS_linux := -fPIC, \ 77 CFLAGS_solaris := -KPIC, \ 78 LDFLAGS := $(LDFLAGS_JDKEXE), \ 79 OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ 80 )) 81 82 TARGETS += $(BUILD_JEXEC) 83 endif 84 85 ################################################################################ 86 87 ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix linux), ) 88 $(eval $(call SetupJdkExecutable, BUILD_JSPAWNHELPER, \ 89 NAME := jspawnhelper, \ 90 SRC := $(TOPDIR)/src/$(MODULE)/unix/native/jspawnhelper, \ 91 OPTIMIZATION := LOW, \ 92 CFLAGS := $(CFLAGS_JDKEXE) -I$(TOPDIR)/src/$(MODULE)/unix/native/libjava, \ 93 EXTRA_OBJECT_FILES := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o, \ 94 LDFLAGS := $(LDFLAGS_JDKEXE), \ 95 OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \ 96 )) 97 98 TARGETS += $(BUILD_JSPAWNHELPER) 99 endif 100 101 ################################################################################