Mercurial > hg > graal-jvmci-8
annotate make/linux/makefiles/saproc.make @ 786:27d660246893
Merge
author | ohair |
---|---|
date | Fri, 15 May 2009 18:14:44 -0700 |
parents | 5d4dd2f5f6a1 f96f285ed3dd |
children | bd02caa94611 |
rev | line source |
---|---|
0 | 1 # |
196 | 2 # Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. |
0 | 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
20 # CA 95054 USA or visit www.sun.com if you need additional information or | |
21 # have any questions. | |
22 # | |
23 # | |
24 | |
25 # Rules to build serviceability agent library, used by vm.make | |
26 | |
27 # libsaproc[_g].so: serviceability agent | |
28 SAPROC = saproc$(G_SUFFIX) | |
29 LIBSAPROC = lib$(SAPROC).so | |
30 | |
31 AGENT_DIR = $(GAMMADIR)/agent | |
32 | |
33 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family) | |
34 | |
35 SASRCFILES = $(SASRCDIR)/salibelf.c \ | |
36 $(SASRCDIR)/symtab.c \ | |
37 $(SASRCDIR)/libproc_impl.c \ | |
38 $(SASRCDIR)/ps_proc.c \ | |
39 $(SASRCDIR)/ps_core.c \ | |
40 $(SASRCDIR)/LinuxDebuggerLocal.c | |
41 | |
42 SAMAPFILE = $(SASRCDIR)/mapfile | |
43 | |
44 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) | |
45 | |
767
5d4dd2f5f6a1
6829575: 100028: Debug information is incomplete or missing
aph
parents:
196
diff
changeset
|
46 # DEBUG_BINARIES overrides everything, use full -g debug information |
5d4dd2f5f6a1
6829575: 100028: Debug information is incomplete or missing
aph
parents:
196
diff
changeset
|
47 ifeq ($(DEBUG_BINARIES), true) |
5d4dd2f5f6a1
6829575: 100028: Debug information is incomplete or missing
aph
parents:
196
diff
changeset
|
48 SA_DEBUG_CFLAGS = -g |
5d4dd2f5f6a1
6829575: 100028: Debug information is incomplete or missing
aph
parents:
196
diff
changeset
|
49 endif |
5d4dd2f5f6a1
6829575: 100028: Debug information is incomplete or missing
aph
parents:
196
diff
changeset
|
50 |
0 | 51 # if $(AGENT_DIR) does not exist, we don't build SA |
52 # also, we don't build SA on Itanium. | |
53 | |
54 checkAndBuildSA: | |
55 $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ | |
56 $(MAKE) -f vm.make $(LIBSAPROC); \ | |
57 fi | |
58 | |
757
f96f285ed3dd
6838154: make/linux/makefiles/sa.make needs hash-style fix
never
parents:
196
diff
changeset
|
59 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE) |
0 | 60 |
61 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) | |
62 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ | |
63 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ | |
64 exit 1; \ | |
65 fi | |
66 @echo Making SA debugger back-end... | |
67 $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \ | |
68 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ | |
69 -I$(SASRCDIR) \ | |
70 -I$(GENERATED) \ | |
71 -I$(BOOT_JAVA_HOME)/include \ | |
72 -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \ | |
73 $(SASRCFILES) \ | |
74 $(SA_LFLAGS) \ | |
767
5d4dd2f5f6a1
6829575: 100028: Debug information is incomplete or missing
aph
parents:
196
diff
changeset
|
75 $(SA_DEBUG_CFLAGS) \ |
0 | 76 -o $@ \ |
77 -lthread_db | |
78 | |
79 install_saproc: checkAndBuildSA | |
80 $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ | |
81 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \ | |
82 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \ | |
83 fi | |
84 | |
85 .PHONY: checkAndBuildSA install_saproc |