author | ohair |
Tue, 10 Apr 2012 08:22:03 -0700 | |
changeset 12317 | 9670c1610c53 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
2 |
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
26 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
27 |
# Java Launcher Infrastructure Library (libjli) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
29 |
# This library provides shared support for the Java launcher in all of |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
30 |
# its manifestations (java, javaw, javac, ...). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
BUILDDIR = ../.. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
33 |
LIBRARY = jli |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
34 |
PRODUCT = java |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
35 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
36 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
37 |
# Must be included before Defs.gmk to be functional. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
38 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
39 |
# Note that for Windows, both a dynamic and static version are built. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
40 |
# Doing the compiles with the static library specified can be overridden |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
41 |
# by the link step, but not the reverse. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
42 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
43 |
MS_RUNTIME_STATIC = true |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
44 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
45 |
include $(BUILDDIR)/common/Defs.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
46 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
47 |
ifneq ($(SYSTEM_ZLIB),true) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
48 |
ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
49 |
endif #SYSTEM_ZLIB |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
50 |
LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
51 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
52 |
# set the platform specific directory for macosx, also this platform shares |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
53 |
# substantial family ties with its siblings (solaris and linux), thus we add |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
54 |
# solaris src path to its compilation dependencies. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
55 |
ifeq ($(PLATFORM), macosx) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
56 |
LAUNCHER_PLATFORM_SRC = $(BUILDDIR)/../src/macosx/bin |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
57 |
LAUNCHER_SOLARIS_PLATFORM_SRC = $(BUILDDIR)/../src/solaris/bin |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
58 |
else # !MACOSX |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
59 |
LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
60 |
endif #PLATFORM |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
61 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
62 |
ifeq ($(ZERO_BUILD), true) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
63 |
ERGO_FAMILY=zero |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
64 |
else # !ZERO_BUILD |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
65 |
ifneq (,$(findstring $(ARCH_FAMILY), amd64 x86_64)) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
66 |
ERGO_FAMILY=i586 |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
67 |
else # !X86 FAMILY |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
68 |
ERGO_FAMILY=$(ARCH_FAMILY) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
69 |
endif #ARCH_FAMILY |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
70 |
endif # ZERO_BUILD |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
71 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
72 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
73 |
# Files to compile. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
74 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
75 |
FILES_c = java.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
76 |
splashscreen_stubs.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
77 |
parse_manifest.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
78 |
version_comp.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
79 |
wildcard.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
80 |
jli_util.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
81 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
82 |
ifneq ($(SYSTEM_ZLIB),true) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
83 |
FILES_c += inflate.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
84 |
inftrees.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
85 |
inffast.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
86 |
zadler32.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
87 |
zcrc32.c \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
88 |
zutil.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
89 |
endif # SYSTEM_ZLIB |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
90 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
91 |
# add platform specific files |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
92 |
ifeq ($(PLATFORM), windows) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
93 |
FILES_c += java_md.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
94 |
else # NIXES |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
95 |
FILES_c += java_md_common.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
96 |
ifeq ($(PLATFORM), macosx) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
97 |
FILES_c += java_md_macosx.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
98 |
else # SOLARIS/LINUX |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
99 |
FILES_c += java_md_solinux.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
100 |
FILES_c += ergo.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
101 |
ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
102 |
# if the architecture specific ergo file exists then |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
103 |
# use it, else use the generic definitions from ergo.c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
104 |
ifneq ($(wildcard $(LAUNCHER_PLATFORM_SRC)/$(ERGO_ARCH_FILE)),) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
105 |
FILES_c += $(ERGO_ARCH_FILE) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
106 |
else # !ERGO_ARCH_FILE |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
107 |
OTHER_CPPFLAGS += -DUSE_GENERIC_ERGO |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
108 |
endif # ERGO_ARCH_FILE |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
109 |
endif #MACOSX |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
110 |
endif #WINDOWS |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
111 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
112 |
# Names of arch directories |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
113 |
LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"' |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
114 |
ifeq ($(PLATFORM), solaris) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
115 |
LIBARCH_DEFINES += -DLIBARCH32NAME='"$(LIBARCH32)"' |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
116 |
LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"' |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
117 |
endif # PLATFORM |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
118 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
119 |
ifeq ($(PLATFORM), macosx) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
120 |
OTHER_CPPFLAGS += $(LIBARCH_DEFINES) -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
121 |
else # ! MACOSX |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
122 |
OTHER_CPPFLAGS += $(LIBARCH_DEFINES) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
123 |
endif #PLATFORM |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
124 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
125 |
ifneq ($(PLATFORM), windows) # UNIX systems |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
126 |
ifeq ($(PLATFORM), macosx) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
127 |
LIB_LOCATION = $(LIBDIR)/jli |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
128 |
else # SOLARIS/LINUX |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
129 |
LD_RUNPATH_EXTRAS += .. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
130 |
LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
131 |
# Note: it is important to keep this order, meaning -lc as the |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
132 |
# last library, otherwise it could cause compatibility issues |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
133 |
# by pulling in SUNW_private symbols from libc |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
134 |
LDLIBS = -ldl -lc |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
135 |
ifeq ($(USE_PTHREADS),true) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
136 |
LDLIBS += -lpthread |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
137 |
endif # USE_PTHREADS |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
138 |
endif # PLATFORM |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
139 |
endif # PLATFORM |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
140 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
141 |
ifeq ($(PLATFORM), windows) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
142 |
EXTRA_LIBS = advapi32.lib \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
143 |
comctl32.lib \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
144 |
user32.lib |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
145 |
JAVALIB = |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
146 |
OTHER_LCF = -export:JLI_Launch \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
147 |
-export:JLI_ManifestIterate \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
148 |
-export:JLI_SetTraceLauncher \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
149 |
-export:JLI_ReportErrorMessage \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
150 |
-export:JLI_ReportErrorMessageSys \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
151 |
-export:JLI_ReportMessage \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
152 |
-export:JLI_ReportExceptionDescription |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
153 |
endif # PLATFORM |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
154 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
155 |
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
156 |
OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
157 |
ifneq ($(SYSTEM_ZLIB),true) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
158 |
OTHER_INCLUDES += -I$(ZIP_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
159 |
else # !SYSTEM_ZLIB |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
160 |
LDLIBS += -lz |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
161 |
endif # SYSTEM_ZLIB |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
162 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
163 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
164 |
# Library to compile. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
165 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
166 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
167 |
include $(BUILDDIR)/common/Library.gmk |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
168 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
169 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
170 |
# On Windows, some executable objects need to be statically linked against |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
171 |
# the jli library. Hence, we need both a standard library (archive) and |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
172 |
# an import library (associated with a dll). These both usually have the |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
173 |
# extension .LIB, so they need to be placed in different directories. The |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
174 |
# import library is build (as usual) in the $(OBJDIR) directory while the |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
175 |
# standard library is built in a "static" subdirectory. The standard library |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
176 |
# is not delivered as part of the product, but is only needed as part of |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
177 |
# the build process. The import library is built by the standard rules |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
178 |
# in Library.gmk. The additional rules which follow build the standard |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
179 |
# library. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
180 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
181 |
ifeq ($(PLATFORM), windows) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
182 |
STATIC_LIBRARY = $(OBJDIR)/static/$(LIBPREFIX)$(LIBRARY).lib |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
183 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
184 |
$(STATIC_LIBRARY): $(FILES_o) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
185 |
@$(prep-target) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
186 |
$(AR) -nologo -out:$@ $(FILES_o) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
187 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
188 |
library:: $(STATIC_LIBRARY) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
189 |
else |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
190 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
191 |
ifeq ($(PLATFORM), macosx) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
192 |
# Some Obj-C code is embedded in java_md_macosx.c, we stipulate so, using |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
193 |
# "-x" option. Not doing so will cause the compiler to choose the language |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
194 |
# based on the filename suffix, also "-Os" optimizes the file for size. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
195 |
CFLAGS_$(VARIANT)/java_md_macosx.o = -Os -x objective-c |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
196 |
# Needed for linking the various launchers |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
197 |
LDFLAGS += -framework Cocoa -framework Security \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
198 |
-framework ApplicationServices |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
199 |
# Add solaris sources containing common logic to the header path |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
200 |
OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
201 |
endif # PLATFORM macosx |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
202 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
203 |
STATIC_LIBRARY_DIR = $(OBJDIR)/static |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
204 |
STATIC_LIBRARY_NAME = lib$(LIBRARY).a |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
205 |
STATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
206 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
207 |
$(STATIC_LIBRARY_DIR): | $(OBJDIR) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
208 |
@$(MKDIR) $(STATIC_LIBRARY_DIR) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
209 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
210 |
$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
211 |
@$(prep-target) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
212 |
$(AR) $(ARFLAGS) $@ $(FILES_o) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
213 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
214 |
library:: $(STATIC_LIBRARY) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
215 |
endif # NOT WINDOWS |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
216 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
217 |
vpath %.c $(LAUNCHER_SHARE_SRC) $(LAUNCHER_PLATFORM_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
218 |
ifneq ($(SYSTEM_ZLIB),true) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
219 |
vpath %.c $(ZIP_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
220 |
else # !SYSTEM_ZLIB |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
221 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
222 |
# Add to ambient vpath so we pick up the library files, for macos we add |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
223 |
# solaris sources which contains the common logic for all nixes |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
224 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
225 |
ifeq ($(PLATFORM), macosx) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
226 |
vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC) \ |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
227 |
$(LAUNCHER_SOLARIS_PLATFORM_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
228 |
else # !MACOSX |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
229 |
vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC) |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
230 |
endif # MACOSX |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
231 |
endif # SYSTEM_LIB |