235N/A# Copyright (c) 2004, 2005, Oracle
and/or its affiliates. All rights reserved.
822N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
822N/A# This code is free software; you can redistribute it
and/or modify it
235N/A# under the terms of the GNU General Public License version 2 only, as
1252N/A# published by the Free Software Foundation. Oracle designates this
235N/A# particular file as subject to the "Classpath" exception as provided
235N/A# by Oracle in the LICENSE file that accompanied this code.
919N/A# This code is distributed in the hope that it will be useful, but WITHOUT
919N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
919N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
919N/A# version 2 for more details (a copy is included in the LICENSE file that
919N/A# accompanied this code).
919N/A# You should have received a copy of the GNU General Public License version
919N/A# 2 along with this work; if not, write to the Free Software Foundation,
919N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
919N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
235N/A# Makefile for building simple launchers
970N/A# The PROGRAM and MAIN_CLASS must be defined
1003N/A $(ECHO) "No PROGRAM name defined"
1252N/A $(ECHO) "No MAIN_CLASS name defined"
493N/A# Some tools need the wildcard expansion option
235N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1124N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1252N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1276N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1276N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1276N/Aifeq ($(PROGRAM),appletviewer)
1124N/Aifeq ($(PROGRAM),policytool)
970N/Aifeq ($(PROGRAM),jstack)
970N/Aifeq ($(PROGRAM),jsadebugd)
235N/Aifeq ($(PROGRAM),servertool)
493N/Aifeq ($(PROGRAM),tnameserv)
493N/A ifndef STANDALONE_CORBA_WS
1124N/A# IDLJ_TOOL only uses different source files
1030N/A # SA is currently not available on windows (for any ARCH), or linux-ia64:
235N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JDB_CLASSPATH)'
935N/Aifeq ($(PROGRAM),jconsole)
935N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JCONSOLE_CLASSPATH)'
935N/A ifeq ($(PLATFORM), windows)
935N/A OTHER_CPPFLAGS += -DJAVAW
963N/A ifneq ($(PLATFORM), windows)
963N/A ifneq ($(PLATFORM), macosx)
963N/A # Anything with a GUI needs X11 to be linked in.
235N/A OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11
963N/A# SA tools need special app classpath
963N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(SA_CLASSPATH)'
493N/Aifeq ($(WILDCARDS),true)
1252N/A OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
1252N/A# Always tell native code what the main class is
1252N/AOTHER_CPPFLAGS += -DMAIN_CLASS='"$(MAIN_CLASS)"'
1252N/A# Construct initializer for initial arguments to java
1252N/AALL_ARGS = -J-ms8m $(MAIN_JAVA_ARGS) $(MAIN_CLASS) $(MAIN_ARGS)
1252N/AJAVA_ARGS = { $(ALL_ARGS:%="%",) }
822N/A# Always report launcher info
235N/Adefine printLauncherSetting
493N/Aif [ "$2" != "" ] ; then $(PRINTF) "%-16s %s\n" "$1:" "$2"; fi
1265N/A# Report basic information about this launcher
493N/A @$(ECHO) "========================================================="
235N/A @$(call printLauncherSetting,LAUNCHER,$(PROGRAM))
606N/A @$(call printLauncherSetting,MAIN_CLASS,$(MAIN_CLASS))
606N/A @$(call printLauncherSetting,MAIN_JAVA_ARGS,$(MAIN_JAVA_ARGS))
606N/A @$(call printLauncherSetting,MAIN_ARGS,$(MAIN_ARGS))
606N/A @$(call printLauncherSetting,ALL_ARGS,$(ALL_ARGS))
235N/A @$(ECHO) "========================================================="
599N/A# Rules for building a program