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