annotate make/bsd/makefiles/launcher.make @ 2796:f08d439fab8c

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