jdk/make/common/Defs.gmk

Print this page




  92     else \
  93       echo false; \
  94     fi)
  95 endif
  96 
  97 # Set OPENJDK based on CLOSED_SRC_INCLUDED
  98 ifeq ($(CLOSED_SRC_INCLUDED), false)
  99   OPENJDK = true
 100 endif
 101 
 102 # Define where closed directories are
 103 ifdef OPENJDK
 104   CLOSED_SRC =
 105   CLOSED_SHARE_SRC =
 106 else
 107   ifndef CLOSED_SHARE_SRC
 108     CLOSED_SHARE_SRC    = $(CLOSED_SRC)/share
 109   endif
 110 endif
 111 
 112 # If OPENJDK is defined, we may still need to use some native libraries that
 113 # exist only as part of the closed source. If the closed sources are not
 114 # available, the libraries must have been pre-built. Since these libraries
 115 # and the JDK internal interfaces to these are reasonably stable this is not
 116 # a significant problem. But we do need to provide a way to locate them,
 117 # including a way to point to a new one when there have been changes.
 118 #
 119 # If you have a formal binary plugs download, set ALT_BINARY_PLUGS_PATH
 120 # to the location.
 121 # (Optionally you can set ALT_CLOSED_JDK_IMPORT_PATH to point to the latest
 122 #  build JDK, or last promotion for this JDK version, but will not work
 123 #  on windows).
 124 #
 125 # As the OPENJDK is built, the binary plugs are used instead of building the
 126 # libraries.
 127 # Individual Makefiles that specify USE_BINARY_PLUG_LIBRARY, will get
 128 # the binary plug copy (or a copy from a built JDK).
 129 #
 130 # See common/internal/BinaryPlugs.gmk for more information.
 131 #
 132 # Usage notes:
 133 #
 134 #   ALT_BINARY_PLUGS_JARFILE is probably rarely needed. It can be used
 135 #   to identify the exact jar file to be used for all closed classes..
 136 #  
 137 #   ALT_BINARY_PLUGS_PATH points to a directory containing precisely the
 138 #   binaries needed to build. 
 139 #  
 140 #   ALT_BUILD_BINARY_PLUGS_PATH points to a directory containing binary plug dirs 
 141 #   multiple architectures named using the standard conventions
 142 #   This is useful for build scripts that need to build multiple architectures
 143 #   of the OpenJDK.
 144 #   
 145 #   ALT_CLOSED_JDK_IMPORT_PATH points to the top-level of a specific platform
 146 #   JDK image.
 147 #  
 148 #   The precedence is that
 149 #     1. ALT_BINARY_PLUGS_JARFILE overrides any other location of the classes
 150 #     2. ALT_BINARY_PLUGS_PATH overrides all locations of classes and libraries
 151 #     3. ALT_BUILD_BINARY_PLUGS_PATH is used to find a ALT_BINARY_PLUGS_PATH
 152 #     4. ALT_CLOSED_JDK_IMPORT_PATH is used to locate classes and libraries
 153 #   Note: If any of the ALT_ variables are modified here, it is assumed
 154 #         that the build should be done with IMPORT_BINARY_PLUGS=true as
 155 #         well.  Otherwise the default will be IMPORT_BINARY_PLUGS=false.
 156 #         Lastly, setting IMPORT_BINARY_PLUGS=false on the command line
 157 #         will override this logic, and plugs will not be imported.
 158 #
 159 
 160 # Always needed, defines the name of the imported/exported jarfile
 161 BINARY_PLUGS_JARNAME = rt-closed.jar
 162 
 163 ifdef OPENJDK
 164   ifdef ALT_CLOSED_JDK_IMPORT_PATH
 165     CLOSED_JDK_IMPORT_PATH = $(ALT_CLOSED_JDK_IMPORT_PATH)
 166     BINARY_PLUGS_PATH = $(CLOSED_JDK_IMPORT_PATH)
 167     BINARY_PLUGS_JARFILE = $(CLOSED_JDK_IMPORT_PATH)/jre/lib/rt.jar
 168     IMPORT_BINARY_PLUGS=true
 169   endif
 170   ifdef ALT_BUILD_BINARY_PLUGS_PATH
 171     BUILD_BINARY_PLUGS_PATH = $(ALT_BUILD_BINARY_PLUGS_PATH)
 172     IMPORT_BINARY_PLUGS=true
 173   else
 174     BUILD_BINARY_PLUGS_PATH = $(SLASH_JAVA)/re/jdk/$(JDK_VERSION)/promoted/latest/openjdk/binaryplugs
 175   endif
 176   BINARY_PLUGS_PATH = $(BUILD_BINARY_PLUGS_PATH)/$(PLATFORM)-$(ARCH)
 177   BINARY_PLUGS_JARFILE = $(BINARY_PLUGS_PATH)/jre/lib/$(BINARY_PLUGS_JARNAME)
 178   ifdef ALT_BINARY_PLUGS_PATH
 179     BINARY_PLUGS_PATH  = $(ALT_BINARY_PLUGS_PATH)
 180     BINARY_PLUGS_JARFILE = $(BINARY_PLUGS_PATH)/jre/lib/$(BINARY_PLUGS_JARNAME)
 181     IMPORT_BINARY_PLUGS=true
 182   endif
 183   ifdef ALT_BINARY_PLUGS_JARFILE
 184     BINARY_PLUGS_JARFILE = $(ALT_BINARY_PLUGS_JARFILE)
 185     IMPORT_BINARY_PLUGS=true
 186   endif
 187 endif # OPENJDK
 188 
 189 #
 190 # Get platform definitions
 191 #
 192 
 193 include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk
 194 
 195 #
 196 # Freetype logic is applicable to OpenJDK only
 197 #
 198 ifdef OPENJDK
 199 
 200 #if we use system lib we do not need to copy it to build tree
 201 USING_SYSTEM_FT_LIB=false
 202 
 203 ifeq ($(PLATFORM), windows)
 204   DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/win32/freetype-$(ARCH)
 205 endif
 206 ifeq ($(PLATFORM), linux)
 207   DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(PLATFORM)/freetype-$(ARCH)
 208 endif
 209 ifeq ($(PLATFORM), solaris)


 272   LDLIBS_COMMON = $(JAVALIB)
 273 endif # PACKAGE
 274 
 275 #
 276 # Libraries that must appear ahead of libc.so on the link command line
 277 #
 278 ifdef PROGRAM
 279 
 280   ifeq ($(PLATFORM), solaris)
 281     LDLIBS_COMMON = -lthread -ldl
 282   endif
 283 
 284   ifeq ($(PLATFORM), linux)
 285     LDLIBS_COMMON = -ldl
 286   endif
 287 
 288 endif # PROGRAM
 289 
 290 LDLIBS_COMMON += $(EXTRA_LIBS)
 291 
 292 #
 293 # Default is to build, not import native binaries
 294 #
 295 ifndef IMPORT_NATIVE_BINARIES
 296   IMPORT_NATIVE_BINARIES=false
 297 endif
 298 # If importing libraries in, no incremental builds
 299 ifeq ($(IMPORT_NATIVE_BINARIES),true)
 300  INCREMENTAL_BUILD=false
 301 endif
 302 
 303 # for generated libraries
 304 LIBDIR              = $(OUTPUTDIR)/lib
 305 ABS_LIBDIR          = $(ABS_OUTPUTDIR)/lib
 306 # Optional place to save the windows .lib files
 307 LIBFILES_DIR        = $(OUTPUTDIR)/libfiles
 308 # for ext jre files
 309 EXTDIR              = $(LIBDIR)/ext
 310 # for generated include files
 311 INCLUDEDIR          = $(OUTPUTDIR)/include
 312 # for generated class files
 313 CLASSBINDIR         = $(OUTPUTDIR)/classes
 314 DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
 315 # for modules
 316 MODULES_DIR         = $(OUTPUTDIR)/modules
 317 ABS_MODULES_DIR     = $(ABS_OUTPUTDIR)/modules
 318 # for generated tool class files
 319 BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
 320 # for build tool jar files
 321 BUILDTOOLJARDIR     = $(OUTPUTDIR)/btjars
 322 ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars




  92     else \
  93       echo false; \
  94     fi)
  95 endif
  96 
  97 # Set OPENJDK based on CLOSED_SRC_INCLUDED
  98 ifeq ($(CLOSED_SRC_INCLUDED), false)
  99   OPENJDK = true
 100 endif
 101 
 102 # Define where closed directories are
 103 ifdef OPENJDK
 104   CLOSED_SRC =
 105   CLOSED_SHARE_SRC =
 106 else
 107   ifndef CLOSED_SHARE_SRC
 108     CLOSED_SHARE_SRC    = $(CLOSED_SRC)/share
 109   endif
 110 endif
 111 






 112 #







































































 113 # Get platform definitions
 114 #
 115 
 116 include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk
 117 
 118 #
 119 # Freetype logic is applicable to OpenJDK only
 120 #
 121 ifdef OPENJDK
 122 
 123 #if we use system lib we do not need to copy it to build tree
 124 USING_SYSTEM_FT_LIB=false
 125 
 126 ifeq ($(PLATFORM), windows)
 127   DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/win32/freetype-$(ARCH)
 128 endif
 129 ifeq ($(PLATFORM), linux)
 130   DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(PLATFORM)/freetype-$(ARCH)
 131 endif
 132 ifeq ($(PLATFORM), solaris)


 195   LDLIBS_COMMON = $(JAVALIB)
 196 endif # PACKAGE
 197 
 198 #
 199 # Libraries that must appear ahead of libc.so on the link command line
 200 #
 201 ifdef PROGRAM
 202 
 203   ifeq ($(PLATFORM), solaris)
 204     LDLIBS_COMMON = -lthread -ldl
 205   endif
 206 
 207   ifeq ($(PLATFORM), linux)
 208     LDLIBS_COMMON = -ldl
 209   endif
 210 
 211 endif # PROGRAM
 212 
 213 LDLIBS_COMMON += $(EXTRA_LIBS)
 214 











 215 # for generated libraries
 216 LIBDIR              = $(OUTPUTDIR)/lib
 217 ABS_LIBDIR          = $(ABS_OUTPUTDIR)/lib
 218 # Optional place to save the windows .lib files
 219 LIBFILES_DIR        = $(OUTPUTDIR)/libfiles
 220 # for ext jre files
 221 EXTDIR              = $(LIBDIR)/ext
 222 # for generated include files
 223 INCLUDEDIR          = $(OUTPUTDIR)/include
 224 # for generated class files
 225 CLASSBINDIR         = $(OUTPUTDIR)/classes
 226 DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
 227 # for modules
 228 MODULES_DIR         = $(OUTPUTDIR)/modules
 229 ABS_MODULES_DIR     = $(ABS_OUTPUTDIR)/modules
 230 # for generated tool class files
 231 BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
 232 # for build tool jar files
 233 BUILDTOOLJARDIR     = $(OUTPUTDIR)/btjars
 234 ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars