jdk/make/common/Defs.gmk
author rfield
Tue, 20 Nov 2012 09:58:55 -0800
changeset 14554 4e29b285c723
parent 13703 dd844a010010
child 20887 e6ca3d58bfe9
permissions -rw-r--r--
8003639: convert lambda testng tests to jtreg and add them Reviewed-by: mcimadamore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
12853
7bdaa5aefd3d 7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents: 12047
diff changeset
     2
# Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
# accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
#
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4917
diff changeset
    23
# questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
# Common variables used by all the Java makefiles.  This file should
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
# not contain rules.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
# WARNING: This file is shared with other workspaces.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
#          So when it includes other files, it must use JDK_TOPDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
139
05173e59b878 6674232: OPENJDK=false is same as OPENJDK=true
ohair
parents: 33
diff changeset
    35
# Check for strange explicit settings (change to empty or true)
05173e59b878 6674232: OPENJDK=false is same as OPENJDK=true
ohair
parents: 33
diff changeset
    36
ifdef OPENJDK
05173e59b878 6674232: OPENJDK=false is same as OPENJDK=true
ohair
parents: 33
diff changeset
    37
  ifneq ($(OPENJDK),true)
05173e59b878 6674232: OPENJDK=false is same as OPENJDK=true
ohair
parents: 33
diff changeset
    38
    x:=$(error "OPENJDK (if defined) can only be set to true")
05173e59b878 6674232: OPENJDK=false is same as OPENJDK=true
ohair
parents: 33
diff changeset
    39
  endif
05173e59b878 6674232: OPENJDK=false is same as OPENJDK=true
ohair
parents: 33
diff changeset
    40
endif
05173e59b878 6674232: OPENJDK=false is same as OPENJDK=true
ohair
parents: 33
diff changeset
    41
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
# On Solaris, the 'make' utility from Sun will not work with these makefiles.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
#    This little rule is only understood by Sun's make, and is harmless
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
#    when seen by the GNU make tool. If using Sun's make, this causes the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
#    make command to fail.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
SUN_MAKE_TEST:sh = echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
ifndef JDK_TOPDIR
32
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    51
  ifdef BUILDDIR
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    52
    JDK_TOPDIR=$(BUILDDIR)/..
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    53
  else
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    54
    JDK_TOPDIR:=$(error "ERROR: Cannot define top of jdk repository")
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    55
  endif
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    56
endif
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    57
ifndef BUILDDIR
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    58
  # Hack, due to deploy repository using this file.
d190436d5b3e 6672777: Broken deploy build from jdk fix 6668781 for cygwin windows
ohair
parents: 30
diff changeset
    59
  BUILDDIR=$(JDK_TOPDIR)/make
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
ifndef JDK_MAKE_SHARED_DIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
  JDK_MAKE_SHARED_DIR=$(JDK_TOPDIR)/make/common/shared
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
include $(JDK_MAKE_SHARED_DIR)/Platform.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
TOPDIR=$(BUILDDIR)/..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
include $(JDK_TOPDIR)/make/common/CancelImplicits.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
# Historically PLATFORM_SRC used to be src/$(PLATFORM), but we switched it to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
# src/solaris so if you want to build on Linux you didn't need a src/linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
# directory.  In an ideal world it would be called src/genunix but we are not
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
# there yet.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
ifndef SHARE_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    77
  SHARE_SRC    = $(BUILDDIR)/../src/share
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
# Files that cannot be included in the OpenJDK distribution are
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
# collected under a parent directory which contains just those files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
ifndef CLOSED_SRC
30
7ea1edf98bfe 6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents: 2
diff changeset
    83
  CLOSED_SRC  = $(BUILDDIR)/../src/closed
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
7308
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    86
# If CLOSE_SRC_INCLUDED isn't set to true, check if there's any
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    87
# closed directory.
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    88
ifneq ($(CLOSED_SRC_INCLUDED), true)
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    89
  CLOSED_SRC_INCLUDED := $(shell \
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    90
    if [ -d $(CLOSED_SRC) ] ; then \
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    91
      echo true; \
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    92
    else \
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    93
      echo false; \
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    94
    fi)
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    95
endif
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    96
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    97
# Set OPENJDK based on CLOSED_SRC_INCLUDED
95b4878b4890 6992226: Missing windows COMPANY file property settings
ccheung
parents: 6681
diff changeset
    98
