annotate make/linux/makefiles/launcher.make @ 1123:167c2986d91b

6843629: Make current hotspot build part of jdk5 control build Summary: Source changes for older compilers plus makefile changes. Reviewed-by: xlu
author phh
date Wed, 16 Dec 2009 12:54:49 -0500
parents d1605aabd0a1
children c18cbe5936b8
rev   line source
duke@0 1 #
xdono@196 2 # Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
duke@0 7 # published by the Free Software Foundation.
duke@0 8 #
duke@0 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 # accompanied this code).
duke@0 14 #
duke@0 15 # You should have received a copy of the GNU General Public License version
duke@0 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 #
duke@0 19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 20 # CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 21 # have any questions.
duke@0 22 #
duke@0 23 #
duke@0 24
duke@0 25 # Rules to build gamma launcher, used by vm.make
duke@0 26
duke@0 27 # gamma[_g]: launcher
phh@1123 28
phh@1123 29 LAUNCHER = gamma
phh@1123 30 LAUNCHER_G = $(LAUNCHER)$(G_SUFFIX)
duke@0 31
duke@0 32 LAUNCHERDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher
duke@0 33 LAUNCHERFLAGS = $(ARCHFLAG) \
duke@0 34 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
duke@0 35 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
duke@0 36 -DARCH=\"$(LIBARCH)\" \
duke@0 37 -DGAMMA \
duke@0 38 -DLAUNCHER_TYPE=\"gamma\" \
duke@0 39 -DLINK_INTO_$(LINK_INTO)
duke@0 40
duke@0 41 ifeq ($(LINK_INTO),AOUT)
duke@0 42 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
duke@0 43 LAUNCHER_MAPFILE = mapfile_reorder
duke@0 44 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
duke@0 45 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC)
duke@0 46 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
duke@0 47 else
duke@0 48 LAUNCHER.o = launcher.o
duke@0 49 LFLAGS_LAUNCHER += -L `pwd`
duke@0 50 LIBS_LAUNCHER += -l$(JVM) $(LIBS)
duke@0 51 endif
duke@0 52
duke@0 53 LINK_LAUNCHER = $(LINK.c)
duke@0 54
duke@0 55 LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK)
duke@0 56 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
duke@0 57
duke@0 58 launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
duke@0 59 $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS)
duke@0 60
duke@0 61 launcher.c:
duke@0 62 @echo Generating $@
duke@0 63 $(QUIETLY) { \
duke@0 64 echo '#define debug launcher_debug'; \
duke@0 65 echo '#include "java.c"'; \
duke@0 66 echo '#include "java_md.c"'; \
duke@0 67 } > $@
duke@0 68
duke@0 69 $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
duke@0 70 $(QUIETLY) { \
duke@0 71 echo Linking launcher...; \
duke@0 72 $(LINK_LAUNCHER/PRE_HOOK) \
duke@0 73 $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \
duke@0 74 $(LINK_LAUNCHER/POST_HOOK) \
phh@1123 75 [ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \
duke@0 76 }