author | mchung |
Thu, 07 Jan 2010 08:14:48 -0800 | |
changeset 4665 | d14dc3d9e1fa |
parent 4521 | 6562b91703be |
child 5506 | 202f599c92aa |
permissions | -rw-r--r-- |
2 | 1 |
# |
715 | 2 |
# Copyright 2005-2008 Sun Microsystems, Inc. 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 |
|
7 |
# published by the Free Software Foundation. Sun designates this |
|
8 |
# particular file as subject to the "Classpath" exception as provided |
|
9 |
# by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
# have any questions. |
|
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) |
|
82 |
||
83 |
FILES_c += \ |
|
84 |
$(CTARGDIR)ergo.c \ |
|
85 |
$(CTARGDIR)ergo_$(ERGO_FAMILY).c |
|
86 |
endif |
|
87 |
||
88 |
||
89 |
# Names of arch directories |
|
90 |
LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"' |
|
91 |
ifeq ($(PLATFORM), solaris) |
|
92 |
LIBARCH_DEFINES += -DLIBARCH32NAME='"$(LIBARCH32)"' |
|
93 |
LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"' |
|
94 |
endif |
|
95 |
||
96 |
OTHER_CPPFLAGS += $(LIBARCH_DEFINES) |
|
97 |
||
98 |
||
99 |
ifneq ($(PLATFORM), windows) # UNIX systems |
|
4340
ec6ba551fa78
6367077: Purge LD_LIBRARY_PATH usage from the launcher
ksrini
parents:
4111
diff
changeset
|
100 |
LD_RUNPATH_EXTRAS += .. |
2 | 101 |
LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli |
102 |
# Note: its important to keep this order meaning -lc is the |
|
103 |
# last library otherwise it could cause compatibility issues |
|
104 |
# by pulling in SUNW_private symbols from libc |
|
105 |
LDLIBS = -ldl -lc |
|
106 |
ifeq ($(USE_PTHREADS),true) |
|
107 |
LDLIBS += -lpthread |
|
108 |
endif # USE_PTHREADS |
|
109 |
endif # PLATFORM |
|
110 |
||
111 |
ifeq ($(PLATFORM), windows) |
|
112 |
EXTRA_LIBS = advapi32.lib \ |
|
39
560da37936db
6596475: (launcher) javaw should call InitCommonControls
ksrini
parents:
2
diff
changeset
|
113 |
comctl32.lib \ |
2 | 114 |
user32.lib |
115 |
||
116 |
JAVALIB = |
|
117 |
OTHER_LCF = -export:JLI_Launch \ |
|
118 |
-export:JLI_ManifestIterate \ |
|
1145
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
119 |
-export:JLI_SetTraceLauncher \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
120 |
-export:JLI_ReportErrorMessage \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
121 |
-export:JLI_ReportErrorMessageSys \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
122 |
-export:JLI_ReportMessage \ |
404b11752c57
6685121: (launcher) make ReportErrorMessages accessible by other launcher subsystems
ksrini
parents:
849
diff
changeset
|
123 |
-export:JLI_ReportExceptionDescription |
2 | 124 |
|
125 |
endif |
|
126 |
||
127 |
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) |
|
128 |
OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC) |
|
129 |
OTHER_INCLUDES += -I$(ZIP_SRC) |
|
130 |
||
131 |
# |
|
132 |
# Library to compile. |
|
133 |
# |
|
134 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
135 |
include $(BUILDDIR)/common/Library.gmk |
|
136 |
||
137 |
# |
|
138 |
# On Windows, some executable objects need to be statically linked against |
|
139 |
# the jli library. Hence, we need both a standard library (archive) and |
|
140 |
# an import library (associated with a dll). These both usually have the |
|
141 |
# extension .LIB, so they need to be placed in different directories. The |
|
142 |
# import library is build (as usual) in the $(OBJDIR) directory while the |
|
143 |
# standard library is built in a "static" subdirectory. The standard library |
|
144 |
# is not delivered as part of the product, but is only needed as part of |
|
145 |
# the build process. The import library is built by the standard rules |
|
146 |
# in Library.gmk. The additional rules which follow build the standard |
|
147 |
# library. |
|
148 |
# |
|
149 |
ifeq ($(PLATFORM), windows) |
|
150 |
||
151 |
STATIC_LIBRARY_DIR = $(OBJDIR)/static |
|
152 |
STATIC_LIBRARY_NAME = $(LIBPREFIX)$(LIBRARY).lib |
|
153 |
STATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME) |
|
154 |
||
155 |
$(STATIC_LIBRARY_DIR): $(OBJDIR) |
|
156 |
@$(MKDIR) $(STATIC_LIBRARY_DIR) |
|
157 |
||
158 |
$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR) |
|
159 |
@$(prep-target) |
|
160 |
$(LIBEXE) -nologo -out:$@ $(FILES_o) |
|
161 |
||
162 |
library:: $(STATIC_LIBRARY) |
|
163 |
||
164 |
endif # PLATFORM |
|
165 |
||
166 |
# |
|
167 |
# Add to ambient vpath so we pick up the library files |
|
168 |
# |
|
169 |
vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC) |