jdk/makefiles/CompileLaunchers.gmk
author ohair
Tue, 18 Sep 2012 11:29:24 -0700
changeset 13702 efd6a05935b2
parent 13164 72c5d01a857d
child 14231 a0c23c1c010f
child 14182 3041082abb40
permissions -rw-r--r--
7197849: Update new build-infra makefiles Reviewed-by: ihse, erikj, ohrstrom, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13702
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     1
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     4
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    10
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    15
# accompanied this code).
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    16
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    17
# You should have received a copy of the GNU General Public License version
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    20
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    23
# questions.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    24
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    25
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    26
defalt: all
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    27
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    28
include $(SPEC)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    29
include MakeBase.gmk
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    30
include NativeCompilation.gmk
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    31
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    32
# Setup the java compilers for the JDK build.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    33
include Setup.gmk
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    34
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    35
# Build tools
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    36
include Tools.gmk
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    37
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    38
BUILD_LAUNCHERS=
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    39
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    40
# When building a legacy overlay image (on solaris 64 bit), the launchers 
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    41
# need to be built with a different rpath and a different output dir.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    42
ifeq ($(OVERLAY_IMAGES),true)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    43
    ORIGIN_ROOT:=/../..
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    44
    OUTPUT_SUBDIR:=$(OPENJDK_TARGET_CPU_ISADIR)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    45
else
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    46
    ORIGIN_ROOT:=/..
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    47
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    48
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    49
ifeq ($(OPENJDK_TARGET_OS), macosx)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    50
    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    51
