1 #
   2 # Copyright (c) 2012, 2014, 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/US_export_policy.jar \
 187     security/blacklist \
 188     security/blacklisted.certs \
 189     security/cacerts \
 190     security/java.policy \
 191     security/java.security \
 192     security/local_policy.jar \
 193     security/trusted.libraries \
 194     tzdb.dat
 195 
 196 ifeq ($(OPENJDK_TARGET_OS), windows)
 197     PROFILE_1_JRE_LIB_FILES += tzmappings
 198 else
 199     ifeq ($(OPENJDK_TARGET_OS), solaris)
 200         PROFILE_1_JRE_LIB_FILES += sdp/sdp.conf
 201     endif
 202 endif
 203 
 204 PROFILE_1_JRE_OTHER_FILES := \
 205     COPYRIGHT \
 206     LICENSE \
 207     README \
 208     THIRDPARTYLICENSEREADME.txt \
 209     Welcome.html \
 210     release
 211 
 212 PROFILE_1_JRE_JAR_FILES := \
 213     ext/localedata.jar \
 214     ext/sunec.jar \
 215     ext/sunjce_provider.jar \
 216     ext/sunpkcs11.jar \
 217     jce.jar \
 218     jsse.jar \
 219     resources.jar \
 220     rt.jar \
 221     security/US_export_policy.jar \
 222     security/local_policy.jar
 223 
 224 
 225 PROFILE_2_JRE_BIN_FILES := \
 226     rmid$(EXE_SUFFIX) \
 227     rmiregistry$(EXE_SUFFIX)
 228 
 229 ifeq ($(OPENJDK_TARGET_OS), windows)
 230     PROFILE_2_JRE_BIN_FILES += java-rmi$(EXE_SUFFIX)
 231 endif
 232 
 233 # If you add libraries here, make sure you use the same techniques
 234 # as used for the other profile's libraries regarding debug files etc
 235 PROFILE_2_JRE_LIB_FILES :=
 236 
 237 PROFILE_2_JRE_OTHER_FILES :=
 238 
 239 PROFILE_2_JRE_JAR_FILES :=
 240 
 241 ifeq ($(OPENJDK_TARGET_OS), windows)
 242     PROFILE_3_JRE_BIN_FILES := \
 243         kinit$(EXE_SUFFIX) \
 244         klist$(EXE_SUFFIX) \
 245         ktab$(EXE_SUFFIX)
 246 else
 247     PROFILE_3_JRE_BIN_FILES :=
 248 endif
 249 
 250 PROFILE_3_LIBRARIES := \
 251     hprof \
 252     instrument \
 253     j2gss \
 254     j2pcsc \
 255     jaas_unix \
 256     jaas_nt \
 257     java_crw_demo \
 258     jsdt \
 259     management \
 260     npt \
 261     sctp
 262 
 263 ifeq ($(OPENJDK_TARGET_OS), windows)
 264     PROFILE_3_LIBRARIES += w2k_lsa_auth
 265 else
 266     ifeq ($(OPENJDK_TARGET_OS), macosx)
 267         PROFILE_3_LIBRARIES += osxkrb5
 268     endif
 269 endif
 270 
 271 PROFILE_3_LIBRARIES := $(addprefix $(LIBRARY_PREFIX), $(PROFILE_3_LIBRARIES))
 272 PROFILE_3_DEBUG_FILES := $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(PROFILE_3_LIBRARIES)))
 273 PROFILE_3_LIBRARIES := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(PROFILE_3_LIBRARIES))
 274 PROFILE_3_DEBUG_FILES := $(call expand-debuginfo, $(PROFILE_3_DEBUG_FILES), $(PROFILE_3_LIBRARIES))
 275 PROFILE_3_LIBRARIES += $(PROFILE_3_DEBUG_FILES)
 276 
 277 ifneq ($(OPENJDK_TARGET_OS), windows)
 278     PROFILE_3_JRE_LIB_FILES := \
 279         $(addprefix $(LIBS_PREFIX), $(PROFILE_3_LIBRARIES))
 280 else
 281     # On windows libraries go into jre/bin
 282     PROFILE_3_JRE_BIN_FILES += $(PROFILE_3_LIBRARIES)
 283 endif
 284 
 285 PROFILE_3_JRE_LIB_FILES += \
 286     jvm.hprof.txt \
 287     management-agent.jar \
 288     management/jmxremote.access \
 289     management/jmxremote.password.template \
 290     management/management.properties \
 291     management/snmp.acl.template
 292 
 293 PROFILE_3_JRE_OTHER_FILES :=
 294 
 295 PROFILE_3_JRE_JAR_FILES := \
 296     management-agent.jar
 297 
 298 
 299 FULL_JRE_BIN_FILES := \
 300     orbd$(EXE_SUFFIX) \
 301     pack200$(EXE_SUFFIX) \
 302     policytool$(EXE_SUFFIX) \
 303     servertool$(EXE_SUFFIX) \
 304     tnameserv$(EXE_SUFFIX) \
 305     unpack200$(EXE_SUFFIX)
 306 
 307 JRE_LIBRARIES := \
 308     awt \
 309     awt_headless \
 310     awt_xawt \
 311     dcpr \
 312     dt_socket \
 313     fontmanager \
 314     jawt \
 315     jdwp \
 316     jfr \
 317     jpeg \
 318     jsound \
 319     jsoundalsa \
 320     kcms \
 321     mlib_image \
 322     splashscreen \
 323     t2k \
 324     unpack
 325 
 326 JRE_LIBRARIES := $(addprefix $(LIBRARY_PREFIX), $(JRE_LIBRARIES))
 327 JRE_DEBUG_FILES := $(foreach i, $(DEBUG_SUFFIX), $(addsuffix $i, $(JRE_LIBRARIES)))
 328 JRE_LIBRARIES := $(addsuffix $(SHARED_LIBRARY_SUFFIX), $(JRE_LIBRARIES))
 329 JRE_DEBUG_FILES := $(call expand-debuginfo, $(JRE_DEBUG_FILES), $(JRE_LIBRARIES))
 330 JRE_LIBRARIES += $(JRE_DEBUG_FILES)
 331 
 332 ifneq ($(OPENJDK_TARGET_OS), windows)
 333     FULL_JRE_LIB_FILES := \
 334         $(addprefix $(LIBS_PREFIX), $(JRE_LIBRARIES))
 335 else
 336     # On windows libraries go into jre/bin
 337     FULL_JRE_BIN_FILES += $(JRE_LIBRARIES)
 338 endif
 339 
 340 FULL_JRE_LIB_FILES += \
 341     charsets.jar \
 342     cmm/CIEXYZ.pf \
 343     cmm/GRAY.pf \
 344     cmm/LINEAR_RGB.pf \
 345     cmm/PYCC.pf \
 346     cmm/sRGB.pf \
 347     ext/cldrdata.jar \
 348     ext/dnsns.jar \
 349     ext/nashorn.jar \
 350     ext/zipfs.jar \
 351     flavormap.properties \
 352     fontconfig.RedHat.5.bfc \
 353     fontconfig.RedHat.5.properties.src \
 354     fontconfig.RedHat.6.bfc \
 355     fontconfig.RedHat.6.properties.src \
 356     fontconfig.SuSE.10.bfc \
 357     fontconfig.SuSE.10.properties.src \
 358     fontconfig.SuSE.11.bfc \
 359     fontconfig.SuSE.11.properties.src \
 360     fontconfig.Turbo.bfc \
 361     fontconfig.Turbo.properties.src \
 362     fontconfig.bfc \
 363     fontconfig.properties.src \
 364     fonts/LucidaBrightDemiBold.ttf \
 365     fonts/LucidaBrightDemiItalic.ttf \
 366     fonts/LucidaBrightItalic.ttf \
 367     fonts/LucidaBrightRegular.ttf \
 368     fonts/LucidaSansDemiBold.ttf \
 369     fonts/LucidaSansRegular.ttf \
 370     fonts/LucidaTypewriterBold.ttf \
 371     fonts/LucidaTypewriterRegular.ttf \
 372     fonts/fonts.dir \
 373     images/cursors/cursors.properties \
 374     images/cursors/invalid32x32.gif \
 375     images/cursors/motif_CopyDrop32x32.gif \
 376     images/cursors/motif_CopyNoDrop32x32.gif \
 377     images/cursors/motif_LinkDrop32x32.gif \
 378     images/cursors/motif_LinkNoDrop32x32.gif \
 379     images/cursors/motif_MoveDrop32x32.gif \
 380     images/cursors/motif_MoveNoDrop32x32.gif \
 381     jexec \
 382     jfr.jar \
 383     oblique-fonts/LucidaSansDemiOblique.ttf \
 384     oblique-fonts/LucidaSansOblique.ttf \
 385     oblique-fonts/LucidaTypewriterBoldOblique.ttf \
 386     oblique-fonts/LucidaTypewriterOblique.ttf \
 387     oblique-fonts/fonts.dir \
 388     psfont.properties.ja \
 389     psfontj2d.properties \
 390     sound.properties
 391 
 392 FULL_JRE_OTHER_FILES := \
 393     man/ja_JP.UTF-8/man1/java.1 \
 394     man/ja_JP.UTF-8/man1/javaws.1 \
 395     man/ja_JP.UTF-8/man1/keytool.1 \
 396     man/ja_JP.UTF-8/man1/orbd.1 \
 397     man/ja_JP.UTF-8/man1/pack200.1 \
 398     man/ja_JP.UTF-8/man1/policytool.1 \
 399     man/ja_JP.UTF-8/man1/rmid.1 \
 400     man/ja_JP.UTF-8/man1/rmiregistry.1 \
 401     man/ja_JP.UTF-8/man1/servertool.1 \
 402     man/ja_JP.UTF-8/man1/tnameserv.1 \
 403     man/ja_JP.UTF-8/man1/unpack200.1 \
 404     man/man1/java.1 \
 405     man/man1/javaws.1 \
 406     man/man1/keytool.1 \
 407     man/man1/orbd.1 \
 408     man/man1/pack200.1 \
 409     man/man1/policytool.1 \
 410     man/man1/rmid.1 \
 411     man/man1/rmiregistry.1 \
 412     man/man1/servertool.1 \
 413     man/man1/tnameserv.1 \
 414     man/man1/unpack200.1
 415 
 416 FULL_JRE_JAR_FILES := \
 417     charsets.jar \
 418     ext/cldrdata.jar \
 419     ext/dnsns.jar \
 420     ext/nashorn.jar \
 421     ext/zipfs.jar \
 422     jfr.jar
 423