1 #
   2 # Copyright (c) 2012, 2016, 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.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  10 #
  11 # This code is distributed in the hope that it will be useful, but WITHOUT
  12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14 # version 2 for more details (a copy is included in the LICENSE file that
  15 # accompanied this code).
  16 #
  17 # You should have received a copy of the GNU General Public License version
  18 # 2 along with this work; if not, write to the Free Software Foundation,
  19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20 #
  21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22 # or visit www.oracle.com if you need additional information or have any
  23 # questions.
  24 #
  25 
  26 # These lists define where a file belongs if it exists. It is perfectly fine
  27 # if a file does not exist on some platforms - we do not have to produce exact
  28 # per-platform lists. However, for clarity, platform-unique files are handled
  29 # in platform-specific conditionals.
  30 
  31 # On different platforms the libraries are placed into different locations in the
  32 # JRE:
  33 ifeq (, $(findstring $(OPENJDK_TARGET_OS), windows macosx))
  34     # On non-windows/OSX libraries go into jre/lib/<arch>
  35     LIBS_PREFIX := $(OPENJDK_TARGET_CPU_LEGACY_LIB)/
  36 else
  37     # On OSX they go into jre/lib/ - on Windows they go into jre/bin/ and we won't use this
  38     LIBS_PREFIX :=
  39 endif
  40 
  41 # Debug info files are tricky to deal with due to all the different platform variants
  42 # and because they can be zipped.
  43 ifeq ($(ZIP_DEBUGINFO_FILES), true)
  44     # Common case and 'just works' on all platforms
  45     DEBUG_SUFFIX := .diz
  46 else
  47     # It gets complicated ...
  48     ifeq ($(OPENJDK_TARGET_OS), macosx)
  49         # This is a directory, not a simple file, so
  50         # it needs expanding explicitly later on
  51         DEBUG_SUFFIX := $(SHARED_LIBRARY_SUFFIX).dSYM
  52     else
  53         ifeq ($(OPENJDK_TARGET_OS), windows)
  54             DEBUG_SUFFIX := .map .pdb
  55         else
  56             DEBUG_SUFFIX := .debuginfo
  57         endif
  58     endif
  59 endif
  60 
  61 # Expand the contents of the .dSYM directories on macosx.
  62 # Param 1 - debug files list eg libFoo.dylib.dSYM or libFoo.diz (if zipped)
  63 # Param 2 - libraries list eg Foo
  64 # On macosx if not zipping debuginfo files we expand the contents of the .dSYM directories,
  65 # else we return the original list of .diz files.
  66 # On other OS we return the original list of debuginfo files (whether zipped or not)
  67 #
  68 define expand-debuginfo
  69   $(if $(and $(filter-out true, $(ZIP_DEBUGINFO_FILES)), $(filter macosx, $(OPENJDK_TARGET_OS))), \
  70       $(foreach i, $1, $(addsuffix /Contents/Info.plist, $i)) \
  71           $(foreach i, $2, $(addsuffix /Contents/Resources/DWARF/$i, $(filter $i.%, $1))), \
  72       $1)
  73 endef
  74 
  75 # Common executable files
  76 PROFILE_1_JRE_BIN_FILES := \
  77     java$(EXE_SUFFIX) \
  78     keytool$(EXE_SUFFIX)
  79 
  80 ifeq ($(OPENJDK_TARGET_OS), windows)
  81     PROFILE_1_JRE_BIN_FILES += javaw$(EXE_SUFFIX)
  82 endif
  83 
  84 PROFILE_1_LIBRARIES := \
  85     j2pkcs11 \
  86     java  \
  87     jsig \
  88     net \
  89     nio \
  90     sunec \
  91     verify \
  92     zip
  93 
  94 ifeq ($(OPENJDK_TARGET_OS), windows)
  95     PROFILE_1_LIBRARIES += msvcrt100
  96 endif
  97 
  98 PROFILE_1_LIBRARIES := $(addprefix $(LIBRARY_PREFIX), $(PROFILE_1_LIBRARIES))
  99 PROFILE_1_DEBUG_FILES := $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(PROFILE_1_LIBRARIES)))
 100 PROFILE_1_LIBRARIES := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(PROFILE_1_LIBRARIES))
 101 PROFILE_1_DEBUG_FILES := $(call expand-debuginfo, $(PROFILE_1_DEBUG_FILES), $(PROFILE_1_LIBRARIES))
 102 PROFILE_1_LIBRARIES += $(PROFILE_1_DEBUG_FILES)
 103 
 104 # Note: libjsig exists as both the real file and a symlink in the VM directory
 105 #       so we have to treat it with care when looking for the debuginfo files
 106 VM_LIBRARIES := \
 107     jvm 
 108 
 109 ifeq ($(OPENJDK_TARGET_OS), solaris)
 110     VM_LIBRARIES += jvm_db jvm_dtrace
 111 endif
 112 
 113 VM_SYMLINKS := \
 114     jsig
 115 
 116 VM_LIBRARIES := $(addprefix $(LIBRARY_PREFIX), $(VM_LIBRARIES))
 117 VM_DEBUG_FILES := $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(VM_LIBRARIES)))
 118 VM_SYMLINKS := $(addprefix $(LIBRARY_PREFIX), $(VM_SYMLINKS))
 119 VM_LIBRARIES := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(VM_LIBRARIES))
 120 VM_DEBUG_FILES := $(call expand-debuginfo, $(VM_DEBUG_FILES), $(VM_LIBRARIES))
 121 VM_DEBUG_FILES +=  $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(VM_SYMLINKS)))
 122 VM_SYMLINKS := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(VM_SYMLINKS))
 123 VM_LIBRARIES += $(VM_SYMLINKS)
 124 
 125 VM_FILES := \
 126     Xusage.txt
 127 
 128 VM_DIRS := client server minimal
 129 
 130 VM_FILES := $(foreach i, $(VM_DIRS), $(addprefix $i/, $(VM_LIBRARIES) $(VM_FILES) $(VM_DEBUG_FILES)))
 131 
 132 JLI_LIBRARIES := \
 133     jli
 134 
 135 ifneq ($(OPENJDK_TARGET_OS), windows)
 136     JLI_SUBDIR := jli/
 137 else
 138     JLI_SUBDIR :=
 139 endif
 140 
 141 JLI_LIBRARIES := $(addprefix $(JLI_SUBDIR)$(LIBRARY_PREFIX), $(JLI_LIBRARIES))
 142 JLI_DEBUG_FILES := $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(JLI_LIBRARIES)))
 143 JLI_LIBRARIES := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(JLI_LIBRARIES))
 144 JLI_DEBUG_FILES := $(call expand-debuginfo, $(JLI_DEBUG_FILES), $(JLI_LIBRARIES))
 145 JLI_LIBRARIES += $(JLI_DEBUG_FILES)
 146 
 147 ifneq ($(OPENJDK_TARGET_OS), windows)
 148     PROFILE_1_JRE_LIB_FILES := \
 149         $(addprefix $(LIBS_PREFIX), $(PROFILE_1_LIBRARIES) $(VM_FILES) $(JLI_LIBRARIES))
 150 else
 151     # On windows libraries go into jre/bin
 152     PROFILE_1_JRE_BIN_FILES += $(PROFILE_1_LIBRARIES) $(VM_FILES) $(JLI_LIBRARIES)
 153 endif
 154 
 155 # Remaining jre/lib contents
 156 # OSX doesn't use <arch> directory
 157 #
 158 ifeq ($(OPENJDK_TARGET_OS), macosx)
 159     PROFILE_1_JRE_LIB_FILES += \
 160         jvm.cfg \
 161         jspawnhelper
 162 else
 163     PROFILE_1_JRE_LIB_FILES += \
 164         $(OPENJDK_TARGET_CPU_LEGACY_LIB)/jvm.cfg \
 165         $(OPENJDK_TARGET_CPU_LEGACY_LIB)/jspawnhelper
 166 endif
 167 
 168 PROFILE_1_JRE_LIB_FILES += \
 169     calendars.properties \
 170     classlist \
 171     content-types.properties \
 172     currency.data \
 173     ext/localedata.jar \
 174     ext/meta-index \
 175     ext/sunec.jar \
 176     ext/sunjce_provider.jar \
 177     ext/sunpkcs11.jar \
 178     hijrah-config-umalqura.properties \
 179     jce.jar \
 180     jsse.jar \
 181     logging.properties \
 182     meta-index \
 183     net.properties \
 184     resources.jar \
 185     rt.jar \
 186     security/policy/limited/US_export_policy.jar \
 187     security/policy/unlimited/US_export_policy.jar \
 188     security/blacklist \
 189     security/blacklisted.certs \
 190     security/cacerts \
 191     security/java.policy \
 192     security/java.security \
 193     security/policy/limited/local_policy.jar \
 194     security/policy/unlimited/local_policy.jar \
 195     security/trusted.libraries \
 196     tzdb.dat
 197 
 198 ifeq ($(OPENJDK_TARGET_OS), windows)
 199     PROFILE_1_JRE_LIB_FILES += tzmappings
 200 else
 201     ifeq ($(OPENJDK_TARGET_OS), solaris)
 202         PROFILE_1_JRE_LIB_FILES += sdp/sdp.conf
 203     endif
 204 endif
 205 
 206 PROFILE_1_JRE_OTHER_FILES := \
 207     COPYRIGHT \
 208     LICENSE \
 209     README \
 210     THIRDPARTYLICENSEREADME.txt \
 211     Welcome.html \
 212     release
 213 
 214 PROFILE_1_JRE_JAR_FILES := \
 215     ext/localedata.jar \
 216     ext/sunec.jar \
 217     ext/sunjce_provider.jar \
 218     ext/sunpkcs11.jar \
 219     jce.jar \
 220     jsse.jar \
 221     resources.jar \
 222     rt.jar \
 223     security/policy/limited/US_export_policy.jar \
 224     security/policy/unlimited/US_export_policy.jar \
 225     security/policy/limited/local_policy.jar \
 226     security/policy/unlimited/local_policy.jar
 227 
 228 
 229 PROFILE_2_JRE_BIN_FILES := \
 230     rmid$(EXE_SUFFIX) \
 231     rmiregistry$(EXE_SUFFIX)
 232 
 233 ifeq ($(OPENJDK_TARGET_OS), windows)
 234     PROFILE_2_JRE_BIN_FILES += java-rmi$(EXE_SUFFIX)
 235 endif
 236 
 237 # If you add libraries here, make sure you use the same techniques
 238 # as used for the other profile's libraries regarding debug files etc
 239 PROFILE_2_JRE_LIB_FILES :=
 240 
 241 PROFILE_2_JRE_OTHER_FILES :=
 242 
 243 PROFILE_2_JRE_JAR_FILES :=
 244 
 245 ifeq ($(OPENJDK_TARGET_OS), windows)
 246     PROFILE_3_JRE_BIN_FILES := \
 247         kinit$(EXE_SUFFIX) \
 248         klist$(EXE_SUFFIX) \
 249         ktab$(EXE_SUFFIX)
 250 else
 251     PROFILE_3_JRE_BIN_FILES :=
 252 endif
 253 
 254 PROFILE_3_LIBRARIES := \
 255     hprof \
 256     instrument \
 257     j2gss \
 258     j2pcsc \
 259     jaas_unix \
 260     jaas_nt \
 261     java_crw_demo \
 262     jsdt \
 263     management \
 264     npt \
 265     sctp
 266 
 267 ifeq ($(OPENJDK_TARGET_OS), windows)
 268     PROFILE_3_LIBRARIES += w2k_lsa_auth
 269 else
 270     ifeq ($(OPENJDK_TARGET_OS), macosx)
 271         PROFILE_3_LIBRARIES += osxkrb5
 272     endif
 273 endif
 274 
 275 PROFILE_3_LIBRARIES := $(addprefix $(LIBRARY_PREFIX), $(PROFILE_3_LIBRARIES))
 276 PROFILE_3_DEBUG_FILES := $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(PROFILE_3_LIBRARIES)))
 277 PROFILE_3_LIBRARIES := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(PROFILE_3_LIBRARIES))
 278 PROFILE_3_DEBUG_FILES := $(call expand-debuginfo, $(PROFILE_3_DEBUG_FILES), $(PROFILE_3_LIBRARIES))
 279 PROFILE_3_LIBRARIES += $(PROFILE_3_DEBUG_FILES)
 280 
 281 ifneq ($(OPENJDK_TARGET_OS), windows)
 282     PROFILE_3_JRE_LIB_FILES := \
 283         $(addprefix $(LIBS_PREFIX), $(PROFILE_3_LIBRARIES))
 284 else
 285     # On windows libraries go into jre/bin
 286     PROFILE_3_JRE_BIN_FILES += $(PROFILE_3_LIBRARIES)
 287 endif
 288 
 289 PROFILE_3_JRE_LIB_FILES += \
 290     jvm.hprof.txt \
 291     management-agent.jar \
 292     management/jmxremote.access \
 293     management/jmxremote.password.template \
 294     management/management.properties \
 295     management/snmp.acl.template
 296 
 297 PROFILE_3_JRE_OTHER_FILES :=
 298 
 299 PROFILE_3_JRE_JAR_FILES := \
 300     management-agent.jar
 301 
 302 
 303 FULL_JRE_BIN_FILES := \
 304     orbd$(EXE_SUFFIX) \
 305     pack200$(EXE_SUFFIX) \
 306     policytool$(EXE_SUFFIX) \
 307     servertool$(EXE_SUFFIX) \
 308     tnameserv$(EXE_SUFFIX) \
 309     unpack200$(EXE_SUFFIX)
 310 
 311 JRE_LIBRARIES := \
 312     awt \
 313     awt_headless \
 314     awt_xawt \
 315     dcpr \
 316     dt_socket \
 317     fontmanager \
 318     jawt \
 319     jdwp \
 320     jfr \
 321     jpeg \
 322     jsound \
 323     jsoundalsa \
 324     kcms \
 325     mlib_image \
 326     splashscreen \
 327     t2k \
 328     unpack
 329 
 330 JRE_LIBRARIES := $(addprefix $(LIBRARY_PREFIX), $(JRE_LIBRARIES))
 331 JRE_DEBUG_FILES := $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(JRE_LIBRARIES)))
 332 JRE_LIBRARIES := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(JRE_LIBRARIES))
 333 JRE_DEBUG_FILES := $(call expand-debuginfo, $(JRE_DEBUG_FILES), $(JRE_LIBRARIES))
 334 JRE_LIBRARIES += $(JRE_DEBUG_FILES)
 335 
 336 ifneq ($(OPENJDK_TARGET_OS), windows)
 337     FULL_JRE_LIB_FILES := \
 338         $(addprefix $(LIBS_PREFIX), $(JRE_LIBRARIES))
 339 else
 340     # On windows libraries go into jre/bin
 341     FULL_JRE_BIN_FILES += $(JRE_LIBRARIES)
 342 endif
 343 
 344 FULL_JRE_LIB_FILES += \
 345     charsets.jar \
 346     cmm/CIEXYZ.pf \
 347     cmm/GRAY.pf \
 348     cmm/LINEAR_RGB.pf \
 349     cmm/PYCC.pf \
 350     cmm/sRGB.pf \
 351     ext/cldrdata.jar \
 352     ext/dnsns.jar \
 353     ext/nashorn.jar \
 354     ext/zipfs.jar \
 355     flavormap.properties \
 356     fontconfig.RedHat.5.bfc \
 357     fontconfig.RedHat.5.properties.src \
 358     fontconfig.RedHat.6.bfc \
 359     fontconfig.RedHat.6.properties.src \
 360     fontconfig.SuSE.10.bfc \
 361     fontconfig.SuSE.10.properties.src \
 362     fontconfig.SuSE.11.bfc \
 363     fontconfig.SuSE.11.properties.src \
 364     fontconfig.Turbo.bfc \
 365     fontconfig.Turbo.properties.src \
 366     fontconfig.bfc \
 367     fontconfig.properties.src \
 368     fonts/LucidaBrightDemiBold.ttf \
 369     fonts/LucidaBrightDemiItalic.ttf \
 370     fonts/LucidaBrightItalic.ttf \
 371     fonts/LucidaBrightRegular.ttf \
 372     fonts/LucidaSansDemiBold.ttf \
 373     fonts/LucidaSansRegular.ttf \
 374     fonts/LucidaTypewriterBold.ttf \
 375     fonts/LucidaTypewriterRegular.ttf \
 376     fonts/fonts.dir \
 377     images/cursors/cursors.properties \
 378     images/cursors/invalid32x32.gif \
 379     images/cursors/motif_CopyDrop32x32.gif \
 380     images/cursors/motif_CopyNoDrop32x32.gif \
 381     images/cursors/motif_LinkDrop32x32.gif \
 382     images/cursors/motif_LinkNoDrop32x32.gif \
 383     images/cursors/motif_MoveDrop32x32.gif \
 384     images/cursors/motif_MoveNoDrop32x32.gif \
 385     jexec \
 386     jfr.jar \
 387     oblique-fonts/LucidaSansDemiOblique.ttf \
 388     oblique-fonts/LucidaSansOblique.ttf \
 389     oblique-fonts/LucidaTypewriterBoldOblique.ttf \
 390     oblique-fonts/LucidaTypewriterOblique.ttf \
 391     oblique-fonts/fonts.dir \
 392     psfont.properties.ja \
 393     psfontj2d.properties \
 394     sound.properties
 395 
 396 FULL_JRE_OTHER_FILES := \
 397     man/ja_JP.UTF-8/man1/java.1 \
 398     man/ja_JP.UTF-8/man1/javaws.1 \
 399     man/ja_JP.UTF-8/man1/keytool.1 \
 400     man/ja_JP.UTF-8/man1/orbd.1 \
 401     man/ja_JP.UTF-8/man1/pack200.1 \
 402     man/ja_JP.UTF-8/man1/policytool.1 \
 403     man/ja_JP.UTF-8/man1/rmid.1 \
 404     man/ja_JP.UTF-8/man1/rmiregistry.1 \
 405     man/ja_JP.UTF-8/man1/servertool.1 \
 406     man/ja_JP.UTF-8/man1/tnameserv.1 \
 407     man/ja_JP.UTF-8/man1/unpack200.1 \
 408     man/man1/java.1 \
 409     man/man1/javaws.1 \
 410     man/man1/keytool.1 \
 411     man/man1/orbd.1 \
 412     man/man1/pack200.1 \
 413     man/man1/policytool.1 \
 414     man/man1/rmid.1 \
 415     man/man1/rmiregistry.1 \
 416     man/man1/servertool.1 \
 417     man/man1/tnameserv.1 \
 418     man/man1/unpack200.1
 419 
 420 FULL_JRE_JAR_FILES := \
 421     charsets.jar \
 422     ext/cldrdata.jar \
 423     ext/dnsns.jar \
 424     ext/nashorn.jar \
 425     ext/zipfs.jar \
 426     jfr.jar
 427