build/solaris/makefiles/launcher.make

Sat, 01 Dec 2007 00:00:00 +0000

author
duke
date
Sat, 01 Dec 2007 00:00:00 +0000
changeset 435
a61af66fc99e
permissions
-rw-r--r--

Initial load

     1 #
     2 # Copyright 2005-2007 Sun Microsystems, Inc.  All Rights Reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.
     8 #
     9 # This code is distributed in the hope that it will be useful, but WITHOUT
    10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    12 # version 2 for more details (a copy is included in the LICENSE file that
    13 # accompanied this code).
    14 #
    15 # You should have received a copy of the GNU General Public License version
    16 # 2 along with this work; if not, write to the Free Software Foundation,
    17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    18 #
    19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
    20 # CA 95054 USA or visit www.sun.com if you need additional information or
    21 # have any questions.
    22 #  
    23 #
    25 # Rules to build gamma launcher, used by vm.make
    27 # gamma[_g]: launcher
    28 LAUNCHER = gamma$(G_SUFFIX)
    30 LAUNCHERDIR   = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher
    31 LAUNCHERFLAGS = $(ARCHFLAG) \
    32                 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
    33                 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
    34                 -DARCH=\"$(LIBARCH)\" \
    35                 -DGAMMA \
    36                 -DLAUNCHER_TYPE=\"gamma\" \
    37                 -DLINK_INTO_$(LINK_INTO)
    39 ifeq ($(LINK_INTO),AOUT)
    40   LAUNCHER.o                 = launcher.o $(JVM_OBJ_FILES)
    41   LAUNCHER_MAPFILE           = mapfile_reorder
    42   LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
    43   LIBS_LAUNCHER             += $(LIBS)
    44 else
    45   LAUNCHER.o                 = launcher.o
    46   LFLAGS_LAUNCHER           += -L `pwd`
    47   LIBS_LAUNCHER             += -l$(JVM) $(LIBS)
    48 endif
    50 LINK_LAUNCHER = $(LINK.CC)
    52 LINK_LAUNCHER/PRE_HOOK  = $(LINK_LIB.CC/PRE_HOOK)
    53 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
    55 ifeq ("${Platform_compiler}", "sparcWorks")
    56 # Enable the following LAUNCHERFLAGS addition if you need to compare the
    57 # built ELF objects.
    58 #
    59 # The -g option makes static data global and the "-W0,-noglobal"
    60 # option tells the compiler to not globalize static data using a unique
    61 # globalization prefix. Instead force the use of a static globalization
    62 # prefix based on the source filepath so the objects from two identical
    63 # compilations are the same.
    64 #
    65 # Note: The blog says to use "-W0,-xglobalstatic", but that doesn't
    66 #       seem to work. I got "-W0,-noglobal" from Kelly and that works.
    67 #LAUNCHERFLAGS += -W0,-noglobal
    68 endif # Platform_compiler == sparcWorks
    70 launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
    71 	$(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS)
    73 launcher.c:
    74 	@echo Generating $@
    75 	$(QUIETLY) { \
    76 	echo '#define debug launcher_debug'; \
    77 	echo '#include "java.c"'; \
    78 	echo '#include "java_md.c"'; \
    79 	} > $@
    81 $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
    82 	$(QUIETLY) \
    83 	case "$(CFLAGS_BROWSE)" in \
    84 	-sbfast|-xsbfast) \
    85 	    ;; \
    86 	*) \
    87 	    echo Linking launcher...; \
    88 	    $(LINK_LAUNCHER/PRE_HOOK) \
    89 	    $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \
    90 	    $(LINK_LAUNCHER/POST_HOOK) \
    91 	    ;; \
    92 	esac

mercurial