Mercurial > hg > truffle
annotate make/bsd/makefiles/saproc.make @ 8552:31b7a648b4b3
turn inlining hints into a map
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Mon, 25 Mar 2013 11:06:45 +0100 |
parents | 892acf0431ef |
children | 39432a1cefdd |
rev | line source |
---|---|
3960 | 1 # |
6782 | 2 # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
3960 | 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. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 # or visit www.oracle.com if you need additional information or have any | |
21 # questions. | |
22 # | |
23 # | |
24 | |
25 # Rules to build serviceability agent library, used by vm.make | |
26 | |
7408
892acf0431ef
7153050: remove crufty '_g' support from HotSpot repo makefiles
dcubed
parents:
6782
diff
changeset
|
27 # libsaproc.so: serviceability agent |
3960 | 28 SAPROC = saproc |
29 | |
30 ifeq ($(OS_VENDOR), Darwin) | |
31 LIBSAPROC = lib$(SAPROC).dylib | |
32 else | |
33 LIBSAPROC = lib$(SAPROC).so | |
34 endif | |
35 | |
36 AGENT_DIR = $(GAMMADIR)/agent | |
37 | |
38 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) | |
39 | |
6782 | 40 NON_STUB_SASRCFILES = $(SASRCDIR)/salibelf.c \ |
41 $(SASRCDIR)/symtab.c \ | |
42 $(SASRCDIR)/libproc_impl.c \ | |
43 $(SASRCDIR)/ps_proc.c \ | |
44 $(SASRCDIR)/ps_core.c \ | |
45 $(SASRCDIR)/BsdDebuggerLocal.c \ | |
46 $(AGENT_DIR)/src/share/native/sadis.c | |
4006 | 47 |
48 ifeq ($(OS_VENDOR), FreeBSD) | |
49 SASRCFILES = $(NON_STUB_SASRCFILES) | |
50 SALIBS = -lutil -lthread_db | |
51 SAARCH = $(ARCHFLAG) | |
52 else | |
53 ifeq ($(OS_VENDOR), Darwin) | |
54 SASRCFILES = $(SASRCDIR)/MacosxDebuggerLocal.m | |
55 SALIBS = -g -framework Foundation -F/System/Library/Frameworks/JavaVM.framework/Frameworks -framework JavaNativeFoundation -framework Security -framework CoreFoundation | |
56 #objc compiler blows up on -march=i586, perhaps it should not be included in the macosx intel 32-bit C++ compiles? | |
57 SAARCH = $(subst -march=i586,,$(ARCHFLAG)) | |
58 else | |
59 SASRCFILES = $(SASRCDIR)/StubDebuggerLocal.c | |
60 SALIBS = | |
61 SAARCH = $(ARCHFLAG) | |
62 endif | |
63 endif | |
3960 | 64 |
65 SAMAPFILE = $(SASRCDIR)/mapfile | |
66 | |
67 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) | |
68 | |
69 # DEBUG_BINARIES overrides everything, use full -g debug information | |
70 ifeq ($(DEBUG_BINARIES), true) | |
71 SA_DEBUG_CFLAGS = -g | |
72 endif | |
73 | |
74 # if $(AGENT_DIR) does not exist, we don't build SA | |
75 # also, we don't build SA on Itanium, PPC, ARM or zero. | |
76 | |
77 ifneq ($(wildcard $(AGENT_DIR)),) | |
78 ifneq ($(filter-out ia64 arm ppc zero,$(SRCARCH)),) | |
79 BUILDLIBSAPROC = $(LIBSAPROC) | |
80 endif | |
81 endif | |
82 | |
83 | |
84 ifneq ($(OS_VENDOR), Darwin) | |
85 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) | |
86 endif | |
87 SA_LFLAGS += $(LDFLAGS_HASH_STYLE) | |
88 | |
4006 | 89 ifeq ($(OS_VENDOR), Darwin) |
90 BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ | |
91 -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") \ | |
92 -I/System/Library/Frameworks/JavaVM.framework/Headers | |
93 else | |
94 BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \ | |
95 -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]") | |
96 endif | |
97 | |
3960 | 98 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) |
99 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ | |
100 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ | |
101 exit 1; \ | |
102 fi | |
103 @echo Making SA debugger back-end... | |
104 $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ | |
4006 | 105 $(SYMFLAG) $(SAARCH) $(SHARED_FLAG) $(PICFLAG) \ |
3960 | 106 -I$(SASRCDIR) \ |
107 -I$(GENERATED) \ | |
4006 | 108 $(BOOT_JAVA_INCLUDES) \ |
3960 | 109 $(SASRCFILES) \ |
110 $(SA_LFLAGS) \ | |
111 $(SA_DEBUG_CFLAGS) \ | |
112 -o $@ \ | |
113 $(SALIBS) | |
114 | |
115 install_saproc: $(BUILDLIBSAPROC) | |
116 $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ | |
117 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ | |
118 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ | |
119 fi | |
120 | |
121 .PHONY: install_saproc |