jdk/make/launchers/Makefile.launcher
author chegar
Wed, 12 Nov 2008 16:38:17 +0000
changeset 1576 b697b141012d
parent 2 90ce3da70b43
child 4116 54b55d640d9a
permissions -rw-r--r--
6755625: Add HttpURLConnection.setFixedLengthStreamingMode(long) Reviewed-by: jccollet
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
# Copyright 2004-2005 Sun Microsystems, Inc.  All Rights Reserved.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Makefile for building simple launchers
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
BUILDDIR = ..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
PACKAGE = launcher
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
PRODUCT = sun
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
# The PROGRAM and MAIN_CLASS must be defined
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
ifndef PROGRAM
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
  build: no_program
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
  no_program:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
	$(ECHO) "No PROGRAM name defined"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
	exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
ifndef MAIN_CLASS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
  build: no_main
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
  no_main:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
	$(ECHO) "No MAIN_CLASS name defined"
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
	exit 1
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
# Some tools need the wildcard expansion option
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
ifeq ($(PROGRAM),apt)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
  WILDCARDS=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
  NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
ifeq ($(PROGRAM),javac)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
  WILDCARDS=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
  MAIN_JAVA_ARGS += -J-Xss4m -J-ea:com.sun.tools...
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
  NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
ifeq ($(PROGRAM),javadoc)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
  WILDCARDS=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
  NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
ifeq ($(PROGRAM),javap)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
  WILDCARDS=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
  NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
ifeq ($(PROGRAM),javah)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
  WILDCARDS=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
  NEVER_ACT_AS_SERVER_CLASS_MACHINE=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
ifeq ($(PROGRAM),serialver)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
  WILDCARDS=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
# GUI tools need X11
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
ifeq ($(PROGRAM),appletviewer)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
  GUI_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
ifeq ($(PROGRAM),policytool)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
  GUI_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
# SA tools
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
ifeq ($(PROGRAM),jstack)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
  SA_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
ifeq ($(PROGRAM),jsadebugd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
  SA_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
ifeq ($(PROGRAM),jinfo)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
  SA_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
ifeq ($(PROGRAM),jmap)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
  SA_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
# special idlj launcher
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
ifeq ($(PROGRAM),orbd)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
  IDLJ_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
ifeq ($(PROGRAM),servertool)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
  IDLJ_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
ifeq ($(PROGRAM),tnameserv)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
  IDLJ_TOOL=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
# idlj itself only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
ifeq ($(PROGRAM),idlj)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
  ifndef STANDALONE_CORBA_WS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
    FILES_c = $(SHARE_SRC)/native/bin/$(PROGRAM).c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
	      $(SHARE_SRC)/native/bin/utility.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
# rmic only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
ifeq ($(PROGRAM),rmic)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
  ifdef STANDALONE_CORBA_WS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
    FILES_c = $(SHARE_SRC)/native/bin/$(PROGRAM).c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
	      $(SHARE_SRC)/native/bin/utility.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
  WILDCARDS=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
# IDLJ_TOOL only uses different source files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
ifeq ($(IDLJ_TOOL),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
  ifdef STANDALONE_CORBA_WS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
    FILES_c = $(SHARE_SRC)/native/bin/idlj.c  \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
	      $(SHARE_SRC)/native/bin/utility.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
# jdb only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
ifeq ($(PROGRAM),jdb)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
  # Override the default APP_CLASSPATH to pick up sa-jdi.jar also.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
  #   Default is defined in src/[solaris,windows]/bin/java_md.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
  #   PROGRAM, JAVA_ARGS, and APP_CLASSPATH are used in src/share/bin/java.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
  #   SA is currently not available on windows (for any ARCH), or linux-ia64:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
  ifneq ($(ARCH), ia64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
    JDB_CLASSPATH = "{ \"/lib/tools.jar\", \"/lib/sa-jdi.jar\", \"/classes\" }"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
    OTHER_CPPFLAGS += -DAPP_CLASSPATH=$(JDB_CLASSPATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
# jconsole only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
ifeq ($(PROGRAM),jconsole)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
  JCONSOLE_CLASSPATH = "{ \"/lib/jconsole.jar\", \"/lib/tools.jar\", \"/classes\" }"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
  OTHER_CPPFLAGS += -DAPP_CLASSPATH=$(JCONSOLE_CLASSPATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
  ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
    OTHER_CPPFLAGS += -DJAVAW
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
    LDLIBS_COMMON  += user32.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
    MAIN_JAVA_ARGS += -J-Djconsole.showOutputViewer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
# GUI tools
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
ifeq ($(GUI_TOOL),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
  ifneq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
    # Anything with a GUI needs X11 to be linked in.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
    OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
# SA tools need special app classpath
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
ifeq ($(SA_TOOL),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
  SA_CLASSPATH = "{ \"/lib/tools.jar\", \"/lib/sa-jdi.jar\", \"/classes\"}"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
  OTHER_CPPFLAGS += -DAPP_CLASSPATH=$(SA_CLASSPATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
# Wildcards
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
ifeq ($(WILDCARDS),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
  OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
# Always tell native code what the main class is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
OTHER_CPPFLAGS += -DMAIN_CLASS=\"$(MAIN_CLASS)\"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
# Construct initializer for initial arguments to java
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
ALL_ARGS = -J-ms8m $(MAIN_JAVA_ARGS) $(MAIN_CLASS) $(MAIN_ARGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
JAVA_ARGS = "{ $(ALL_ARGS:%=\"%\",)  }"
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
# Always report launcher info
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
build: launcher_info
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
# Print info macro
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
define printLauncherSetting
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
if [ "$2" != "" ] ; then $(PRINTF) "%-16s %s\n" "$1:" "$2"; fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
# Report basic information about this launcher
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
launcher_info:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
	@$(ECHO) "========================================================="
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
	@$(call printLauncherSetting,LAUNCHER,$(PROGRAM))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
	@$(call printLauncherSetting,MAIN_CLASS,$(MAIN_CLASS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
	@$(call printLauncherSetting,MAIN_JAVA_ARGS,$(MAIN_JAVA_ARGS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
	@$(call printLauncherSetting,MAIN_ARGS,$(MAIN_ARGS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
	@$(call printLauncherSetting,ALL_ARGS,$(ALL_ARGS))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
	@$(ECHO) "========================================================="
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
# Rules for building a program
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
include $(BUILDDIR)/common/Program.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204