jdk/test/tools/launcher/Makefile.SolarisRunpath
author mikejwre
Thu, 03 Dec 2009 12:52:46 -0800
changeset 4400 6f7b7cb74a72
parent 2 90ce3da70b43
child 5506 202f599c92aa
permissions -rw-r--r--
Added tag jdk7-b77 for changeset a9713976af74
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
# Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
# This is a not quite automated Makefile to generate the Solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
# binaries used for the SolarisRunpath.sh test.  First,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
# libraryCaller.java program must be compiled.  Next, javah is called
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# on the class file to generate the needed header file for the jni
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# code.  Then, 2 Solaris executables are generated in separate
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
# directories, a default one meant to be pointed to by LD_LIBRARY_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# (this function returns 0) and another one for the data model
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
# specific LD_LIBRARY_PATH (this function returns the size of integers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
# in the data model, 32 or 64).  A better makefile would run, say
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
# isainfo -v, and generated binaries for all supported data models.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
# To do this a mapping would be needed from data models to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# architecture dependent compiler options; e.g. 64 bit on sparc =>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
# -xarch=v9.  Also, the settings for JINCLUDE, JAVAC, and JAVAH should
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
# come from the current build.  The C compiler should be the one
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
# approved for the build.  To be extra safe, the binaries should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
# generated on the oldest Solaris release supported by the current
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
# Java build.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
# Include directory in JRE or JDK install; e.g.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
JINCLUDE=/java/re/jdk/1.4.1/latest/binaries/solaris-sparc/include
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
# Path to javac executable; e.g.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
JAVAC=/java/re/jdk/1.4.1/promoted/fcs/b21/binaries/solaris-sparc/bin/javac
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
# Path to javah executable; e.g.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
JAVAH=/java/re/jdk/1.4.1/promoted/fcs/b21/binaries/solaris-sparc/bin/javah
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
# Path to C compiler; e.g.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
CC=/java/devtools/sparc/SUNWspro/SC6.1/bin/cc
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
ARCH=`uname -p`
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
# 32-bit Solaris Options
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
DM=32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
# Default architecture is fine for both sparc and x86 32-bit builds
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
OPTIONS=
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
# 64-bit Solaris Options
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
#DM=64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
#OPTIONS=-xarch=v9
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
all: libraryCaller.java libraryCaller.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
	$(JAVAC) libraryCaller.java;					\
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
	$(JAVAH) libraryCaller;						\
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
	$(CC) -G -I$(JINCLUDE) -I$(JINCLUDE)/solaris -DRETURN_VALUE=0 	\
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
		$(OPTIONS) libraryCaller.c 				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
		-o lib/$(ARCH)/lib$(DM)/liblibrary.so;			\
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
	$(CC) -G -I$(JINCLUDE) -I$(JINCLUDE)/solaris -DRETURN_VALUE=$(DM)\
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
		$(OPTIONS) libraryCaller.c 				\
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
		-o lib/$(ARCH)/lib$(DM)/lib$(DM)/liblibrary.so;