#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Generic makefile for building shared libraries.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
#
#
# It is important to define these *after* including Classes.gmk
# in order to override the values defined inthat makefile.
#
ACTUAL_LIBRARY_DIR = $(OBJDIR)
else # PLATFORM
ACTUAL_LIBRARY_DIR = $(OBJDIR)
endif #PLATFORM
else # LIBRARY
library:: $(ACTUAL_LIBRARY)
# MMM: why?
INCREMENTAL_BUILD=false
endif # PLATFORM
endif # INCREMENTAL_BUILD
# List of all lint files, one for each .c file (only for C)
#
# C++ libraries must be linked with CC.
#
else
#
# COMPILE_APPROACH: Different approaches to compile up the native object
# files as quickly as possible.
# The setting of parallel works best on Unix, batch on Windows.
#
@$(ECHO) "$<" >> $@
clean::
$(RM) $(COMPILE_FILES_o)
#
# COMPILE_APPROACH=parallel: Will trigger compilations (just compilations) to
# happen in parallel. Greatly decreases Unix build time, even on single CPU
# machines, more so on multiple CPU machines. Default is 2 compiles
# at a time, but can be adjusted with ALT_PARALLEL_COMPILE_JOBS.
# Note that each .d file will also be dependent on it's .o file, see
# Rules.gmk.
# Note this does not depend on Rules.gmk to work like batch (below)
# and this technique doesn't seem to help Windows build time nor does
# it work very well, it's possible the Windows Visual Studio compilers
# don't work well in a parallel situation, this needs investigation.
#
#
# COMPILE_APPROACH=batch: Will trigger compilations (just compilations) to
# happen in batch mode. Greatly decreases Windows build time.
# See logic in Rules.gmk for how compiles happen, the $(MAKE) in
# library_batch_compile below triggers the actions in Rules.gmk.
# Note that each .d file will also be dependent on it's .o file, see
# Rules.gmk.
#
$(MAKE) $(COMPILE_FILES_o)
#
# Library building rules.
#
else # LIBRARY
# build it into $(OBJDIR) so that the other generated files get put
# there, then copy just the DLL (and MAP file) to the requested directory.
#
$(MAP_OPTION) \
@$(call binary_file_verification,$@)
(set -e ; \
)
else
endif # LIBRARY
# JDK name required here
/D "JDK_FTYPE=0x2L"
#
# Install a .lib file if required.
#
clean::
endif # INSTALL_DOT_LIB
else # PLATFORM
#
# On Solaris, use mcs to write the version into the comment section of
# the shared library. On other platforms set this to false at the
# make command line.
#
ARFLAGS = -r
@$(ECHO) "Rebuilding $@ because of $?"
else # LIBRARY
@$(call binary_file_verification,$@)
endif # WRITE_LIBVERSION
# gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
# Use $(FIX_EMPTY_SEC_HDR_FLAGS) to clear the SHF_ALLOC flag (if set) from
# empty section headers until a fixed $(OBJCOPY) is available.
# An empty section header has sh_addr == 0 and sh_size == 0.
# This problem has only been seen on Solaris X64, but we call this tool
# on all Solaris builds just in case.
#
# $(OBJCOPY) --add-gnu-debuglink=... corrupts SUNW_* sections.
# Use $(ADD_GNU_DEBUGLINK) until a fixed $(OBJCOPY) is available.
(set -e ; \
)
else # PLATFORM != solaris
(set -e ; \
)
endif # PLATFORM == solaris
$(STRIP) $@
else
$(STRIP) -x $@
else
# assume Linux
$(STRIP) -g $@
# implied else here is no stripping at all
(set -e ; \
)
endif # LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
endif # ENABLE_FULL_DEBUG_SYMBOLS
endif # PLATFORM-!macosx
endif # LIBRARY
endif # PLATFORM
#
# Cross check all linted files against each other
#
lint.errors : $(FILES_ln)
#
# Class libraries with JNI native methods get a include to the package.
#
#
#
clean::
$(RM) -r $(ACTUAL_LIBRARY)
#
# INCREMENTAL_BUILD means that this workspace will be built over and over
# possibly incrementally. This means tracking the object file dependencies
# on include files so that sources get re-compiled when the include files
# change. When building from scratch and doing a one time build (like
# release engineering or nightly builds) set INCREMENTAL_BUILD=false.
#
#
# Workaround: gnumake sometimes says files is empty when it shouldn't
# was: files := $(foreach file, $(wildcard $(OBJDIR)/*.$(DEPEND_SUFFIX)), $(file))
#
#
# Only include these files if we have any.
#
endif # files
endif # INCREMENTAL_BUILD
#
# Default dependencies
#