1040N/A# Copyright (c) 2004, 2005, Oracle
and/or its affiliates. All rights reserved.
1040N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1040N/A# This code is free software; you can redistribute it
and/or modify it
1040N/A# under the terms of the GNU General Public License version 2 only, as
1040N/A# published by the Free Software Foundation. Oracle designates this
1040N/A# particular file as subject to the "Classpath" exception as provided
1040N/A# by Oracle in the LICENSE file that accompanied this code.
1040N/A# This code is distributed in the hope that it will be useful, but WITHOUT
1040N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1040N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1040N/A# version 2 for more details (a copy is included in the LICENSE file that
1040N/A# You should have received a copy of the GNU General Public License version
1040N/A# 2 along with this work; if not, write to the Free Software Foundation,
1040N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1040N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1040N/A# Makefile for building simple launchers
1040N/APROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS=1
# 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)
ifneq ($(PLATFORM), macosx)
# 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