3909N/A# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 2362N/A# published by the Free Software Foundation. Oracle designates this 0N/A# particular file as subject to the "Classpath" exception as provided 2362N/A# by Oracle in the LICENSE file that accompanied this code. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A# JDK Demo building jar file. 0N/A# Some names are defined with LIBRARY inside the Defs.gmk file 0N/A# DEMONAME - name of the demo 0N/A# DEMO_ROOT - path to root of all demo files 0N/A# DEMO_DESTDIR - path to final demo destination directory 0N/A# DEMO_SRCDIR - path to source if different from DEMO_ROOT 0N/A# DEMO_PSRCDIR - path to additional platform specific source 0N/A# DEMO_PKGDIR - sub directory of sources we want 0N/A# DEMO_TOPFILES - names of top-level files relative to DEMO_ROOT 0N/A# DEMO_MAINCLASS - name of the main class for the jar manifest 0N/A# DEMO_NATIVECLASS - name of the class with native methods 0N/A# DEMO_DESCRIPTOR - name of service file for jar (relative to DEMO_SRCDIR) 0N/A# DEMO_EXTRA_SRCDIR - path to directory that holds extra sources to add 0N/A# DEMO_EXTRA_FILES - extra sources relative to DEMO_EXTRA_SRCDIR 0N/A# DEMO_OBJECTS - extra native object files needed 0N/A# DEMO_MANIFEST_ATTR - extra line to add to the jar manifest file 0N/A# Assume the source directory is the root directory if not set 0N/A# Some demos have special needs 0N/A# Place to hold the build area (kind of a temp area) 0N/A# Destination "src" directory 0N/A# Place to hold the jar image we are creating 0N/A# The jar manifest file we will create and use 0N/A# The list of source files or options we will supply to javac 0N/A# Any name of javah file 0N/A# Get complete list of files for this demo 0N/A# Just the java sources 0N/A# Just the C and C++ sources 0N/A# All the native source files 0N/A# If we have java sources, then define the jar file we will create 0N/A# If we have native sources, define the native library we will create 0N/A # Path to native library we will create 0N/A # C and C++ compiler flags we need to add to standard flags 0N/A # If the npt library is used we need to find the npt.h file 0N/A # The npt library is delivered as part of the JRE 0N/A # Is the shared agent_util code needed 0N/A # Is the shared java_crw_demo code needed 0N/A # All the native object files we need to build the library 0N/A # Linking is special depending on whether we had C++ code or on windows 0N/A# Files that are considered resources (need to be in the jar file) 0N/A# All destination files (top level readme files and all sources) 0N/A# Note: We exclude the topfiles from the src tree. 0N/A# Used to populate the destination directories 0N/A# Populating the jar image directory 0N/A# If we are creating a jar file (we have java code) 0N/A# Input file for javac 3373N/A # Install the destination src.zip file and create the src tree 0N/A# Native library building 0N/A # Full paths to object files 0N/A# Native compile rules 0N/A # Actual creation of the native shared library (C++ and C are different) 0N/A # Generation of any javah include file, make sure objects are dependent on it 0N/A# Build involves populating the destination "src" tree, building the jar and 0N/A# native library, and creating a source bundle 0N/A# Why the nested make here? It only works this way, don't know why. 0N/A# Applets are special, no jar file, no src.zip, everything expanded. 0N/A# Printing out a demo information line 0N/Aif [
"$2" !=
"" ] ;
then $(PRINTF) "%-20s %s\n" "$1:" "$2";
fi 0N/A# Print out the demo information 0N/A @
$(ECHO) "=========================================================" 0N/A @
$(ECHO) "=========================================================" 3373N/A# This should not be needed, but some versions of GNU make have a bug that 0N/A# sometimes deleted these files for some strange and unknown reason 0N/A# (GNU make version 3.78.1 has the problem, GNU make version 3.80 doesn't?)