ifeq ($(CLOSED_SRC_INCLUDED), false)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
  OPENJDK = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
# Define where closed directories are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
  CLOSED_SRC =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
  CLOSED_SHARE_SRC =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
  ifndef CLOSED_SHARE_SRC
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
    CLOSED_SHARE_SRC    = $(CLOSED_SRC)/share
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
13703
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   112
# We allow for potential specialization of build files. This has to be
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   113
# done on a file-by-file, case-by-case basis. Here we define the basic control
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   114
# over where custom files are being used. Later we will -include the custom
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   115
# Defs.gmk if present. This works best because all Makefiles include defs.gmk.
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   116
# In other cases we can either have foo.gmk include custom/foo.gmk, or
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   117
# a Makefile can do:
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   118
#  include foo.gmk
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   119
#  -include $CUSTOM_MAKE_DIR/foo.gmk
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   120
#
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   121
# For non-OpenJDK builds the default location is the make/closed repository.
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   122
# For OpenJDK builds a real value has to be supplied externally.
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   123
ifneq ($(OPENJDK),true)
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   124
  CUSTOM_MAKE_DIR = $(BUILDDIR)/closed
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   125
endif
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   126
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
# Get platform definitions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   133
#
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   134
# Cross-compilation Settings
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   135
#
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   136
ifdef CROSS_COMPILE_ARCH
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   137
  # Can't run the tools we just built
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   138
  USE_ONLY_BOOTDIR_TOOLS = true
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   139
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   140
  # When cross-compiling CC generates code for the target, but
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   141
  # some parts of the build generate C code that has to be compiled
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   142
  # and executed on the build host - HOST_CC is the 'local' compiler.
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   143
  # For linux the default is /usr/bin/gcc; other platforms need to
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   144
  # set it explicitly
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   145
  ifeq ($(PLATFORM), linux)
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   146
    ifndef HOST_CC
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   147
      HOST_CC = $(USRBIN_PATH)gcc
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   148
    endif
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   149
  endif
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   150
else
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   151
  # Must set HOST_CC if not already set
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   152
  ifndef HOST_CC
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   153
    HOST_CC = $(CC)
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   154
  endif
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   155
endif
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   156
8792
cd1dceb2d665 7027897: Build support for client-VM only configurations
dholmes
parents: 7967
diff changeset
   157
# Reset the VM name for client-only builds
cd1dceb2d665 7027897: Build support for client-VM only configurations
dholmes
parents: 7967
diff changeset
   158
ifdef BUILD_CLIENT_ONLY
cd1dceb2d665 7027897: Build support for client-VM only configurations
dholmes
parents: 7967
diff changeset
   159
  VM_NAME = client
cd1dceb2d665 7027897: Build support for client-VM only configurations
dholmes
parents: 7967
diff changeset
   160
