make/solaris/makefiles/launcher.make

Print this page


   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 #  


  52 
  53 LINK_LAUNCHER/PRE_HOOK  = $(LINK_LIB.CC/PRE_HOOK)
  54 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
  55 
  56 ifeq ("${Platform_compiler}", "sparcWorks")
  57 # Enable the following LAUNCHERFLAGS addition if you need to compare the
  58 # built ELF objects.
  59 #
  60 # The -g option makes static data global and the "-W0,-noglobal"
  61 # option tells the compiler to not globalize static data using a unique
  62 # globalization prefix. Instead force the use of a static globalization
  63 # prefix based on the source filepath so the objects from two identical
  64 # compilations are the same.
  65 #
  66 # Note: The blog says to use "-W0,-xglobalstatic", but that doesn't
  67 #       seem to work. I got "-W0,-noglobal" from Kelly and that works.
  68 #LAUNCHERFLAGS += -W0,-noglobal
  69 endif # Platform_compiler == sparcWorks
  70 
  71 launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
  72         $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS)
  73 
  74 launcher.c:
  75         @echo Generating $@
  76         $(QUIETLY) { \
  77         echo '#define debug launcher_debug'; \
  78         echo '#include "java.c"'; \
  79         echo '#include "java_md.c"'; \
  80         } > $@
  81 
  82 $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
  83 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
  84         @echo Linking launcher...
  85         $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
  86         $(QUIETLY) \
  87         $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER)
  88         $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
  89         [ -f $(LAUNCHER_G) ] || ln -s $@ $(LAUNCHER_G)
  90 endif # filter -sbfast -xsbfast
  91 
   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 #  


  52 
  53 LINK_LAUNCHER/PRE_HOOK  = $(LINK_LIB.CC/PRE_HOOK)
  54 LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CC/POST_HOOK)
  55 
  56 ifeq ("${Platform_compiler}", "sparcWorks")
  57 # Enable the following LAUNCHERFLAGS addition if you need to compare the
  58 # built ELF objects.
  59 #
  60 # The -g option makes static data global and the "-W0,-noglobal"
  61 # option tells the compiler to not globalize static data using a unique
  62 # globalization prefix. Instead force the use of a static globalization
  63 # prefix based on the source filepath so the objects from two identical
  64 # compilations are the same.
  65 #
  66 # Note: The blog says to use "-W0,-xglobalstatic", but that doesn't
  67 #       seem to work. I got "-W0,-noglobal" from Kelly and that works.
  68 #LAUNCHERFLAGS += -W0,-noglobal
  69 endif # Platform_compiler == sparcWorks
  70 
  71 launcher.o: launcher.c $(LAUNCHERDIR)/java.c $(LAUNCHERDIR)/java_md.c
  72         $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS) ${TARGET_DEFINES}
  73 
  74 launcher.c:
  75         @echo Generating $@
  76         $(QUIETLY) { \
  77         echo '#define debug launcher_debug'; \
  78         echo '#include "java.c"'; \
  79         echo '#include "java_md.c"'; \
  80         } > $@
  81 
  82 $(LAUNCHER): $(LAUNCHER.o) $(LIBJVM) $(LAUNCHER_MAPFILE)
  83 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
  84         @echo Linking launcher...
  85         $(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
  86         $(QUIETLY) \
  87         $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(LAUNCHER.o) $(LIBS_LAUNCHER)
  88         $(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
  89         [ -f $(LAUNCHER_G) ] || ln -s $@ $(LAUNCHER_G)
  90 endif # filter -sbfast -xsbfast
  91