2362N/A# Copyright (c) 2004, 2005, 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# Makefile for building simple launchers
# The PROGRAM and MAIN_CLASS must be defined
$(ECHO) "No PROGRAM name defined"
$(ECHO) "No MAIN_CLASS name defined"
# Some tools need the wildcard expansion option
NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
ifeq ($(PROGRAM),javadoc)
NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
ifeq ($(PROGRAM),serialver)
ifeq ($(PROGRAM),appletviewer)
ifeq ($(PROGRAM),policytool)
ifeq ($(PROGRAM),jsadebugd)
ifeq ($(PROGRAM),servertool)
ifeq ($(PROGRAM),tnameserv)
ifndef STANDALONE_CORBA_WS
ifdef STANDALONE_CORBA_WS
# IDLJ_TOOL only uses different source files
ifdef STANDALONE_CORBA_WS
# Override the default APP_CLASSPATH to pick up
sa-jdi.jar also.
# SA is currently not available on windows (for any ARCH), or linux-ia64:
OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JDB_CLASSPATH)'
ifeq ($(PROGRAM),jconsole)
OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JCONSOLE_CLASSPATH)'
ifeq ($(PLATFORM), windows)
OTHER_CPPFLAGS += -DJAVAW
ifneq ($(PLATFORM), windows)
# Anything with a GUI needs X11 to be linked in.
OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11
# SA tools need special app classpath
OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(SA_CLASSPATH)'
OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
# Always tell native code what the main class is
OTHER_CPPFLAGS += -DMAIN_CLASS='"$(MAIN_CLASS)"'
# Construct initializer for initial arguments to java
ALL_ARGS = -J-ms8m $(MAIN_JAVA_ARGS) $(MAIN_CLASS) $(MAIN_ARGS)
JAVA_ARGS = { $(ALL_ARGS:%="%",) }
# Always report launcher info
define printLauncherSetting
if [ "$2" != "" ] ; then $(PRINTF) "%-16s %s\n" "$1:" "$2"; fi
# Report basic information about this launcher
@$(ECHO) "========================================================="
@$(call printLauncherSetting,LAUNCHER,$(PROGRAM))
@$(call printLauncherSetting,MAIN_CLASS,$(MAIN_CLASS))
@$(call printLauncherSetting,MAIN_JAVA_ARGS,$(MAIN_JAVA_ARGS))
@$(call printLauncherSetting,MAIN_ARGS,$(MAIN_ARGS))
@$(call printLauncherSetting,ALL_ARGS,$(ALL_ARGS))
@$(ECHO) "========================================================="
# Rules for building a program