Library.gmk revision 795
196N/A# Copyright 1995-2008 Sun Microsystems, Inc. All Rights Reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. Sun designates this 0N/A# particular file as subject to the "Classpath" exception as provided 0N/A# by Sun in the LICENSE file that accompanied this code. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A# CA 95054 USA or visit www.sun.com if you need additional information or 0N/A# have any questions. 0N/A# Generic makefile for building shared libraries. 0N/A# WARNING: This file is shared with other workspaces. 0N/A# So when it includes other files, it must use JDK_TOPDIR. 0N/A# in order to override the values defined inthat makefile. endif # INCREMENTAL_BUILD # List of all lint files, one for each .c file (only for C) # C++ libraries must be linked with CC. # FIXUP: unpack needs the zip .o files. So we must build zip? # If a Makefile has specified a pre-compiled closed src lib, just copy it. # We either need to import (copy) libraries in, or build them # 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. # 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 # 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 # Library building rules. # 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. # In VS2005 or VS2008 the link command creates a .manifest file that we want # to insert into the linked artifact so we do not need to track it separately. # Use ";#2" for .dll and ";#1" for .exe in the MT command below: # J2SE name required here /D
"J2SE_INTERNAL_NAME=$(LIBRARY)" \
# Install a .lib file if required. # 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 @
$(ECHO) "Rebuilding $@ because of $?"# Cross check all linted files against each other # OpenJDK rule is first so any lib is preferentially copied from that location. # In this case we are just copying the file. # Copies in the file from the JDK_IMPORT_PATH area endif # USE_BINARY_PLUG_LIBRARY # Class libraries with JNI native methods get a include to the package. # 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 # INCREMENTAL_BUILD