Mercurial > hg > graal-jvmci-8
comparison make/linux/makefiles/launcher.make @ 2044:06f017f7daa7
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 07 Jan 2011 18:18:08 +0100 |
parents | 2d26b0046e0d cb2d0a362639 |
children | 33df1aeaebbf |
comparison
equal
deleted
inserted
replaced
1942:00bc9eaf0e24 | 2044:06f017f7daa7 |
---|---|
1 # | 1 # |
2 # Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. | 2 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 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 | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
22 # | 22 # |
23 # | 23 # |
24 | 24 |
25 # Rules to build gamma launcher, used by vm.make | 25 # Rules to build gamma launcher, used by vm.make |
26 | 26 |
27 # gamma[_g]: launcher | |
28 | 27 |
28 LAUNCHER_SCRIPT = hotspot | |
29 LAUNCHER = gamma | 29 LAUNCHER = gamma |
30 LAUNCHER_G = $(LAUNCHER)$(G_SUFFIX) | |
31 | 30 |
32 LAUNCHERDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher | 31 LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher |
33 LAUNCHERFLAGS = $(ARCHFLAG) \ | 32 LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher |
33 LAUNCHERFLAGS := $(ARCHFLAG) \ | |
34 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \ | 34 -I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \ |
35 -I$(LAUNCHERDIR_SHARE) \ | |
35 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \ | 36 -DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \ |
37 -DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \ | |
38 -DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \ | |
36 -DARCH=\"$(LIBARCH)\" \ | 39 -DARCH=\"$(LIBARCH)\" \ |
37 -DGAMMA \ | 40 -DGAMMA \ |
38 -DLAUNCHER_TYPE=\"gamma\" \ | 41 -DLAUNCHER_TYPE=\"gamma\" \ |
39 -DLINK_INTO_$(LINK_INTO) | 42 -DLINK_INTO_$(LINK_INTO) \ |
43 $(TARGET_DEFINES) | |
40 | 44 |
41 ifeq ($(LINK_INTO),AOUT) | 45 ifeq ($(LINK_INTO),AOUT) |
42 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES) | 46 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES) |
43 LAUNCHER_MAPFILE = mapfile_reorder | 47 LAUNCHER_MAPFILE = mapfile_reorder |
44 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE)) | 48 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE)) |
53 LINK_LAUNCHER = $(LINK.c) | 57 LINK_LAUNCHER = $(LINK.c) |
54 | 58 |
55 LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK) | 59 LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK) |
56 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK) | 60 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK) |
57 | 61 |
58 launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c | 62 LAUNCHER_OUT = launcher |
59 $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS) | |
60 | 63 |
61 launcher.c: | 64 SUFFIXES += .d |
62 @echo Generating $@ | |
63 $(QUIETLY) { \ | |
64 echo '#define debug launcher_debug'; \ | |
65 echo '#include "java.c"'; \ | |
66 echo '#include "java_md.c"'; \ | |
67 } > $@ | |
68 | 65 |
69 $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE) | 66 SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c") |
70 $(QUIETLY) { \ | 67 SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c") |
71 echo Linking launcher...; \ | 68 |
72 $(LINK_LAUNCHER/PRE_HOOK) \ | 69 OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE)) |
73 $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \ | 70 |
74 $(LINK_LAUNCHER/POST_HOOK) \ | 71 DEPFILES := $(patsubst %.o,%.d,$(OBJS)) |
75 #[ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \ | 72 -include $(DEPFILES) |
76 } | 73 |
74 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c | |
75 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } | |
76 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS) | |
77 | |
78 $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c | |
79 $(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); } | |
80 $(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CPPFLAGS) | |
81 | |
82 $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE) | |
83 $(QUIETLY) echo Linking launcher... | |
84 $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK) | |
85 $(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER) | |
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 |