view test/tools/launcher/Makefile.SolarisRunpath @ 2593:f7a69b261b1d

6960394: Stop linking with -lnsl on Linux Summary: Define LIBNSL (like LIBSOCKET), non-empty only on Solaris Reviewed-by: ohair
author martin
date Thu, 10 Jun 2010 15:54:25 -0700
parents 37a05a11f281
line wrap: on
line source
# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit if you need additional information or have any
# questions.


# This is a not quite automated Makefile to generate the Solaris
# binaries used for the test.  First,
# program must be compiled.  Next, javah is called
# on the class file to generate the needed header file for the jni
# code.  Then, 2 Solaris executables are generated in separate
# directories, a default one meant to be pointed to by LD_LIBRARY_PATH
# (this function returns 0) and another one for the data model
# specific LD_LIBRARY_PATH (this function returns the size of integers
# in the data model, 32 or 64).  A better makefile would run, say
# isainfo -v, and generated binaries for all supported data models.
# To do this a mapping would be needed from data models to
# architecture dependent compiler options; e.g. 64 bit on sparc =>
# -xarch=v9.  Also, the settings for JINCLUDE, JAVAC, and JAVAH should
# come from the current build.  The C compiler should be the one
# approved for the build.  To be extra safe, the binaries should be
# generated on the oldest Solaris release supported by the current
# Java build.

# Include directory in JRE or JDK install; e.g.

# Path to javac executable; e.g.

# Path to javah executable; e.g.

# Path to C compiler; e.g.

ARCH=`uname -p`

# 32-bit Solaris Options
# Default architecture is fine for both sparc and x86 32-bit builds

# 64-bit Solaris Options

all: libraryCaller.c
	$(JAVAC);					\
	$(JAVAH) libraryCaller;						\
		$(OPTIONS) libraryCaller.c 				\
		-o lib/$(ARCH)/lib$(DM)/;			\
		$(OPTIONS) libraryCaller.c 				\
		-o lib/$(ARCH)/lib$(DM)/lib$(DM)/;