make/linux/makefiles/saproc.make

Tue, 28 Jul 2009 12:12:40 -0700

author
xdono
date
Tue, 28 Jul 2009 12:12:40 -0700
changeset 1279
bd02caa94611
parent 1205
f5ee65f94d9a
child 1445
354d3184f6b2
permissions
-rw-r--r--

6862919: Update copyright year
Summary: Update copyright for files that have been modified in 2009, up to 07/09
Reviewed-by: tbell, ohair

     1 #
     2 # Copyright 2005-2009 Sun Microsystems, Inc.  All Rights Reserved.
     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 #
    25 # Rules to build serviceability agent library, used by vm.make
    27 # libsaproc[_g].so: serviceability agent
    28 SAPROC = saproc$(G_SUFFIX)
    29 LIBSAPROC = lib$(SAPROC).so
    31 AGENT_DIR = $(GAMMADIR)/agent
    33 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)
    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
    42 SAMAPFILE = $(SASRCDIR)/mapfile
    44 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
    46 # DEBUG_BINARIES overrides everything, use full -g debug information
    47 ifeq ($(DEBUG_BINARIES), true)
    48   SA_DEBUG_CFLAGS = -g
    49 endif
    51 # if $(AGENT_DIR) does not exist, we don't build SA
    52 # also, we don't build SA on Itanium.
    54 checkAndBuildSA:
    55 	$(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \
    56 	   $(MAKE) -f vm.make $(LIBSAPROC); \
    57 	fi
    59 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE)) $(LDFLAGS_HASH_STYLE)
    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)                                         \
    75 	           $(SA_DEBUG_CFLAGS)                                   \
    76 	           -o $@                                                \
    77 	           -lthread_db
    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
    85 .PHONY: checkAndBuildSA install_saproc

mercurial