hotspot/make/solaris/makefiles/launcher.make
author katleman
Wed, 13 Jun 2012 16:53:25 -0700
changeset 12906 d382060bd755
parent 11721 dcd1f62c9caf
child 13728 882756847a04
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
#
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5547
diff changeset
     2
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
# accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
#
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5542
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5542
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 5542
diff changeset
    21
# questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
#  
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
# Rules to build gamma launcher, used by vm.make
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    27
LAUNCHER_SCRIPT = hotspot
4493
9204129f065e 6843629: Make current hotspot build part of jdk5 control build
phh
parents: 670
diff changeset
    28
LAUNCHER   = gamma
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    30
LAUNCHERDIR   = $(GAMMADIR)/src/os/posix/launcher
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    31
LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
LAUNCHERFLAGS = $(ARCHFLAG) \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
                -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    34
                -I$(LAUNCHERDIR_SHARE) \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
                -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    36
                -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    37
                -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
                -DARCH=\"$(LIBARCH)\" \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
                -DGAMMA \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
                -DLAUNCHER_TYPE=\"gamma\" \
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    41
                -DLINK_INTO_$(LINK_INTO) \
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    42
                $(TARGET_DEFINES)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
ifeq ($(LINK_INTO),AOUT)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
  LAUNCHER.o                 = launcher.o $(JVM_OBJ_FILES)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
  LAUNCHER_MAPFILE           = mapfile_reorder
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
  LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  LIBS_LAUNCHER             += $(LIBS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  LAUNCHER.o                 = launcher.o
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
  LFLAGS_LAUNCHER           += -L `pwd`
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  LIBS_LAUNCHER             += -l$(JVM) $(LIBS)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 7410
diff changeset
    55
LINK_LAUNCHER = $(LINK.CXX)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 7410
diff changeset
    57
LINK_LAUNCHER/PRE_HOOK  = $(LINK_LIB.CXX/PRE_HOOK)
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 7410
diff changeset
    58
LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CXX/POST_HOOK)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
ifeq ("${Platform_compiler}", "sparcWorks")
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
# Enable the following LAUNCHERFLAGS addition if you need to compare the
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
# built ELF objects.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
# The -g option makes static data global and the "-W0,-noglobal"
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
# option tells the compiler to not globalize static data using a unique
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
# globalization prefix. Instead force the use of a static globalization
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
# prefix based on the source filepath so the objects from two identical
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
# compilations are the same.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
#
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
# Note: The blog says to use "-W0,-xglobalstatic", but that doesn't
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
#       seem to work. I got "-W0,-noglobal" from Kelly and that works.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
#LAUNCHERFLAGS += -W0,-noglobal
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
endif # Platform_compiler == sparcWorks
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    75
LAUNCHER_OUT = launcher
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    76
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    77
SUFFIXES += .d
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    78
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    79
SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    80
SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    81
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    82
OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    83
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    84
DEPFILES := $(patsubst %.o,%.d,$(OBJS))
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    85
-include $(DEPFILES)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    87
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    88
	$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 7410
diff changeset
    89
	$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    91
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    92
	$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
11721
dcd1f62c9caf 7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents: 7410
diff changeset
    93
	$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    94
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    95
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    96
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    97
	$(QUIETLY) echo Linking launcher...
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
    98
	$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
    99
	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
5542
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   100
	$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   101
endif # filter -sbfast -xsbfast
be05c5ffe905 6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents: 4493
diff changeset
   102
7410
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
   103
$(LAUNCHER): $(LAUNCHER_SCRIPT)
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
   104
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
   105
$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
   106
	$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
   107
	$(QUIETLY) chmod +x $@
f5b282e7a7a6 6981484: Update development launcher
sla
parents: 7397
diff changeset
   108