author | never |
Fri, 09 Mar 2012 08:34:36 -0800 | |
changeset 12109 | e63abe40a95c |
parent 11361 | daa4d069c514 |
child 12047 | 320a714614e9 |
permissions | -rw-r--r-- |
2 | 1 |
# |
8796
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8583
diff
changeset
|
2 |
# Copyright (c) 2003, 2011, 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 |
# Makefile for building the Java Programming Language Instrumentation Services |
|
27 |
# agent, supporting java.lang.instrument |
|
28 |
||
29 |
BUILDDIR = ../.. |
|
30 |
PACKAGE = sun.instrument |
|
31 |
LIBRARY = instrument |
|
32 |
PRODUCT = sun |
|
33 |
||
34 |
# Configure the CFLAGS for this library. Use static binding so that there |
|
35 |
# are not dependencies on modules not on the search patch when invoked from |
|
36 |
# the Windows system directory (or elsewhere). |
|
37 |
MS_RUNTIME_STATIC=true |
|
38 |
||
39 |
FILES_m = mapfile-vers |
|
40 |
||
11361
daa4d069c514
7122061: add -Xlint:all -Werror to warning-free build steps
smarks
parents:
8796
diff
changeset
|
41 |
JAVAC_MAX_WARNINGS = true |
daa4d069c514
7122061: add -Xlint:all -Werror to warning-free build steps
smarks
parents:
8796
diff
changeset
|
42 |
JAVAC_WARNINGS_FATAL = true |
daa4d069c514
7122061: add -Xlint:all -Werror to warning-free build steps
smarks
parents:
8796
diff
changeset
|
43 |
|
2 | 44 |
include $(BUILDDIR)/common/Defs.gmk |
45 |
||
46 |
# Use the mapfile-vers (See the mapfile located with this Makefile) |
|
47 |
ifdef FILES_m |
|
48 |
include $(BUILDDIR)/common/Mapfile-vers.gmk |
|
49 |
endif |
|
50 |
||
51 |
# |
|
52 |
# Files to compile. |
|
53 |
# |
|
54 |
FILES_c = \ |
|
55 |
EncodingSupport.c \ |
|
56 |
EncodingSupport_md.c \ |
|
57 |
FileSystemSupport_md.c \ |
|
58 |
InstrumentationImplNativeMethods.c \ |
|
59 |
InvocationAdapter.c \ |
|
60 |
JarFacade.c \ |
|
61 |
JPLISAgent.c \ |
|
62 |
JPLISAssert.c \ |
|
63 |
JavaExceptions.c \ |
|
64 |
PathCharsValidator.c \ |
|
65 |
Reentrancy.c \ |
|
66 |
Utilities.c |
|
67 |
||
68 |
# |
|
69 |
# -jaragent support requires zip and jar manfiest parser to be compiled |
|
70 |
# into the instrument library. |
|
71 |
# |
|
72 |
IO_PLATFORM_SRC = $(PLATFORM_SRC)/native/java/io |
|
73 |
LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin |
|
74 |
LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin |
|
75 |
||
76 |
FILES_c += \ |
|
77 |
canonicalize_md.c |
|
78 |
||
79 |
FILES_export = \ |
|
80 |
sun/instrument/InstrumentationImpl.java |
|
81 |
||
82 |
# |
|
83 |
# This controls the ability to do logging in the library. |
|
84 |
# |
|
85 |
CPPFLAGS_DBG += -DJPLIS_LOGGING |
|
86 |
CPPFLAGS_OPT += -DNO_JPLIS_LOGGING |
|
87 |
||
88 |
OTHER_INCLUDES = -I$(SHARE_SRC)/instrument |
|
89 |
OTHER_INCLUDES += -I$(PLATFORM_SRC)/instrument |
|
90 |
OTHER_INCLUDES += -I$(IO_PLATFORM_SRC) |
|
91 |
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) -I$(LAUNCHER_PLATFORM_SRC) |
|
92 |
||
93 |
# |
|
94 |
# Create a dependency on libjli (Java Launcher Infrastructure) |
|
95 |
# |
|
96 |
# On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to |
|
97 |
# do this reliably on Linux takes a different syntax than Solaris. |
|
98 |
# |
|
99 |
# On Windows, this is done by using the same directory as the executable |
|
100 |
# itself, as with all the Windows libraries. |
|
101 |
# |
|
102 |
ifeq ($(PLATFORM), windows) |
|
103 |
OTHER_LDLIBS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/jli.lib |
|
104 |
OTHER_LCF += -export:Agent_OnAttach |
|
105 |
# equivalent of strcasecmp is stricmp on Windows |
|
106 |
CPPFLAGS_COMMON += -Dstrcasecmp=stricmp |
|
107 |
else |
|
108 |
LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli |
|
109 |
OTHER_LDLIBS += -ljli |
|
110 |
OTHER_LDLIBS += -ldl |
|
111 |
ifeq ($(PLATFORM), solaris) |
|
112 |
LDFLAGS += -R \$$ORIGIN/jli |
|
113 |
endif |
|
114 |
ifeq ($(PLATFORM), linux) |
|
8796
604a43386301
7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents:
8583
diff
changeset
|
115 |
LDFLAGS += $(LDFLAG_Z_ORIGIN) |
2 | 116 |
LDFLAGS += -Wl,--allow-shlib-undefined |
117 |
LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli |
|
118 |
endif |
|
119 |
endif |
|
120 |
||
121 |
# |
|
122 |
# Library to compile. |
|
123 |
# |
|
124 |
include $(BUILDDIR)/common/Library.gmk |
|
125 |
||
126 |
# We don't want to link against -ljava |
|
127 |
JAVALIB= |
|
128 |
||
129 |
# |
|
130 |
# Add to ambient vpath so we pick up the library files |
|
131 |
# |
|
132 |
vpath %.c $(SHARE_SRC)/instrument $(PLATFORM_SRC)/instrument |
|
133 |
vpath %.c $(IO_PLATFORM_SRC) |
|
134 |