1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/agent/src/os/solaris/proc/Makefile Sat Dec 01 00:00:00 2007 +0000 1.3 @@ -0,0 +1,80 @@ 1.4 +# 1.5 +# Copyright 2002-2006 Sun Microsystems, Inc. All Rights Reserved. 1.6 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.7 +# 1.8 +# This code is free software; you can redistribute it and/or modify it 1.9 +# under the terms of the GNU General Public License version 2 only, as 1.10 +# published by the Free Software Foundation. 1.11 +# 1.12 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.13 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.14 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.15 +# version 2 for more details (a copy is included in the LICENSE file that 1.16 +# accompanied this code). 1.17 +# 1.18 +# You should have received a copy of the GNU General Public License version 1.19 +# 2 along with this work; if not, write to the Free Software Foundation, 1.20 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.21 +# 1.22 +# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 1.23 +# CA 95054 USA or visit www.sun.com if you need additional information or 1.24 +# have any questions. 1.25 +# 1.26 +# 1.27 + 1.28 +# Targets are: 1.29 +# sparc: Build the 32 bit sparc version in ./sparc 1.30 +# sparcv9: Build the 64 bit sparcv9 version in ./sparcv9 1.31 +# i386: Build the 32 bit i386 version in ./i386 1.32 + 1.33 +.PHONY: sparc sparcv9 i386 1.34 + 1.35 +ARCH_ORIG = $(shell uname -p) 1.36 + 1.37 +C++ := CC 1.38 +RM := /usr/bin/rm 1.39 +MKDIRS := /usr/bin/mkdir -p 1.40 + 1.41 +CLASSES_DIR = ../../../../build/classes 1.42 + 1.43 +ifeq "$(ARCH_ORIG)" "i386" 1.44 + ALL_TARGET = i386 $(filter amd64,$(shell isalist)) 1.45 +else 1.46 + ALL_TARGET = sparc sparcv9 1.47 +endif 1.48 + 1.49 +all:: $(ALL_TARGET) 1.50 + 1.51 +javahomecheck:: 1.52 + @if [ "x$(JAVA_HOME)" = "x" ] ; then \ 1.53 + echo You must set the environment variable JAVA_HOME before executing this Makefile ; \ 1.54 + exit 1 ; \ 1.55 + fi 1.56 + 1.57 +i386:: javahomecheck 1.58 + $(MKDIRS) $@ 1.59 + @javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal 1.60 + CC -G -KPIC -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \ 1.61 + -M mapfile -o $@/libsaproc.so -ldemangle 1.62 + 1.63 +amd64:: javahomecheck 1.64 + $(MKDIRS) $@ 1.65 + @javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal 1.66 + CC -G -KPIC -xarch=amd64 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \ 1.67 + -M mapfile -o $@/libsaproc.so -ldemangle 1.68 + 1.69 +sparc:: javahomecheck 1.70 + $(MKDIRS) $@ 1.71 + @javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal 1.72 + CC -G -KPIC -xarch=v8 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \ 1.73 + -M mapfile -o $@/libsaproc.so -ldemangle 1.74 + 1.75 +sparcv9:: javahomecheck 1.76 + $(MKDIRS) $@ 1.77 + @javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal 1.78 + CC -G -KPIC -xarch=v9 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \ 1.79 + -M mapfile -o $@/libsaproc.so -ldemangle 1.80 + 1.81 +clean:: 1.82 + $(RM) -rf sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal.h 1.83 + $(RM) -rf sparc sparcv9 i386