author | erikj |
Fri, 08 Jul 2016 08:56:39 +0200 | |
changeset 39504 | 96c700e62710 |
parent 37905 | 2145d16bd92d |
child 42753 | 40f61533b93d |
permissions | -rw-r--r-- |
25859 | 1 |
# |
37905
2145d16bd92d
8156837: RC resource compilation on windows generates false build failure reports
erikj
parents:
35276
diff
changeset
|
2 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
25859 | 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 |
||
39504
96c700e62710
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents:
37905
diff
changeset
|
28 |
$(eval $(call IncludeCustomExtension, jdk, launcher/Launcher-java.base.gmk)) |
96c700e62710
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents:
37905
diff
changeset
|
29 |
|
37905
2145d16bd92d
8156837: RC resource compilation on windows generates false build failure reports
erikj
parents:
35276
diff
changeset
|
30 |
JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/java.base/windows/native/common |
39504
96c700e62710
8003593: build-infra: Paths to optional platform-specific files should not be hardwired to src/closed
erikj
parents:
37905
diff
changeset
|
31 |
JAVA_RC_FLAGS += -I $(JDK_TOPDIR)/src/java.base/windows/native/launcher/icons |
33523 | 32 |
|
25859 | 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. |
|
33523 | 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 |
LIBS_windows := user32.lib comctl32.lib, \ |
|
42 |
RC_FLAGS := $(JAVA_RC_FLAGS), \ |
|
43 |
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \ |
|
44 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs, \ |
|
45 |
OPTIMIZATION := HIGH, \ |
|
46 |
WINDOWS_STATIC_LINK := true, \ |
|
47 |
NO_JAVA_MS := true, \ |
|
48 |
)) |
|
25859 | 49 |
|
27565 | 50 |
$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java) |
25859 | 51 |
$(MKDIR) -p $(@D) |
52 |
$(RM) $@ |
|
33523 | 53 |
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs/java$(EXE_SUFFIX) $@ |
25859 | 54 |
|
27565 | 55 |
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX) |
25859 | 56 |
|
57 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
33523 | 58 |
$(eval $(call SetupBuildLauncher, javaw, \ |
59 |
CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \ |
|
60 |
LIBS_windows := user32.lib comctl32.lib, \ |
|
61 |
RC_FLAGS := $(JAVA_RC_FLAGS), \ |
|
62 |
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \ |
|
63 |
WINDOWS_STATIC_LINK := true, \ |
|
64 |
NO_JAVA_MS := true, \ |
|
65 |
)) |
|
25859 | 66 |
endif |
67 |
||
33523 | 68 |
$(eval $(call SetupBuildLauncher, keytool, \ |
69 |
MAIN_CLASS := sun.security.tools.keytool.Main, \ |
|
70 |
)) |
|
25859 | 71 |
|
72 |
################################################################################ |
|
73 |
||
74 |
BUILD_JEXEC := |
|
75 |
BUILD_JEXEC_SRC := |
|
76 |
BUILD_JEXEC_INC := |
|
27565 | 77 |
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) |
25859 | 78 |
|
79 |
# |
|
80 |
# UNHANDLED: |
|
81 |
# - COMPILE_APPROACH = normal |
|
82 |
# |
|
83 |
||
84 |
# |
|
85 |
# jdk/make/java/Makefile |
|
86 |
# |
|
87 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
88 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
89 |
BUILD_JEXEC := 1 |
|
90 |
endif |
|
91 |
endif |
|
92 |
||
93 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
94 |
BUILD_JEXEC := 1 |
|
95 |
endif # OPENJDK_TARGET_OS |
|
96 |
||
97 |
# |
|
98 |
# jdk/make/java/jexec/Makefile |
|
99 |
# |
|
100 |
ifeq ($(BUILD_JEXEC), 1) |
|
101 |
||
102 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
103 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
104 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/macosx/native/launcher |
|
105 |
else |
|
106 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/launcher |
|
107 |
endif |
|
108 |
||
109 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
27565 | 110 |
BUILD_JEXEC_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base |
25859 | 111 |
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/java.base/share/native/libjli |
112 |
endif |
|
113 |
endif |
|
114 |
||
115 |
# |
|
116 |
# Note that the two Makefile's seems to contradict each other, |
|
117 |
# and that src/macosx/bin/jexec.c seems unused |
|
118 |
# |
|
119 |
ifneq ($(BUILD_JEXEC_SRC), ) |
|
120 |
$(eval $(call SetupNativeCompilation,BUILD_JEXEC, \ |
|
121 |
SRC := $(BUILD_JEXEC_SRC), \ |
|
122 |
INCLUDE_FILES := jexec.c, \ |
|
123 |
OPTIMIZATION := LOW, \ |
|
124 |
CFLAGS := $(CFLAGS_JDKEXE) \ |
|
125 |
$(BUILD_JEXEC_INC), \ |
|
126 |
CFLAGS_linux := -fPIC, \ |
|
127 |
CFLAGS_solaris := -KPIC, \ |
|
34695
7a6cc9982d22
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33523
diff
changeset
|
128 |
LDFLAGS := $(LDFLAGS_JDKEXE), \ |
27565 | 129 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jexec_obj, \ |
25859 | 130 |
OUTPUT_DIR := $(BUILD_JEXEC_DST_DIR), \ |
131 |
PROGRAM := jexec)) |
|
132 |
||
27565 | 133 |
TARGETS += $(BUILD_JEXEC) |
25859 | 134 |
endif |
135 |
||
136 |
################################################################################ |
|
137 |
||
138 |
BUILD_JSPAWNHELPER := |
|
139 |
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/java.base/unix/native/jspawnhelper |
|
140 |
JSPAWNHELPER_CFLAGS := -I$(JDK_TOPDIR)/src/java.base/unix/native/libjava |
|
27565 | 141 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base$(OPENJDK_TARGET_CPU_LIBDIR) |
142 |
LINK_JSPAWNHELPER_OBJECTS := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava/childproc.o |
|
33406 | 143 |
BUILD_JSPAWNHELPER_LDFLAGS := |
25859 | 144 |
|
145 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris aix), ) |
|
146 |
BUILD_JSPAWNHELPER := 1 |
|
147 |
endif |
|
148 |
||
149 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
27565 | 150 |
BUILD_JSPAWNHELPER_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base |
25859 | 151 |
endif |
152 |
||
153 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
|
33406 | 154 |
BUILD_JSPAWNHELPER_LDFLAGS += $(COMPILER_TARGET_BITS_FLAG)64 |
25859 | 155 |
endif |
156 |
||
157 |
ifeq ($(BUILD_JSPAWNHELPER), 1) |
|
158 |
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER, \ |
|
159 |
SRC := $(BUILD_JSPAWNHELPER_SRC), \ |
|
160 |
INCLUDE_FILES := jspawnhelper.c, \ |
|
161 |
OPTIMIZATION := LOW, \ |
|
162 |
CFLAGS := $(CFLAGS_JDKEXE) $(JSPAWNHELPER_CFLAGS), \ |
|
33406 | 163 |
LDFLAGS := $(LDFLAGS_JDKEXE) $(BUILD_JSPAWNHELPER_LDFLAGS), \ |
164 |
LIBS := $(LINK_JSPAWNHELPER_OBJECTS), \ |
|
27565 | 165 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/jspawnhelper, \ |
25859 | 166 |
OUTPUT_DIR := $(BUILD_JSPAWNHELPER_DST_DIR), \ |
167 |
PROGRAM := jspawnhelper)) |
|
168 |
||
169 |
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS) |
|
170 |
||
27565 | 171 |
TARGETS += $(BUILD_JSPAWNHELPER) |
25859 | 172 |
endif |
173 |
||
174 |
################################################################################ |