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