make/solaris/makefiles/saproc.make

Wed, 15 Dec 2010 05:43:54 -0800

author
stefank
date
Wed, 15 Dec 2010 05:43:54 -0800
changeset 2368
e7ad5f6f4d29
parent 2314
f95d63e2154a
child 2384
0a8e0d4345b3
permissions
-rw-r--r--

7006659: temporary adlc files are added to the build variables
Summary: Don't recurse into sub-directories when looking for source files.
Reviewed-by: never, brutisso

duke@435 1 #
trims@1907 2 # Copyright (c) 2005, 2008, Oracle and/or its affiliates. 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 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # 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
phh@1558 28
phh@1558 29 SAPROC = saproc
duke@435 30 LIBSAPROC = lib$(SAPROC).so
duke@435 31
phh@1558 32 SAPROC_G = $(SAPROC)$(G_SUFFIX)
phh@1558 33 LIBSAPROC_G = lib$(SAPROC_G).so
phh@1558 34
duke@435 35 AGENT_DIR = $(GAMMADIR)/agent
duke@435 36
duke@435 37 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)/proc
duke@435 38
duke@435 39 SASRCFILES = $(SASRCDIR)/saproc.cpp
duke@435 40
duke@435 41 SAMAPFILE = $(SASRCDIR)/mapfile
duke@435 42
duke@435 43 DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
duke@435 44
duke@435 45 # if $(AGENT_DIR) does not exist, we don't build SA
duke@435 46
stefank@2314 47 ifneq ($(wildcard $(AGENT_DIR)),)
stefank@2314 48 BUILDLIBSAPROC = $(LIBSAPROC)
stefank@2314 49 endif
duke@435 50
duke@435 51 SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
duke@435 52
duke@435 53 ifdef USE_GCC
duke@435 54 SA_LFLAGS += -D_REENTRANT
duke@435 55 else
duke@435 56 SA_LFLAGS += -mt -xnolib -norunpath
duke@435 57 endif
duke@435 58
duke@435 59 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
duke@435 60 $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
duke@435 61 echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
duke@435 62 exit 1; \
duke@435 63 fi
duke@435 64 @echo Making SA debugger back-end...
duke@435 65 $(QUIETLY) $(CPP) \
duke@435 66 $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
duke@435 67 -I$(SASRCDIR) \
duke@435 68 -I$(GENERATED) \
duke@435 69 -I$(BOOT_JAVA_HOME)/include \
duke@435 70 -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family) \
duke@435 71 $(SASRCFILES) \
duke@435 72 $(SA_LFLAGS) \
duke@435 73 -o $@ \
duke@435 74 -ldl -ldemangle -lthread -lc
phh@1558 75 [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
duke@435 76
stefank@2314 77 install_saproc: $(BULDLIBSAPROC)
duke@435 78 $(QUIETLY) if [ -f $(LIBSAPROC) ] ; then \
duke@435 79 echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
duke@435 80 cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
duke@435 81 fi
duke@435 82
stefank@2314 83 .PHONY: install_saproc

mercurial