else
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    52
    ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    53
                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    54
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    55
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    56
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    57
# Applications expect to be able to link against libjawt without invoking
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    58
# System.loadLibrary("jawt") first. This was the behaviour described in the
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    59
# devloper documentation of JAWT and what worked with OpenJDK6.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    60
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    61
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    62
    ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    63
                $(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)) 
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    64
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    65
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    66
define SetupLauncher
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    67
    # TODO: Fix mapfile on solaris. Won't work with ld as linker.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    68
    # Parameter 1 is the name of the launcher (java,javac,jar...)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    69
    # Parameter 2 is extra CFLAGS
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    70
    # Parameter 3 is extra LDFLAGS
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    71
    # Parameter 4 is extra LDFLAGS_SUFFIX_posix
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    72
    # Parameter 5 is extra LDFLAGS_SUFFIX_windows
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    73
    # Parameter 6 is optional Windows JLI library (full path)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    74
    # Parameter 7 is optional Windows resource (RC) flags
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    75
    # Parameter 8 is optional Windows version resource file (.rc)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    76
    # Parameter 9  is different output dir
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    77
    # Parameter 10 if set, link statically with c runtime on windows.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    78
    # Parameter 11 if set, override plist file on macosx.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    79
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    80
    $1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    81
    ifneq ($6,)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    82
        $1_WINDOWS_JLI_LIB:=$6
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    83
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    84
    $1_VERSION_INFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    85
    ifneq ($8,)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    86
        $1_VERSION_INFO_RESOURCE:=$8
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    87
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    88
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    89
    $1_LDFLAGS := $3
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    90
    $1_LDFLAGS_SUFFIX :=
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    91
    ifeq ($(OPENJDK_TARGET_OS), macosx)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    92
        $1_PLIST_FILE:=Info-cmdline.plist
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    93
        ifneq ($(11),)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    94
            $1_PLIST_FILE:=$(11)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    95
        endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    96
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    97
        $1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    98
                      -framework Cocoa -framework Security -framework ApplicationServices \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
    99
                      -sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   100
        $1_LDFLAGS_SUFFIX += -pthread
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   101
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   102
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   103
    ifeq ($(USE_EXTERNAL_LIBZ), true)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   104
        $1_LDFLAGS_SUFFIX += -lz
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   105
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   106
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   107
    $1_OUTPUT_DIR_ARG:=$9
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   108
    ifeq (,$$($1_OUTPUT_DIR_ARG))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   109
        $1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   110
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   111
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   112
    # TODO: maybe it's better to move this if-statement out of this function
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   113
    ifeq ($1,java)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   114
        $1_OPTIMIZATION_ARG:=HIGH
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   115
	$1_LDFLAGS_solaris:=-R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   116
    else
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   117
        $1_OPTIMIZATION_ARG:=LOW
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   118
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   119
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   120
    $1_CFLAGS:=$(CFLAGS_JDKEXE)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   121
    ifeq ($(10),true)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   122
        $1_CFLAGS:=$(filter-out -MD,$(CFLAGS_JDKEXE))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   123
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   124
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   125
    $(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   126
	SRC:=$(JDK_TOPDIR)/src/share/bin,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   127
	INCLUDE_FILES:=main.c,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   128
	LANG:=C,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   129
	OPTIMIZATION:=$$($1_OPTIMIZATION_ARG), \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   130
	CFLAGS:=$$($1_CFLAGS) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   131
		-I$(JDK_TOPDIR)/src/share/bin \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   132
		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   133
		-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   134
                -DFULL_VERSION='"$(FULL_VERSION)"' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   135
                -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   136
                -DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   137
		-DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   138
		-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   139
		-DPROGNAME='"$1"' $(DPACKAGEPATH) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   140
		$2,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   141
	CFLAGS_linux:=-fPIC,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   142
        CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   143
	LDFLAGS:=$(LDFLAGS_JDKEXE) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   144
                 $(ORIGIN_ARG) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   145
		 $$($1_LDFLAGS),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   146
	LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_NAME,$1),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   147
	LDFLAGS_linux:=-lpthread \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   148
                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   149
	LDFLAGS_solaris:=$$($1_LDFLAGS_solaris) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   150
                       $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   151
	MAPFILE := $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU), \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   152
        LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   153
	LDFLAGS_SUFFIX_posix:=$4,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   154
	LDFLAGS_SUFFIX_windows:=$$($1_WINDOWS_JLI_LIB) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   155
			       $(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   156
	LDFLAGS_SUFFIX_linux:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   157
	LDFLAGS_SUFFIX_solaris:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   158
	OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   159
	OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   160
	PROGRAM:=$1,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   161
	DEBUG_SYMBOLS:=true,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   162
	VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   163
	RC_FLAGS:=$(RC_FLAGS)\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   164
		  /D "JDK_FNAME=$1$(EXE_SUFFIX)" \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   165
		  /D "JDK_INTERNAL_NAME=$1" \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   166
		  /D "JDK_FTYPE=0x1L" \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   167
		  $7,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   168
	MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   169
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   170
    BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   171
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   172
    ifeq ($(OPENJDK_TARGET_OS),macosx)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   173
        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   174
    endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   175
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   176
    ifeq ($(OPENJDK_TARGET_OS),windows)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   177
        $$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   178
				$$($1_WINDOWS_JLI_LIB)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   179
    endif    	 
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   180
endef
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   181
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   182
##########################################################################################
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   183
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   184
XLIBS:=$(X_LIBS) -lX11
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   185
ifeq ($(OPENJDK_TARGET_OS),macosx)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   186
    DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"'
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   187
    XLIBS:=
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   188
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   189
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   190
ifdef OPENJDK
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   191
    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons"
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   192
else
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   193
    JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows"
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   194
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   195
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   196
# On windows, the debuginfo files get the same name as for java.dll. Build
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   197
# into another dir and copy selectively so debuginfo for java.dll isn't
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   198
# overwritten.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   199
$(eval $(call SetupLauncher,java,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   200
    -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   201
    $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   202
    $(JDK_TOPDIR)/src/windows/resource/java.rc,$(JDK_OUTPUTDIR)/objs/java_objs,true))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   203
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   204
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   205
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   206
	$(RM) $@
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   207
	$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   208
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   209
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   210
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   211
ifeq ($(OPENJDK_TARGET_OS),windows)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   212
    $(eval $(call SetupLauncher,javaw,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   213
        -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   214
        $(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   215
        $(JDK_TOPDIR)/src/windows/resource/java.rc,,true))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   216
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   217
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   218
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   219
ifndef BUILD_HEADLESS_ONLY
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   220
$(eval $(call SetupLauncher,appletviewer,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   221
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   222
    $(XLIBS)))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   223
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   224
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   225
$(eval $(call SetupLauncher,extcheck,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   226
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   227
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   228
$(eval $(call SetupLauncher,idlj,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   229
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   230
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   231
$(eval $(call SetupLauncher,jar,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   232
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   233
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   234
$(eval $(call SetupLauncher,jarsigner,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   235
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.JarSigner"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   236
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   237
$(eval $(call SetupLauncher,javac,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   238
    -DEXPAND_CLASSPATH_WILDCARDS \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   239
    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   240
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   241
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   242
$(eval $(call SetupLauncher,javadoc,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   243
    -DEXPAND_CLASSPATH_WILDCARDS \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   244
    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   245
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   246
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   247
$(eval $(call SetupLauncher,javah,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   248
    -DEXPAND_CLASSPATH_WILDCARDS \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   249
    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   250
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   251
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   252
$(eval $(call SetupLauncher,javap,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   253
    -DEXPAND_CLASSPATH_WILDCARDS \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   254
    -DNEVER_ACT_AS_SERVER_CLASS_MACHINE \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   255
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   256
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   257
BUILD_LAUNCHER_jconsole_CFLAGS_windows:=-DJAVAW
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   258
BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   259
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   260
$(eval $(call SetupLauncher,jconsole,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   261
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   262
    -DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   263
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   264
$(eval $(call SetupLauncher,jdb,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   265
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   266
    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   267
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   268
$(eval $(call SetupLauncher,jhat,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   269
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   270
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   271
$(eval $(call SetupLauncher,jinfo,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   272
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   273
		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   274
		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   275
		   "sun.tools.jinfo.JInfo"$(COMMA) }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   276
    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   277
    ,,,,,,,,,Info-privileged.plist))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   278
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   279
$(eval $(call SetupLauncher,jmap,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   280
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   281
		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   282
		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   283
		   "sun.tools.jmap.JMap"$(COMMA) }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   284
    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   285
    ,,,,,,,,,Info-privileged.plist))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   286
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   287
$(eval $(call SetupLauncher,jps,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   288
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   289
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   290
$(eval $(call SetupLauncher,jrunscript,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   291
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   292
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   293
$(eval $(call SetupLauncher,jsadebugd,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   294
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   295
    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   296
    ,,,,,,,,,Info-privileged.plist))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   297
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   298
$(eval $(call SetupLauncher,jstack,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   299
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   300
		   "-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   301
		   "-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   302
		   "sun.tools.jstack.JStack"$(COMMA) }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   303
    -DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   304
    ,,,,,,,,,Info-privileged.plist))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   305
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   306
$(eval $(call SetupLauncher,jstat,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   307
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   308
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   309
$(eval $(call SetupLauncher,jstatd,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   310
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   311
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   312
$(eval $(call SetupLauncher,keytool,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   313
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.KeyTool"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   314
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   315
$(eval $(call SetupLauncher,native2ascii,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   316
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   317
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   318
ifndef BUILD_HEADLESS_ONLY
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   319
$(eval $(call SetupLauncher,policytool,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   320
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   321
    $(XLIBS)))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   322
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   323
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   324
$(eval $(call SetupLauncher,rmic,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   325
    -DEXPAND_CLASSPATH_WILDCARDS \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   326
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   327
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   328
$(eval $(call SetupLauncher,schemagen,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   329
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   330
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   331
$(eval $(call SetupLauncher,serialver,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   332
    -DEXPAND_CLASSPATH_WILDCARDS \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   333
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   334
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   335
$(eval $(call SetupLauncher,xjc,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   336
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   337
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   338
$(eval $(call SetupLauncher,wsgen,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   339
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   340
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   341
$(eval $(call SetupLauncher,wsimport,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   342
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   343
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   344
$(eval $(call SetupLauncher,orbd,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   345
    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   346
			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   347
			"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   348
			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   349
			"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   350
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   351
$(eval $(call SetupLauncher,servertool,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   352
    -DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   353
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   354
$(eval $(call SetupLauncher,tnameserv,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   355
    -DJAVA_ARGS='{ 	"-J-ms8m"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   356
			"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   357
			"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   358
			"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   359
			"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   360
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   361
$(eval $(call SetupLauncher,pack200,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   362
    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   363
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   364
$(eval $(call SetupLauncher,rmid,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   365
    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   366
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   367
$(eval $(call SetupLauncher,rmiregistry,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   368
    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   369
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   370
$(eval $(call SetupLauncher,jcmd,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   371
    -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   372
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   373
ifeq ($(OPENJDK_TARGET_OS),windows)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   374
    $(eval $(call SetupLauncher,kinit,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   375
        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   376
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   377
    $(eval $(call SetupLauncher,klist,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   378
        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   379
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   380
    $(eval $(call SetupLauncher,ktab,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   381
        -DJAVA_ARGS='{	"-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }'))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   382
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   383
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   384
##########################################################################################
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   385
# The order of the object files on the link command line affects the size of the resulting
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   386
# binary (at least on linux) which causes the size to differ between old and new build.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   387
ifeq ($(USE_EXTERNAL_LIBZ), true)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   388
UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   389
UNPACKEXE_ZIPOBJS := -lz
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   390
else
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   391
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   392
UNPACKEXE_ZIPOBJS := 	$(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   393
		     	$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   394
			$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   395
			$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   396
			$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   397
			$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   398
			$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   399
			$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   400
			$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   401
			$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   402
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   403
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   404
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   405
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   406
    UNPACKEXE_CFLAGS += -xregs=no%appl
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   407
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   408
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   409
UNPACKEXE_LANG:=C
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   410
ifeq ($(OPENJDK_TARGET_OS),solaris)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   411
    UNPACKEXE_LANG:=C++
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   412
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   413
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   414
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   415
                SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   416
		EXCLUDE_FILES:=jni.cpp,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   417
		LANG:=$(UNPACKEXE_LANG),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   418
		OPTIMIZATION := LOW, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   419
		CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   420
                        -DFULL, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   421
		CFLAGS_release:=-DPRODUCT,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   422
		CFLAGS_linux:=-fPIC,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   423
		CFLAGS_solaris := -KPIC, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   424
		CFLAGS_macosx := -fPIC, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   425
		MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   426
		LDFLAGS:=$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   427
			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   428
			 $(call SET_SHARED_LIBRARY_ORIGIN) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   429
			 $(UNPACKEXE_ZIPOBJS),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   430
		LDFLAGS_linux:=-lc,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   431
		LDFLAGS_SUFFIX:=$(LIBCXX),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   432
		LDFLAGS_SUFFIX_solaris:=-lc,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   433
		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   434
		OUTPUT_DIR:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   435
		PROGRAM:=unpack200,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   436
		VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   437
		RC_FLAGS:=$(RC_FLAGS)\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   438
			  /D "JDK_FNAME=unpack200.exe" \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   439
			  /D "JDK_INTERNAL_NAME=unpack200" \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   440
			  /D "JDK_FTYPE=0x1L",\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   441
		MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   442
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   443
ifneq ($(USE_EXTERNAL_LIBZ), true)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   444
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   445
$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   446
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   447
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   448
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   449
BUILD_LAUNCHERS += $(BUILD_UNPACKEXE)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   450
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   451
##########################################################################################
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   452
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   453
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   454
BUILD_JEXEC := 
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   455
BUILD_JEXEC_SRC :=
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   456
BUILD_JEXEC_INC :=
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   457
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   458
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   459
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   460
# UNHANDLED:
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   461
# - COMPILE_APPROACH = normal
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   462
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   463
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   464
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   465
# jdk/make/java/Makefile
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   466
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   467
ifeq ($(OPENJDK_TARGET_OS), solaris)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   468
	ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   469
		BUILD_JEXEC := 1
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   470
	endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   471
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   472
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   473
ifeq ($(OPENJDK_TARGET_OS), linux)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   474
	BUILD_JEXEC := 1
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   475
endif # OPENJDK_TARGET_OS
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   476
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   477
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   478
# jdk/make/java/jexec/Makefile
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   479
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   480
ifeq ($(BUILD_JEXEC), 1)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   481
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   482
	ifeq ($(OPENJDK_TARGET_OS),windows)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   483
	else ifeq ($(OPENJDK_TARGET_OS),macosx)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   484
		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   485
	else
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   486
		BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   487
	endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   488
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   489
	ifeq ($(OPENJDK_TARGET_OS), linux)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   490
                BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   491
		BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   492
	endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   493
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   494
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   495
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   496
# Note that the two Makefile's seems to contradict each other,
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   497
#   and that src/macosx/bin/jexec.c seems unused
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   498
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   499
ifneq ($(BUILD_JEXEC_SRC),)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   500
        $(eval $(call SetupNativeCompilation,BUILD_JEXEC,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   501
		SRC:=$(BUILD_JEXEC_SRC),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   502
		INCLUDE_FILES:=jexec.c,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   503
		LANG:=C,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   504
		OPTIMIZATION := LOW, \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   505
		CFLAGS:=$(CFLAGS_JDKEXE)\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   506
                        $(BUILD_JEXEC_INC), \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   507
		CFLAGS_linux:=-fPIC,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   508
		CFLAGS_solaris:=-KPIC,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   509
		LDFLAGS:=$(LDFLAGS_JDKEXE) \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   510
			 $(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   511
		OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   512
		OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   513
		PROGRAM:=jexec))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   514
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   515
	BUILD_LAUNCHERS += $(BUILD_JEXEC)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   516
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   517
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   518
##########################################################################################
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   519
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   520
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   521
# The java-rmi.cgi script in bin/ only gets delivered in certain situations
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   522
#
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   523
JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   524
ifeq ($(OPENJDK_TARGET_OS), linux)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   525
  BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   526
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   527
ifeq ($(OPENJDK_TARGET_OS), solaris)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   528
  ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   529
    BUILD_LAUNCHERS += $(JAVA_RMI_CGI)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   530
  endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   531
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   532
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   533
# TODO: 
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   534
# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   535
# this time anyway. Since jdk6, it has been built from the wrong source and resulted
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   536
# in a copy of the standard java launcher named "java-rmi.exe" ending up in the final
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   537
# images bin dir. This weird behavior is mimicked here in the converted makefiles for
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   538
# now. Should probably just be deleted.
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   539
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   540
ifeq ($(OPENJDK_TARGET_OS),windows)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   541
    $(eval $(call SetupLauncher,java-rmi,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   542
        -DEXPAND_CLASSPATH_WILDCARDS,\
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   543
        $(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU))))
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   544
else
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   545
    $(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   546
	$(MKDIR) -p $(@D)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   547
	$(CP) $< $@
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   548
	$(CHMOD) a+x $@
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   549
endif
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   550
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   551
##########################################################################################
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   552
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   553
$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   554
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   555
all: $(BUILD_LAUNCHERS)
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   556
efd6a05935b2 7197849: Update new build-infra makefiles
ohair
parents: 13164
diff changeset
   557
.PHONY: all