0N/A# Copyright 2004-2005 Sun Microsystems, Inc. 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
0N/A# published by the Free Software Foundation. Sun designates this
0N/A# particular file as subject to the "Classpath" exception as provided
0N/A# by Sun 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.
0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
0N/A# CA 95054 USA or visit
www.sun.com if you need additional information or
0N/A# have any questions.
0N/A# Makefile for building simple launchers
0N/A# The PROGRAM and MAIN_CLASS must be defined
0N/A $(ECHO) "No PROGRAM name defined"
0N/A $(ECHO) "No MAIN_CLASS name defined"
0N/A# Some tools need the wildcard expansion option
0N/Aifeq ($(PROGRAM),apt)
0N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
0N/Aifeq ($(PROGRAM),javac)
0N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
0N/Aifeq ($(PROGRAM),javadoc)
0N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
0N/Aifeq ($(PROGRAM),javap)
0N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
0N/Aifeq ($(PROGRAM),javah)
0N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
0N/Aifeq ($(PROGRAM),serialver)
0N/Aifeq ($(PROGRAM),appletviewer)
0N/Aifeq ($(PROGRAM),policytool)
0N/Aifeq ($(PROGRAM),jstack)
0N/Aifeq ($(PROGRAM),jsadebugd)
0N/Aifeq ($(PROGRAM),jinfo)
0N/Aifeq ($(PROGRAM),jmap)
0N/A# special idlj launcher
0N/Aifeq ($(PROGRAM),orbd)
0N/Aifeq ($(PROGRAM),servertool)
0N/Aifeq ($(PROGRAM),tnameserv)
0N/Aifeq ($(PROGRAM),idlj)
0N/A ifndef STANDALONE_CORBA_WS
0N/Aifeq ($(PROGRAM),rmic)
0N/A ifdef STANDALONE_CORBA_WS
0N/A# IDLJ_TOOL only uses different source files
0N/Aifeq ($(IDLJ_TOOL),true)
0N/A ifdef STANDALONE_CORBA_WS
0N/Aifeq ($(PROGRAM),jdb)
0N/A # SA is currently not available on windows (for any ARCH), or linux-ia64:
0N/A ifneq ($(ARCH), ia64)
1777N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JDB_CLASSPATH)'
0N/Aifeq ($(PROGRAM),jconsole)
1777N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JCONSOLE_CLASSPATH)'
0N/A ifeq ($(PLATFORM), windows)
0N/A OTHER_CPPFLAGS += -DJAVAW
0N/Aifeq ($(GUI_TOOL),true)
0N/A ifneq ($(PLATFORM), windows)
0N/A # Anything with a GUI needs X11 to be linked in.
0N/A OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11
0N/A# SA tools need special app classpath
0N/Aifeq ($(SA_TOOL),true)
1777N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(SA_CLASSPATH)'
0N/Aifeq ($(WILDCARDS),true)
0N/A OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
0N/A# Always tell native code what the main class is
1777N/AOTHER_CPPFLAGS += -DMAIN_CLASS='"$(MAIN_CLASS)"'
0N/A# Construct initializer for initial arguments to java
0N/AALL_ARGS = -J-ms8m $(MAIN_JAVA_ARGS) $(MAIN_CLASS) $(MAIN_ARGS)
1777N/AJAVA_ARGS = { $(ALL_ARGS:%="%",) }
0N/A# Always report launcher info
0N/Adefine printLauncherSetting
0N/Aif [ "$2" != "" ] ; then $(PRINTF) "%-16s %s\n" "$1:" "$2"; fi
0N/A# Report basic information about this launcher
0N/A @$(ECHO) "========================================================="
0N/A @$(call printLauncherSetting,LAUNCHER,$(PROGRAM))
0N/A @$(call printLauncherSetting,MAIN_CLASS,$(MAIN_CLASS))
0N/A @$(call printLauncherSetting,MAIN_JAVA_ARGS,$(MAIN_JAVA_ARGS))
0N/A @$(call printLauncherSetting,MAIN_ARGS,$(MAIN_ARGS))
0N/A @$(call printLauncherSetting,ALL_ARGS,$(ALL_ARGS))
0N/A @$(ECHO) "========================================================="
0N/A# Rules for building a program