author | dholmes |
Tue, 15 Mar 2011 20:00:45 -0400 | |
changeset 8793 | a25480ff1a6b |
parent 8768 | 4e98f3b11578 |
parent 8583 | 15dea0fdc2ea |
child 9035 | 1255eb81cc2f |
permissions | -rw-r--r-- |
2 | 1 |
# |
7668 | 2 |
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Java Launcher Infrastructure Library (libjli) |
|
28 |
# |
|
29 |
# This library provides shared support for the Java launcher in all of |
|
30 |
# its manifestations (java, javaw, javac, ...). |
|
31 |
# |
|
32 |
BUILDDIR = ../.. |
|
33 |
LIBRARY = jli |
|
34 |
PRODUCT = java |
|
35 |
||
36 |
# |
|
37 |
# Must be included before Defs.gmk to be functional. |
|
38 |
# |
|
39 |
# Note that for Windows, both a dynamic and static version are built. |
|
40 |
# Doing the compiles with the static library specified can be overridden |
|
41 |
# by the link step, but not the reverse. |
|
42 |
# |
|
43 |
MS_RUNTIME_STATIC = true |
|
44 |
||
45 |
include $(BUILDDIR)/common/Defs.gmk |
|
46 |
||
47 |
ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) |
|
48 |
LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin |
|
49 |
LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin |
|
50 |
||
4111
ffc9c33335f4
6891677: java/build integrate zero assembler JDK changes
gbenson
parents:
3704
diff
changeset
|
51 |
ifeq ($(ZERO_BUILD), true) |
ffc9c33335f4
6891677: java/build integrate zero assembler JDK changes
gbenson
parents:
3704
diff
changeset
|
52 |
ERGO_FAMILY=zero |
ffc9c33335f4
6891677: java/build integrate zero assembler JDK changes
gbenson
parents:
3704
diff
changeset
|
53 |
else |
2 | 54 |
ifeq ($(ARCH_FAMILY), amd64) |
55 |
ERGO_FAMILY=i586 |
|
56 |
else |
|
57 |
ERGO_FAMILY=$(ARCH_FAMILY) |
|
58 |
endif |
|
4111
ffc9c33335f4
6891677: java/build integrate zero assembler JDK changes
gbenson
parents:
3704
diff
changeset
|
59 |
endif |
2 | 60 |
|
61 |
||
62 |
# |
|
63 |
# Files to compile. |
|
64 |
# |
|
65 |
FILES_c = \ |
|
66 |
java.c \ |
|
67 |
splashscreen_stubs.c \ |
|
68 |
java_md.c \ |
|
69 |
parse_manifest.c \ |
|
70 |
version_comp.c \ |
|
71 |
wildcard.c \ |
|
72 |
jli_util.c \ |
|
73 |
inflate.c \ |
|
74 |
inftrees.c \ |
|
75 |
inffast.c \ |
|
76 |
zadler32.c \ |
|
3704
bd98409d8c32
4963968: zlib should be upgraded to current version of zlib
sherman
parents:
1145
diff
changeset
|
77 |
zcrc32.c \ |
2 | 78 |
zutil.c |
79 |
||
80 |
ifneq ($(PLATFORM), windows) |
|
8768
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
81 |
FILES_c += ergo.c |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
82 |
ERGO_ARCH_FILE = ergo_$(ERGO_FAMILY).c |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
83 |
# if the architecture specific ergo file exists then |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
84 |
# use it, else use the generic definitions from ergo.c |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
85 |
ifneq ($(wildcard $(LAUNCHER_PLATFORM_SRC)/$(ERGO_ARCH_FILE)),) |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
86 |
FILES_c += $(ERGO_ARCH_FILE) |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
87 |
else |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
88 |
OTHER_CPPFLAGS += -DUSE_GENERIC_ERGO |
4e98f3b11578
7022370: Launcher ergonomics should provide simple default implementation
dholmes
parents:
7668
diff
changeset
|
89 |
endif |
2 | 90 |
endif |
91 |
||
92 |
# Names of arch directories |
|
93 |
LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"' |
|
94 |
ifeq ($(PLATFORM), solaris) |
|
95 |
LIBARCH_DEFINES += -DLIBARCH32NAME='"$(LIBARCH32)"' |
|
96 |
LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"' |
|
97 |
endif |
|
98 |
||
99 |
OTHER_CPPFLAGS += $(LIBARCH_DEFINES) |
|
100 |
||
101 |
||
102 |
ifneq ($(PLATFORM), windows) # UNIX systems |
|
4340
ec6ba551fa78
6367077: Purge LD_LIBRARY_PATH usage from the launcher
ksrini
parents:
4111
diff
changeset
|
103 |
LD_RUNPATH_EXTRAS += .. |
2 | 104 |
LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli |
105 |
# Note: its important to keep this order meaning -lc is the |
|
106 |
# last library otherwise it could cause compatibility issues |
|
107 |
# by pulling in SUNW_private symbols from libc |
|
108 |
LDLIBS = -ldl -lc |
|
109 |
ifeq ($(USE_PTHREADS),true) |
|
110 |
LDLIBS += -lpthread |
|
111 |
endif # USE_PTHREADS |
|
112 |
endif # PLATFORM |
|
113 |
||
114 |
ifeq ($(PLATFORM), windows) |
|
115 |
EXTRA_LIBS = advapi32.lib \ |
|
39
560da37936db
6596475: (launcher) javaw should call InitCommonControls
ksrini
parents:
2
diff
changeset
|
116 |
comctl32.lib \ |
2 | 117 |
user32.lib |
118 |
||
119 |
JAVALIB = |
|
120 |
OTHER_LCF = -export:JLI_Launch \ |
|
121 |
-export:JLI_ManifestIterate \ |
|
1145
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
122 |
-export:JLI_SetTraceLauncher \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
123 |
-export:JLI_ReportErrorMessage \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
124 |
-export:JLI_ReportErrorMessageSys \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
125 |
-export:JLI_ReportMessage \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
126 |
-export:JLI_ReportExceptionDescription |
2 | 127 |
|
128 |
endif |
|
129 |
||
130 |
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) |
|
131 |
OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC) |
|
132 |
OTHER_INCLUDES += -I$(ZIP_SRC) |
|
133 |
||
134 |
# |
|
135 |
# Library to compile. |
|
136 |
# |
|
137 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
138 |
include $(BUILDDIR)/common/Library.gmk |
|
139 |
||
140 |
# |
|
141 |
# On Windows, some executable objects need to be statically linked against |
|
142 |
# the jli library. Hence, we need both a standard library (archive) and |
|
143 |
# an import library (associated with a dll). These both usually have the |
|
144 |
# extension .LIB, so they need to be placed in different directories. The |
|
145 |
# import library is build (as usual) in the $(OBJDIR) directory while the |
|
146 |
# standard library is built in a "static" subdirectory. The standard library |
|
147 |
# is not delivered as part of the product, but is only needed as part of |
|
148 |
# the build process. The import library is built by the standard rules |
|
149 |
# in Library.gmk. The additional rules which follow build the standard |
|
150 |
# library. |
|
151 |
# |
|
152 |
ifeq ($(PLATFORM), windows) |
|
153 |
||
7041
07f4ed79094e
6995674: (launcher) make of jli fails on windows if directory exists
ksrini
parents:
5506
diff
changeset
|
154 |
STATIC_LIBRARY = $(OBJDIR)/static/$(LIBPREFIX)$(LIBRARY).lib |
2 | 155 |
|
7041
07f4ed79094e
6995674: (launcher) make of jli fails on windows if directory exists
ksrini
parents:
5506
diff
changeset
|
156 |
$(STATIC_LIBRARY): $(FILES_o) |
2 | 157 |
@$(prep-target) |
158 |
$(LIBEXE) -nologo -out:$@ $(FILES_o) |
|
159 |
||
160 |
library:: $(STATIC_LIBRARY) |
|
161 |
||
162 |
endif # PLATFORM |
|
163 |
||
164 |
# |
|
165 |
# Add to ambient vpath so we pick up the library files |
|
166 |
# |
|
167 |
vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC) |