Mercurial > hg > truffle
annotate make/linux/makefiles/launcher.make @ 7746:2c1ae1a125bd
Pull out test code that's useful for other assemblers.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Fri, 08 Feb 2013 11:49:48 +0100 |
parents | e522a00b91aa |
children |
rev | line source |
---|---|
0 | 1 # |
6842
b9a9ed0f8eeb
7197424: update copyright year to match last edit in jdk8 hotspot repository
mikael
parents:
6776
diff
changeset
|
2 # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
0 | 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 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1123
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1123
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1123
diff
changeset
|
21 # questions. |
0 | 22 # |
23 # | |
24 | |
25 # Rules to build gamma launcher, used by vm.make | |
26 | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
196
diff
changeset
|
27 |
1985 | 28 LAUNCHER_SCRIPT = hotspot |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
196
diff
changeset
|
29 LAUNCHER = gamma |
0 | 30 |
1985 | 31 LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher |
32 LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher | |
33 LAUNCHERFLAGS := $(ARCHFLAG) \ | |
0 | 34 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \ |
1985 | 35 -I$(LAUNCHERDIR_SHARE) \ |
0 | 36 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \ |
1985 | 37 -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \ |
38 -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \ | |
0 | 39 -DARCH=\"$(LIBARCH)\" \ |
40 -DGAMMA \ | |
41 -DLAUNCHER_TYPE=\"gamma\" \ | |
1985 | 42 -DLINK_INTO_$(LINK_INTO) \ |
43 $(TARGET_DEFINES) | |
0 | 44 |
45 ifeq ($(LINK_INTO),AOUT) | |
46 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES) | |
47 LAUNCHER_MAPFILE = mapfile_reorder | |
48 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE)) | |
49 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC) | |
50 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) | |
51 else | |
52 LAUNCHER.o = launcher.o | |
53 LFLAGS_LAUNCHER += -L `pwd` | |
54 LIBS_LAUNCHER += -l$(JVM) $(LIBS) | |
55 endif | |
56 | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
1985
diff
changeset
|
57 LINK_LAUNCHER = $(LINK.CC) |
0 | 58 |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
1985
diff
changeset
|
59 LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CXX/PRE_HOOK) |
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
1985
diff
changeset
|
60 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CXX/POST_HOOK) |
0 | 61 |
1985 | 62 LAUNCHER_OUT = launcher |
63 | |
64 SUFFIXES += .d | |
65 | |
66 SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c") | |
67 SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c") | |
68 | |
69 OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE)) | |
70 | |
71 DEPFILES := $(patsubst %.o,%.d,$(OBJS)) | |
72 -include $(DEPFILES) | |
73 | |
74 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c | |
75 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
1985
diff
changeset
|
76 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS) |
0 | 77 |
1985 | 78 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c |
79 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } | |
4891
719f7007c8e8
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
1985
diff
changeset
|
80 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS) |
0 | 81 |
1985 | 82 $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE) |
83 $(QUIETLY) echo Linking launcher... | |
84 $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK) | |
6776
37518f191ddb
7198329: Add $(sort) to object files used in links makes binarties more consistent
ohair
parents:
4891
diff
changeset
|
85 $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER) |
1985 | 86 $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK) |
87 | |
88 $(LAUNCHER): $(LAUNCHER_SCRIPT) | |
89 | |
90 $(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script | |
91 $(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@ | |
92 $(QUIETLY) chmod +x $@ | |
93 |