Makefile.launcher revision 4825
235N/A#
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#
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#
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#
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#
919N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
919N/A# or visit www.oracle.com if you need additional information or have any
919N/A# questions.
919N/A#
919N/A
919N/A#
235N/A# Makefile for building simple launchers
235N/A#
235N/A
822N/ABUILDDIR = ..
235N/APACKAGE = launcher
970N/APRODUCT = sun
970N/Ainclude $(BUILDDIR)/common/Defs.gmk
970N/A
970N/A# The PROGRAM and MAIN_CLASS must be defined
970N/Aifndef PROGRAM
970N/A build: no_program
970N/A no_program:
1003N/A $(ECHO) "No PROGRAM name defined"
970N/A exit 1
235N/Aendif
1252N/Aifndef MAIN_CLASS
235N/A build: no_main
911N/A no_main:
1252N/A $(ECHO) "No MAIN_CLASS name defined"
1252N/A exit 1
911N/Aendif
235N/A
493N/A# Some tools need the wildcard expansion option
493N/Aifeq ($(PROGRAM),apt)
235N/A WILDCARDS=true
235N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
235N/Aendif
235N/Aifeq ($(PROGRAM),javac)
822N/A WILDCARDS=true
235N/A MAIN_JAVA_ARGS += -J-Xss4m -J-ea:com.sun.tools...
1124N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1124N/Aendif
1124N/Aifeq ($(PROGRAM),javadoc)
235N/A WILDCARDS=true
1252N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
235N/Aendif
235N/Aifeq ($(PROGRAM),javap)
235N/A WILDCARDS=true
1276N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1276N/Aendif
1276N/Aifeq ($(PROGRAM),javah)
1276N/A WILDCARDS=true
1276N/A NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
1276N/Aendif
1276N/Aifeq ($(PROGRAM),serialver)
1276N/A WILDCARDS=true
1276N/Aendif
1276N/A
1276N/A# GUI tools need X11
1276N/Aifeq ($(PROGRAM),appletviewer)
235N/A GUI_TOOL=true
1124N/Aendif
1124N/Aifeq ($(PROGRAM),policytool)
1124N/A GUI_TOOL=true
970N/Aendif
970N/A
970N/A# SA tools
970N/Aifeq ($(PROGRAM),jstack)
970N/A SA_TOOL=true
970N/Aendif
970N/Aifeq ($(PROGRAM),jsadebugd)
947N/A SA_TOOL=true
235N/A INFO_PLIST_FILE=Info-privileged.plist
247N/Aendif
947N/Aifeq ($(PROGRAM),jinfo)
235N/A SA_TOOL=true
247N/A INFO_PLIST_FILE=Info-privileged.plist
947N/Aendif
947N/Aifeq ($(PROGRAM),jmap)
970N/A SA_TOOL=true
970N/A INFO_PLIST_FILE=Info-privileged.plist
947N/Aendif
947N/A
947N/A# special idlj launcher
947N/Aifeq ($(PROGRAM),orbd)
947N/A IDLJ_TOOL=true
947N/Aendif
235N/Aifeq ($(PROGRAM),servertool)
241N/A IDLJ_TOOL=true
493N/Aendif
493N/Aifeq ($(PROGRAM),tnameserv)
235N/A IDLJ_TOOL=true
1270N/Aendif
1270N/A
1270N/A# idlj itself only
1270N/Aifeq ($(PROGRAM),idlj)
493N/A ifndef STANDALONE_CORBA_WS
493N/A FILES_c = $(SHARE_SRC)/native/bin/$(PROGRAM).c \
1124N/A $(SHARE_SRC)/native/bin/utility.c
963N/A endif
1124N/Aendif
1124N/A
1097N/A# rmic only
493N/Aifeq ($(PROGRAM),rmic)
1097N/A ifdef STANDALONE_CORBA_WS
1097N/A FILES_c = $(SHARE_SRC)/native/bin/$(PROGRAM).c \
493N/A $(SHARE_SRC)/native/bin/utility.c
235N/A endif
1124N/A WILDCARDS=true
1124N/Aendif
1124N/A
1124N/A# IDLJ_TOOL only uses different source files
1124N/Aifeq ($(IDLJ_TOOL),true)
1124N/A ifdef STANDALONE_CORBA_WS
1124N/A FILES_c = $(SHARE_SRC)/native/bin/idlj.c \
1124N/A $(SHARE_SRC)/native/bin/utility.c
1124N/A endif
1124N/Aendif
970N/A
970N/A# jdb only
970N/Aifeq ($(PROGRAM),jdb)
1097N/A # Override the default APP_CLASSPATH to pick up sa-jdi.jar also.
1097N/A # Default is defined in src/[solaris,windows]/bin/java_md.h
1097N/A # PROGRAM, JAVA_ARGS, and APP_CLASSPATH are used in src/share/bin/java.c
1030N/A # SA is currently not available on windows (for any ARCH), or linux-ia64:
822N/A ifneq ($(ARCH), ia64)
235N/A JDB_CLASSPATH = { "/lib/tools.jar", "/lib/sa-jdi.jar", "/classes" }
235N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JDB_CLASSPATH)'
822N/A endif
822N/Aendif
963N/A
963N/A# jconsole only
935N/Aifeq ($(PROGRAM),jconsole)
935N/A JCONSOLE_CLASSPATH = { "/lib/jconsole.jar", "/lib/tools.jar", "/classes" }
935N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(JCONSOLE_CLASSPATH)'
935N/A ifeq ($(PLATFORM), windows)
935N/A OTHER_CPPFLAGS += -DJAVAW
1088N/A LDLIBS_COMMON += user32.lib
235N/A MAIN_JAVA_ARGS += -J-Djconsole.showOutputViewer
935N/A endif
963N/Aendif
963N/A
935N/A# GUI tools
963N/Aifeq ($(GUI_TOOL),true)
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 endif
235N/A endif
935N/Aendif
935N/A
963N/A# SA tools need special app classpath
963N/Aifeq ($(SA_TOOL),true)
935N/A SA_CLASSPATH = { "/lib/tools.jar", "/lib/sa-jdi.jar", "/classes" }
963N/A OTHER_CPPFLAGS += -DAPP_CLASSPATH='$(SA_CLASSPATH)'
963N/Aendif
963N/A
235N/A# Wildcards
493N/Aifeq ($(WILDCARDS),true)
1252N/A OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
1252N/Aendif
1252N/A
1252N/A# Always tell native code what the main class is
1252N/AOTHER_CPPFLAGS += -DMAIN_CLASS='"$(MAIN_CLASS)"'
1252N/A
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:%="%",) }
1252N/A
822N/A# Always report launcher info
493N/Abuild: launcher_info
822N/A
241N/A# Print info macro
235N/Adefine printLauncherSetting
493N/Aif [ "$2" != "" ] ; then $(PRINTF) "%-16s %s\n" "$1:" "$2"; fi
235N/Aendef
1265N/A
1265N/A# Report basic information about this launcher
1265N/Alauncher_info:
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) "========================================================="
922N/A
235N/A#
599N/A# Rules for building a program
1124N/A#
235N/Ainclude $(BUILDDIR)/common/Program.gmk
822N/A
1147N/A