1 #
2 # Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
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 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
38 -DLAUNCHER_TYPE=\"gamma\" \
39 -DLINK_INTO_$(LINK_INTO)
40
41 ifeq ($(LINK_INTO),AOUT)
42 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
43 LAUNCHER_MAPFILE = mapfile_reorder
44 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
45 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC)
46 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
47 else
48 LAUNCHER.o = launcher.o
49 LFLAGS_LAUNCHER += -L `pwd`
50 LIBS_LAUNCHER += -l$(JVM) $(LIBS)
51 endif
52
53 LINK_LAUNCHER = $(LINK.c)
54
55 LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK)
56 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
57
58 launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
59 $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS)
60
61 launcher.c:
62 @echo Generating $@
63 $(QUIETLY) { \
64 echo '#define debug launcher_debug'; \
65 echo '#include "java.c"'; \
66 echo '#include "java_md.c"'; \
67 } > $@
68
69 $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
70 $(QUIETLY) { \
71 echo Linking launcher...; \
72 $(LINK_LAUNCHER/PRE_HOOK) \
73 $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \
74 $(LINK_LAUNCHER/POST_HOOK) \
75 [ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \
76 }
|
1 #
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.
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 #
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 # or visit www.oracle.com if you need additional information or have any
21 # questions.
22 #
38 -DLAUNCHER_TYPE=\"gamma\" \
39 -DLINK_INTO_$(LINK_INTO)
40
41 ifeq ($(LINK_INTO),AOUT)
42 LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
43 LAUNCHER_MAPFILE = mapfile_reorder
44 LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
45 LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC)
46 LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
47 else
48 LAUNCHER.o = launcher.o
49 LFLAGS_LAUNCHER += -L `pwd`
50 LIBS_LAUNCHER += -l$(JVM) $(LIBS)
51 endif
52
53 LINK_LAUNCHER = $(LINK.c)
54
55 LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CC/PRE_HOOK)
56 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
57
58 # Used for platform dispatching
59 LAUNCHER_TARGET_DEFINES = -DTARGET_OS_FAMILY_$(Platform_os_family)
60 LAUNCHER_TARGET_DEFINES += -DTARGET_ARCH_$(Platform_arch)
61 LAUNCHER_TARGET_DEFINES += -DTARGET_ARCH_MODEL_$(Platform_arch_model)
62 LAUNCHER_TARGET_DEFINES += -DTARGET_OS_ARCH_$(Platform_os_arch)
63 LAUNCHER_TARGET_DEFINES += -DTARGET_OS_ARCH_MODEL_$(Platform_os_arch_model)
64 LAUNCHER_TARGET_DEFINES += -DTARGET_COMPILER_$(Platform_compiler)
65
66 launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
67 $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS) $(LAUNCHER_TARGET_DEFINES)
68
69 launcher.c:
70 @echo Generating $@
71 $(QUIETLY) { \
72 echo '#define debug launcher_debug'; \
73 echo '#include "java.c"'; \
74 echo '#include "java_md.c"'; \
75 } > $@
76
77 $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
78 $(QUIETLY) { \
79 echo Linking launcher...; \
80 $(LINK_LAUNCHER/PRE_HOOK) \
81 $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER); \
82 $(LINK_LAUNCHER/POST_HOOK) \
83 [ -f $(LAUNCHER_G) ] || { ln -s $@ $(LAUNCHER_G); }; \
84 }
|