make/bsd/makefiles/launcher.make

Mon, 05 Dec 2011 14:55:16 -0800

author
dcubed
date
Mon, 05 Dec 2011 14:55:16 -0800
changeset 3304
8657ec177a14
parent 3156
f08d439fab8c
child 3473
e8a4934564b2
permissions
-rw-r--r--

7117748: SA_APPLE_BOOT_JAVA and ALWAYS_PASS_TEST_GAMMA settings should not be required on MacOS X
Summary: Replace SA_APPLE_BOOT_JAVA with logic that checks the boot JDK for the location of JDI classes. ALWAYS_PASS_TEST_GAMMA is true by default on Darwin.
Reviewed-by: kvn, swingler

never@3156 1 #
never@3156 2 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
never@3156 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
never@3156 4 #
never@3156 5 # This code is free software; you can redistribute it and/or modify it
never@3156 6 # under the terms of the GNU General Public License version 2 only, as
never@3156 7 # published by the Free Software Foundation.
never@3156 8 #
never@3156 9 # This code is distributed in the hope that it will be useful, but WITHOUT
never@3156 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
never@3156 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
never@3156 12 # version 2 for more details (a copy is included in the LICENSE file that
never@3156 13 # accompanied this code).
never@3156 14 #
never@3156 15 # You should have received a copy of the GNU General Public License version
never@3156 16 # 2 along with this work; if not, write to the Free Software Foundation,
never@3156 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
never@3156 18 #
never@3156 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
never@3156 20 # or visit www.oracle.com if you need additional information or have any
never@3156 21 # questions.
never@3156 22 #
never@3156 23 #
never@3156 24
never@3156 25 # Rules to build gamma launcher, used by vm.make
never@3156 26
never@3156 27
never@3156 28 LAUNCHER_SCRIPT = hotspot
never@3156 29 LAUNCHER = gamma
never@3156 30
never@3156 31 LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher
never@3156 32 LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
never@3156 33 LAUNCHERFLAGS := $(ARCHFLAG) \
never@3156 34 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
never@3156 35 -I$(LAUNCHERDIR_SHARE) \
never@3156 36 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
never@3156 37 -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
never@3156 38 -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
never@3156 39 -DARCH=\"$(LIBARCH)\" \
never@3156 40 -DGAMMA \
never@3156 41 -DLAUNCHER_TYPE=\"gamma\" \
never@3156 42 -DLINK_INTO_$(LINK_INTO) \
never@3156 43 $(TARGET_DEFINES)
never@3156 44
never@3156 45 ifeq ($(LINK_INTO),AOUT)
never@3156 46 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
never@3156 47 LAUNCHER_MAPFILE = mapfile_reorder
never@3156 48 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
never@3156 49 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC)
never@3156 50 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
never@3156 51 else
never@3156 52 LAUNCHER.o = launcher.o
never@3156 53 LFLAGS_LAUNCHER += -L`pwd`
never@3156 54 LIBS_LAUNCHER += -l$(JVM) $(LIBS)
never@3156 55 endif
never@3156 56
never@3156 57 LINK_LAUNCHER = $(LINK.c)
never@3156 58
never@3156 59 LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK)
never@3156 60 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
never@3156 61
never@3156 62 LAUNCHER_OUT = launcher
never@3156 63
never@3156 64 SUFFIXES += .d
never@3156 65
never@3156 66 SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
never@3156 67 SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
never@3156 68
never@3156 69 OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
never@3156 70
never@3156 71 DEPFILES := $(patsubst %.o,%.d,$(OBJS))
never@3156 72 -include $(DEPFILES)
never@3156 73
never@3156 74 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
never@3156 75 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
never@3156 76 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
never@3156 77
never@3156 78 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
never@3156 79 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
never@3156 80 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS)
never@3156 81
never@3156 82 $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
never@3156 83 $(QUIETLY) echo Linking launcher...
never@3156 84 $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
never@3156 85 $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
never@3156 86 $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
never@3156 87
never@3156 88 $(LAUNCHER): $(LAUNCHER_SCRIPT)
never@3156 89
never@3156 90 $(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
never@3156 91 $(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
never@3156 92 $(QUIETLY) chmod +x $@
never@3156 93

mercurial