make/linux/makefiles/saproc.make

Tue, 13 Oct 2009 12:04:21 -0700

author
never
date
Tue, 13 Oct 2009 12:04:21 -0700
changeset 1445
354d3184f6b2
parent 1279
bd02caa94611
child 1558
167c2986d91b
permissions
-rw-r--r--

6890308: integrate zero assembler hotspot changes
Reviewed-by: never
Contributed-by: gbenson@redhat.com

duke@435 1 #
xdono@1279 2 # Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
duke@435 19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@435 20 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@435 21 # have any questions.
duke@435 22 #
duke@435 23 #
duke@435 24
duke@435 25 # Rules to build serviceability agent library, used by vm.make
duke@435 26
duke@435 27 # libsaproc[_g].so: serviceability agent
duke@435 28 SAPROC = saproc$(G_SUFFIX)
duke@435 29 LIBSAPROC = lib$(SAPROC).so
duke@435 30
duke@435 31 AGENT_DIR = $(GAMMADIR)/agent
duke@435 32
duke@435 33 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)
duke@435 34
duke@435 35 SASRCFILES = $(SASRCDIR)/salibelf.c \
duke@435 36 $(SASRCDIR)/symtab.c \
duke@435 37 $(SASRCDIR)/libproc_impl.c \
duke@435 38 $(SASRCDIR)/ps_proc.c \
duke@435 39 $(SASRCDIR)/ps_core.c \
duke@435 40 $(SASRCDIR)/LinuxDebuggerLocal.c
duke@435 41
duke@435 42 SAMAPFILE = $(SASRCDIR)/mapfile
duke@435 43
duke@435 44 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
duke@435 45
aph@1202 46 # DEBUG_BINARIES overrides everything, use full -g debug information
aph@1202 47 ifeq ($(DEBUG_BINARIES), true)
aph@1202 48 SA_DEBUG_CFLAGS = -g
aph@1202 49 endif
aph@1202 50
duke@435 51 # if $(AGENT_DIR) does not exist, we don't build SA
never@1445 52 # also, we don't build SA on Itanium or zero.
duke@435 53
duke@435 54 checkAndBuildSA:
never@1445 55 $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \
duke@435 56 $(MAKE) -f vm.make $(LIBSAPROC); \
duke@435 57 fi
duke@435 58
never@1192 59 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
duke@435 60
duke@435 61 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
duke@435 62 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
duke@435 63 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
duke@435 64 exit 1; \
duke@435 65 fi
duke@435 66 @echo Making SA debugger back-end...
duke@435 67 $(QUIETLY) $(CC) -D$(BUILDARCH) -D_GNU_SOURCE \
duke@435 68 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
duke@435 69 -I$(SASRCDIR) \
duke@435 70 -I$(GENERATED) \
duke@435 71 -I$(BOOT_JAVA_HOME)/include \
duke@435 72 -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
duke@435 73 $(SASRCFILES) \
duke@435 74 $(SA_LFLAGS) \
aph@1202 75 $(SA_DEBUG_CFLAGS) \
duke@435 76 -o $@ \
duke@435 77 -lthread_db
duke@435 78
duke@435 79 install_saproc: checkAndBuildSA
duke@435 80 $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
duke@435 81 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
duke@435 82 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
duke@435 83 fi
duke@435 84
duke@435 85 .PHONY: checkAndBuildSA install_saproc

mercurial