endif
cd1dceb2d665 7027897: Build support for client-VM only configurations
dholmes
parents: 7967
diff changeset
   161
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
# Freetype logic is applicable to OpenJDK only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
#if we use system lib we do not need to copy it to build tree
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
USING_SYSTEM_FT_LIB=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
  DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/win32/freetype-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
  DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(PLATFORM)/freetype-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
  # historically for Solaris we have slightly different devtools 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
  # naming conventions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
  DEVTOOLS_FT_DIR=$(JDK_DEVTOOLS_DIR)/$(ARCH_FAMILY)/freetype-$(ARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
DEVTOOLS_FT_DIR_EXISTS = $(shell \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
  if [ -f $(DEVTOOLS_FT_DIR)/include/ft2build.h ] ; then \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
    echo true; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
  else \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
    echo false; \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
  fi)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
  ifdef ALT_FREETYPE_LIB_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
    FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH)
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   191
    ifeq ($(PLATFORM), macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   192
      USING_SYSTEM_FT_LIB=true
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   193
    endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
    ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
      FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
    else
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   198
      ifeq ($(PLATFORM), macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   199
        FREETYPE_LIB_PATH = /usr/X11R6/lib
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   200
      else
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   201
        FREETYPE_LIB_PATH = /usr/lib
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   202
      endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
      USING_SYSTEM_FT_LIB=true
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
  endif 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
  ifdef ALT_FREETYPE_HEADERS_PATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
    FREETYPE_HEADERS_PATH = $(ALT_FREETYPE_HEADERS_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
    ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
      FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
    else
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   213
      ifeq ($(PLATFORM), macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   214
        FREETYPE_HEADERS_PATH = /usr/X11R6/include
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   215
      else
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   216
        FREETYPE_HEADERS_PATH = /usr/include
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   217
      endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
    endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
#
3704
bd98409d8c32 4963968: zlib should be upgraded to current version of zlib
sherman
parents: 2301
diff changeset
   223
# zlib version
bd98409d8c32 4963968: zlib should be upgraded to current version of zlib
sherman
parents: 2301
diff changeset
   224
#
11112
6d340c7b6a32 7110149: Update the JDK8 bundled zlib library to the latest version 1.2.5
sherman
parents: 10798
diff changeset
   225
ZLIB_VERSION = 1.2.5
3704
bd98409d8c32 4963968: zlib should be upgraded to current version of zlib
sherman
parents: 2301
diff changeset
   226
bd98409d8c32 4963968: zlib should be upgraded to current version of zlib
sherman
parents: 2301
diff changeset
   227
bd98409d8c32 4963968: zlib should be upgraded to current version of zlib
sherman
parents: 2301
diff changeset
   228
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
# Localizations for the different parts of the product beyond English
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
7468
6cab86212adb 6925851: Localize JRE into pt_BR
yhuang
parents: 6681
diff changeset
   232
JRE_LOCALES   = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
6cab86212adb 6925851: Localize JRE into pt_BR
yhuang
parents: 6681
diff changeset
   233
PLUGIN_LOCALES = de es fr it ja ko pt_BR sv zh_CN zh_TW zh_HK
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
JDK_LOCALES  = ja zh_CN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
# A list of locales we support but don't have resource files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
# This is defined to optimize the search of resource bundles.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
JRE_NONEXIST_LOCALES = en en_US de_DE es_ES fr_FR it_IT ja_JP ko_KR sv_SE zh
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
#
10798
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   243
# For now, most libraries except libjava and libjvm itself link against libjvm
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   244
# and libjava, the latter for its exported common utilities. libjava only
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   245
# links against libjvm. Programs' makefiles take their own responsibility for
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
# adding other libs.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
#
10798
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   248
# The makefiles for these packages do not link against libjvm and libjava.
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   249
# This list will eventually go away and each Programs' makefiles
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   250
# will have to explicitly declare that they want to link to libjava/libjvm
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   251
#
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   252
NO_JAVALIB_PKGS = \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   253
		sun.security.mscapi \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   254
		sun.security.krb5 \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   255
		sun.security.pkcs11 \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   256
		sun.security.jgss \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   257
		sun.security.jgss.wrapper \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   258
		sun.security.ec \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   259
		sun.security.smartcardio \
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   260
		com.sun.security.auth.module
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   261
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
ifdef PACKAGE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
# put JAVALIB first, but do not lose any platform specific values....
10798
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   264
  ifeq (,$(findstring $(PACKAGE),$(NO_JAVALIB_PKGS)))
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   265
    LDLIBS_COMMON = $(JAVALIB)
413b731e1818 7103549: Remove dependencies on libjava and libjvm from security libraries
chegar
parents: 10292
diff changeset
   266
  endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
endif # PACKAGE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
# Libraries that must appear ahead of libc.so on the link command line
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
ifdef PROGRAM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
  ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
    LDLIBS_COMMON = -lthread -ldl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
  ifeq ($(PLATFORM), linux)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
    LDLIBS_COMMON = -ldl
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   282
  ifeq ($(PLATFORM), macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   283
    LDLIBS_COMMON = -pthread
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   284
  endif
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   285
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
endif # PROGRAM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
LDLIBS_COMMON += $(EXTRA_LIBS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
# for generated libraries
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
LIBDIR              = $(OUTPUTDIR)/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
ABS_LIBDIR          = $(ABS_OUTPUTDIR)/lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
# Optional place to save the windows .lib files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
LIBFILES_DIR        = $(OUTPUTDIR)/libfiles
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
# for ext jre files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
EXTDIR              = $(LIBDIR)/ext
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
# for generated include files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
INCLUDEDIR          = $(OUTPUTDIR)/include
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
# for generated class files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
CLASSBINDIR         = $(OUTPUTDIR)/classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
DEMOCLASSDIR        = $(OUTPUTDIR)/democlasses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
# for generated tool class files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
BUILDTOOLCLASSDIR   = $(OUTPUTDIR)/btclasses
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
# for build tool jar files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
BUILDTOOLJARDIR     = $(OUTPUTDIR)/btjars
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
ABS_BUILDTOOLJARDIR = $(ABS_OUTPUTDIR)/btjars
305
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 139
diff changeset
   307
# for generated tool class files
9b905a071b0e 6672405: OPENJDK build: jdk7/jdk/make/tools/freetypecheck leaves dirt behind
ohair
parents: 139
diff changeset
   308
BUILDTOOLBINDIR     = $(OUTPUTDIR)/btbins
12853
7bdaa5aefd3d 7170449: Management is completely broken at least on Solaris 11 X86
dcubed
parents: 12047
diff changeset
   309
ABS_BUILDTOOLBINDIR = $(ABS_OUTPUTDIR)/btbins
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
# for generated java source files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
GENSRCDIR           = $(OUTPUTDIR)/gensrc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
# for generated C source files (not javah)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
GENNATIVESRCDIR     = $(OUTPUTDIR)/gennativesrc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
# for imported source files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
IMPORTSRCDIR        = $(OUTPUTDIR)/impsrc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
# for imported documents
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
IMPORTDOCDIR        = $(OUTPUTDIR)/impdoc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
# for generated demo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
DEMODIR             = $(OUTPUTDIR)/demo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
# for sample code
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
SAMPLEDIR           = $(OUTPUTDIR)/sample
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
# for generated documentation
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
DOCSDIR             = $(OUTPUTDIR)/docs$(DOCSDIRSUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
DOCSDIRSUFFIX       =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
# The MESSAGE, WARNING and ERROR files are used to store sanityck and 
6681
e721d11e4826 6987114: Fix top level "test" Makefile logic, add jdk/make/Makefile test target
ohair
parents: 5506
diff changeset
   327
# warnings and errors. 
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
ifndef ERROR_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
  ERROR_FILE   = $(OUTPUTDIR)/sanityCheckErrors.txt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
ifndef WARNING_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
  WARNING_FILE = $(OUTPUTDIR)/sanityCheckWarnings.txt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
ifndef MESSAGE_FILE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
  MESSAGE_FILE = $(OUTPUTDIR)/sanityCheckMessages.txt
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
JDK_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2sdk-image
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
JRE_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-image
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
#where the demo source can be found
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
DEMOSRCDIR          = $(SHARE_SRC)/demo
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
10292
ed7db6a12c2a 7067811: Update demo/sample code to state it should not be used for production
nloodin
parents: 9021
diff changeset
   344
#where the sample source can be found
ed7db6a12c2a 7067811: Update demo/sample code to state it should not be used for production
nloodin
parents: 9021
diff changeset
   345
SAMPLESRCDIR          = $(SHARE_SRC)/sample
ed7db6a12c2a 7067811: Update demo/sample code to state it should not be used for production
nloodin
parents: 9021
diff changeset
   346
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
# An attempt is made to generate unique enough directories for the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
# generated files to not have name collisisons. Most build units
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
# defines PRODUCT (except Release.gmk), but then they may or may 
7967
aa85f513e8f2 6993732: Remove the HPI
alanb
parents: 7668
diff changeset
   350
# not define PACKAGE, PROGRAM, and LIBRARY. This code attempts to
aa85f513e8f2 6993732: Remove the HPI
alanb
parents: 7668
diff changeset
   351
# generate a unique OBJDIR/CLASSHDRDIR for each build unit based
aa85f513e8f2 6993732: Remove the HPI
alanb
parents: 7668
diff changeset
   352
# on which of those values are set within each build unit.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
UNIQUE_LOCATION_STRING = tmp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
ifneq ($(PRODUCT),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
  UNIQUE_LOCATION_STRING += /$(PRODUCT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
ifneq ($(PACKAGE),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
  UNIQUE_LOCATION_STRING += /$(PACKAGE)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
ifneq ($(PROGRAM),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
  UNIQUE_LOCATION_STRING += /$(PROGRAM)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
ifneq ($(LIBRARY),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
  ifneq ($(LIBRARY_OUTPUT),)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
    UNIQUE_LOCATION_STRING += /$(LIBRARY_OUTPUT)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
  else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
    UNIQUE_LOCATION_STRING += /$(LIBRARY)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
  endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
# the use of += above makes a space separated list which we need to 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
# remove for filespecs.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
NULLSTRING :=
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
ONESPACE := $(NULLSTRING) # space before this comment is required.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
UNIQUE_PATH = $(subst $(ONESPACE),,$(UNIQUE_LOCATION_STRING))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
# TEMPDIR is a unique general purpose directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
# need to use 'override' because GNU Make on Linux exports the wrong
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
# value.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
override TEMPDIR      = $(OUTPUTDIR)/$(UNIQUE_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
override ABS_TEMPDIR  = $(ABS_OUTPUTDIR)/$(UNIQUE_PATH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
# This must be created right away for pattern rules in Sanity.gmk to work.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
dummy1:=$(shell $(MKDIR) -p $(TEMPDIR))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
dummy2:=$(shell $(MKDIR) -p $(TEMP_DISK))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
# OBJDIRNAME is the name of the directory where the object code is to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
#   be placed. It's name depends on whether the data model architecture 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
#   is 32-bit or not.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
ifneq ($(ARCH_DATA_MODEL), 32)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
  OBJDIRNAME  = obj$(ARCH_DATA_MODEL)$(OBJDIRNAME_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
  OBJDIRNAME  = obj$(OBJDIRNAME_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
OBJDIR      = $(TEMPDIR)/$(OBJDIRNAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
# CLASSHDRDIR is where the generated C Class Header files go.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
CLASSHDRDIR = $(TEMPDIR)/CClassHeaders
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
# CLASSDESTDIR can be used to specify the directory where generated classes
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
# are to be placed. The default is CLASSBINDIR.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
ifndef CLASSDESTDIR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
CLASSDESTDIR = $(CLASSBINDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
INCLUDES = -I. -I$(CLASSHDRDIR) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
	$(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(OTHER_INCLUDES)
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   416
OTHER_CPPFLAGS += $(INCLUDES)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
# vpaths.  These are the default locations searched for source files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
# GNUmakefiles of individual areas often override the default settings.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
# There are no longer default vpath entries for C and assembler files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   422
# so we can ensure that libraries don't get their hands on JVM files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   423
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   424
# We define an intermediate variable for Java files because
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
# we use its value later to help define $SOURCEPATH
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
12047
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   427
ifeq ($(PLATFORM), macosx)
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   428
  VPATH0.java = $(subst $(ONESPACE),:,$(GENSRCDIR) $(call JavaSrcDirList,,classes))
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   429
else
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   430
  VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   431
endif
320a714614e9 7113349: Initial changeset for Macosx port to jdk
michaelm
parents: 11678
diff changeset
   432
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
ifdef OPENJDK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
  VPATH.java = $(VPATH0.java)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   437
  # If filenames are duplicated between open/closed workspaces, prefer
90ce3da70b43 Initial load
duke
parents:
diff changeset
   438
  # the closed files.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   439
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
  # Source ordering is important: some targets depend on closed files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
  # replacing open ones, and thus the closed file sources must be found
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
  # before the open ones.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
  # Don't reorder without consulting the teams that depend on this behavior.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
  #
90ce3da70b43 Initial load
duke
parents:
diff changeset
   446
  VPATH.java = $(CLOSED_PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(CLOSED_SHARE_SRC)/classes$(CLASSPATH_SEPARATOR)$(VPATH0.java)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   447
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   448
vpath %.java $(VPATH.java)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
vpath %.class $(CLASSBINDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
vpath %.$(OBJECT_SUFFIX) $(OBJDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
# VPATH.h is used elsewhere to generate include flags.  By default, 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
# anyone has access to the include files that the JVM area exports,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
# namely jni.h, jvm.h, and jni_utils.h, plus their platform-specific
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
# relatives.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
#
11678
9d22454e9dad 7132386: makefile support for tracing/Java Flight Recorder framework phase I
rbackman
parents: 11112
diff changeset
   458
VPATH0.h =   $(PLATFORM_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/javavm/export
9d22454e9dad 7132386: makefile support for tracing/Java Flight Recorder framework phase I
rbackman
parents: 11112
diff changeset
   459
ifdef OPENJDK
9d22454e9dad 7132386: makefile support for tracing/Java Flight Recorder framework phase I
rbackman
parents: 11112
diff changeset
   460
  VPATH.h = $(VPATH0.h)
9d22454e9dad 7132386: makefile support for tracing/Java Flight Recorder framework phase I
rbackman
parents: 11112
diff changeset
   461
else
9d22454e9dad 7132386: makefile support for tracing/Java Flight Recorder framework phase I
rbackman
parents: 11112
diff changeset
   462
  VPATH.h = $(CLOSED_SHARE_SRC)/javavm/export$(CLASSPATH_SEPARATOR)$(VPATH0.h)
9d22454e9dad 7132386: makefile support for tracing/Java Flight Recorder framework phase I
rbackman
parents: 11112
diff changeset
   463
endif
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
vpath %.h   $(VPATH.h)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   465
90ce3da70b43 Initial load
duke
parents:
diff changeset
   466
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   467
# Used in two ways: helps link against libjava.so. Also if overridden
90ce3da70b43 Initial load
duke
parents:
diff changeset
   468
# determines where your shared library is installed.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   469
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   470
ifndef LIB_LOCATION
90ce3da70b43 Initial load
duke
parents:
diff changeset
   471
  LIB_LOCATION    =  $(LIBDIR)/$(LIBARCH)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
# Java header and stub variables
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
CLASSHDRS     = $(patsubst %,$(CLASSHDRDIR)/%.h,$(subst .,_,$(CLASSES.export)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   478
CLASSSTUBOBJS = classstubs.$(OBJECT_SUFFIX)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   479
STUBPREAMBLE  = $(INCLUDEDIR)/StubPreamble.h
90ce3da70b43 Initial load
duke
parents:
diff changeset
   480
90ce3da70b43 Initial load
duke
parents:
diff changeset
   481
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
# Classpath seen by javac (different from the one seen by the VM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
# running javac), and useful variables.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
SOURCEPATH	= $(VPATH.java)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
PKG		= $(shell $(EXPR) $(PACKAGE) : '\([a-z]*\)')
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
PKGDIR		= $(subst .,/,$(PACKAGE))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
# The java/javac/jdk variables (JAVAC_CMD, JAVA_CMD, etc.)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   494
UNIQUE_PATH_PATTERN = $(subst /,.,$(UNIQUE_PATH))
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   495
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   496
# Run MAKE $@ for a launcher:
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   497
#   $(call make-launcher, name, mainclass, java-args, main-args)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   498
define make-launcher
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   499
$(CD) $(BUILDDIR)/launchers && \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   500
$(MAKE) -f Makefile.launcher \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   501
        PROGRAM=$(strip $1) \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   502
        MAIN_CLASS=$(strip $2) \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   503
        MAIN_JAVA_ARGS="$(strip $3)" \
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   504
        MAIN_ARGS="$(strip $4)"
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   505
endef
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   506
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   507
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
# Convenient macros
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
# Prepare $@ target, remove old one and making sure directory exists
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
define prep-target
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
$(MKDIR) -p $(@D)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
$(RM) $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
# Simple install of $< file to $@
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
define install-file
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
$(CP) $< $@
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   521
endef
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   522
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   523
define chmod-file
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   524
$(CHMOD) $1 $@
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   525
endef
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   526
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   527
define install-sym-link
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   528
$(LN) -s $1 $@
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   529
endef
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   530
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   531
define install-manifest-file
8583
15dea0fdc2ea 7025631: Remove the modules build support from jdk 7
mchung
parents: 7967
diff changeset
   532
$(install-file)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
# Cleanup rule for after debug java run (hotspot.log file is left around)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
#   (This could be an old leftover file in a read-only area, use the @- prefix)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
HOTSPOT_LOG_NAME = hotspot.log
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
define java-vm-cleanup
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
if [ -w $(HOTSPOT_LOG_NAME) ] ; then $(RM) $(HOTSPOT_LOG_NAME); fi
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
# Current directory
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
CURRENT_DIRECTORY := $(shell $(PWD))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
# Create BYFILE OPT and DBG settings, if CFLAGS_OPT/foobar.o is set then it is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
#    used for this file, otherwise the default settings are used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
CFLAGS_$(VARIANT)/BYFILE    = $(CFLAGS_$(VARIANT)/$(@F)) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
                              $(CFLAGS_$(VARIANT)$(CFLAGS_$(VARIANT)/$(@F)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
CXXFLAGS_$(VARIANT)/BYFILE  = $(CXXFLAGS_$(VARIANT)/$(@F)) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
                              $(CXXFLAGS_$(VARIANT)$(CXXFLAGS_$(VARIANT)/$(@F)))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
13678
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   554
# Command line define to provide basename of file being compiled to source.
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   555
#   The C macro THIS_FILE can replace the use of __FILE__ in the source
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   556
#   files for the current filename being compiled.
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   557
#   The value of the __FILE__ macro is unpredictable and can be anything
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   558
#   from a relative path to a full path, THIS_FILE will be more consistent..
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   559
#   The THIS_FILE macro will always be just the basename of the file being
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   560
#   compiled.
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   561
#   Different string literals in the the object files makes it difficult to
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   562
#   compare shared libraries from different builds.
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   563
#
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   564
#   NOTE: If the THIS_FILE macro is actually expanded while in an included
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   565
#         source file, it will not return the name of the included file.
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   566
#
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   567
CPP_THIS_FILE = -DTHIS_FILE='"$(<F)"'
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   568
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
# Tool flags
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
#
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   572
# EXTRA_CFLAGS are used to define cross-compilation options
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   573
#
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
ASFLAGS         = $(ASFLAGS_$(VARIANT)) $(ASFLAGS_COMMON) $(OTHER_ASFLAGS)
8796
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   575
CFLAGS          = $(CFLAGS_$(VARIANT)/BYFILE)   $(CFLAGS_COMMON) $(OTHER_CFLAGS) $(EXTRA_CFLAGS)
604a43386301 7027910: Add basic cross-compilation support and add ARM/PPC to the known architectures in the open code
dholmes
parents: 8793
diff changeset
   576
CXXFLAGS        = $(CXXFLAGS_$(VARIANT)/BYFILE) $(CXXFLAGS_COMMON) $(OTHER_CXXFLAGS) $(EXTRA_CFLAGS)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
CPPFLAGS        = $(CPPFLAGS_$(VARIANT)) $(CPPFLAGS_COMMON) $(OTHER_CPPFLAGS) \
13678
5c8001201f98 7197771: Adjust jdk sources to avoid use of implementation defined value of __FILE__
ohair
parents: 12853
diff changeset
   578
		  $(DEFINES) $(OPTIONS:%=-D%) $(CPP_THIS_FILE)
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
LDFLAGS         = $(LDFLAGS_$(VARIANT)) $(LDFLAGS_COMMON) $(OTHER_LDFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
LDLIBS          = $(OTHER_LDLIBS) $(LDLIBS_$(VARIANT)) $(LDLIBS_COMMON)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
LINTFLAGS       = $(LINTFLAGS_$(VARIANT)) $(LINTFLAGS_COMMON) \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
		  $(OTHER_LINTFLAGS)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
4116
54b55d640d9a 6888709: Change use of -DX=\""Y\"" to -DX='"Y"', consistently for all platforms
ohair
parents: 3704
diff changeset
   584
VERSION_DEFINES = -DRELEASE='"$(RELEASE)"'
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
ifdef INSANE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
  export INSANE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
ifdef ALT_COPYRIGHT_YEAR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
  COPYRIGHT_YEAR = $(ALT_COPYRIGHT_YEAR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
else
847
530bfef1ed6f 6548261: Use of SE in make/common/Defs-windows.gmk
ohair
parents: 715
diff changeset
   593
  COPYRIGHT_YEAR := $(shell $(DATE) '+%Y')
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
8694
6e5584652aea 7029704: JFB: Refix JFB Custom Revision Version Build/Makefile changes
asaha
parents: 8583
diff changeset
   596
ifndef OPENJDK
6e5584652aea 7029704: JFB: Refix JFB Custom Revision Version Build/Makefile changes
asaha
parents: 8583
diff changeset
   597
include $(JDK_TOPDIR)/make/closed/common/Defs.gmk
6e5584652aea 7029704: JFB: Refix JFB Custom Revision Version Build/Makefile changes
asaha
parents: 8583
diff changeset
   598
endif
6e5584652aea 7029704: JFB: Refix JFB Custom Revision Version Build/Makefile changes
asaha
parents: 8583
diff changeset
   599
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
# Install of imported file (JDK_IMPORT_PATH, or some other external location)
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   601
define install-importonly-file
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
@$(ECHO) "ASSEMBLY_IMPORT: $@"
1164
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   603
$(prep-target)
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   604
$(CP) $< $@
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   605
@if [ "$(PLATFORM)" = "linux" -a "$(@F)" = "libjvm.so" ] ; then     \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   606
  if [ -x /usr/sbin/selinuxenabled ] ; then                         \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   607
    /usr/sbin/selinuxenabled;                                       \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   608
    if [ $$? = 0 ] ; then                                           \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   609
      $(ECHO) "/usr/bin/chcon -t textrel_shlib_t $@";               \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   610
      /usr/bin/chcon -t textrel_shlib_t $@;                         \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   611
      if [ $$? != 0 ]; then                                         \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   612
        echo "ERROR: Cannot chcon $@";                              \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   613
      fi;                                                           \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   614
    fi;                                                             \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   615
  fi;                                                               \
fcf7f66faf68 6746409: Error: dl failure on line 689: Copies of libjvm.so need to have chcon (selinux) re-applied to them
ohair
parents: 919
diff changeset
   616
fi
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
endef
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
4665
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   619
define install-import-file
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   620
$(install-importonly-file)
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   621
endef
d14dc3d9e1fa 6911737: Module build: generate modules with native libraries and any other files not in jar
mchung
parents: 4116
diff changeset
   622
13703
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   623
-include $(CUSTOM_MAKE_DIR)/Defs.gmk
dd844a010010 7198325: Fix more $(sort) issues on lnk commands in makefiles, making binaries more consistent
ohair
parents: 13678
diff changeset
   624
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
.PHONY: all build clean clobber