Makefile revision 517
0N/A#
381N/A# Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved.
0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A#
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#
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#
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#
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#
0N/A
0N/A#
0N/A# Java Launcher Infrastructure Library (libjli)
0N/A#
0N/A# This library provides shared support for the Java launcher in all of
0N/A# its manifestations (java, javaw, javac, ...).
0N/A#
0N/ABUILDDIR = ../..
0N/ALIBRARY = jli
0N/APRODUCT = java
0N/A
0N/A#
0N/A# Must be included before Defs.gmk to be functional.
0N/A#
0N/A# Note that for Windows, both a dynamic and static version are built.
0N/A# Doing the compiles with the static library specified can be overridden
0N/A# by the link step, but not the reverse.
0N/A#
0N/AMS_RUNTIME_STATIC = true
0N/A
0N/Ainclude $(BUILDDIR)/common/Defs.gmk
0N/A
0N/AZLIB_VERSION = 1.1.3
0N/AZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
0N/ALAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
0N/ALAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
0N/A
0N/Aifeq ($(ARCH_FAMILY), amd64)
0N/AERGO_FAMILY=i586
0N/Aelse
0N/AERGO_FAMILY=$(ARCH_FAMILY)
0N/Aendif
0N/A
0N/A
0N/A#
0N/A# Files to compile.
0N/A#
0N/AFILES_c = \
0N/A java.c \
0N/A splashscreen_stubs.c \
0N/A java_md.c \
0N/A parse_manifest.c \
0N/A version_comp.c \
0N/A wildcard.c \
0N/A jli_util.c \
0N/A inflate.c \
0N/A infblock.c \
0N/A inftrees.c \
0N/A infcodes.c \
0N/A inffast.c \
0N/A infutil.c \
0N/A zadler32.c \
0N/A zutil.c
0N/A
0N/Aifneq ($(PLATFORM), windows)
0N/A
0N/AFILES_c += \
0N/A $(CTARGDIR)ergo.c \
0N/A $(CTARGDIR)ergo_$(ERGO_FAMILY).c
0N/Aendif
0N/A
0N/A
0N/A# Names of arch directories
0N/ALIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"'
0N/Aifeq ($(PLATFORM), solaris)
0N/A LIBARCH_DEFINES += -DLIBARCH32NAME='"$(LIBARCH32)"'
0N/A LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"'
0N/Aendif
0N/A
0N/AOTHER_CPPFLAGS += $(LIBARCH_DEFINES)
0N/A
0N/A
0N/Aifneq ($(PLATFORM), windows) # UNIX systems
0N/A LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
0N/A # Note: its important to keep this order meaning -lc is the
0N/A # last library otherwise it could cause compatibility issues
0N/A # by pulling in SUNW_private symbols from libc
0N/A LDLIBS = -ldl -lc
0N/Aifeq ($(USE_PTHREADS),true)
0N/A LDLIBS += -lpthread
0N/Aendif # USE_PTHREADS
0N/Aendif # PLATFORM
0N/A
0N/Aifeq ($(PLATFORM), windows)
0N/A EXTRA_LIBS = advapi32.lib \
16N/A comctl32.lib \
0N/A user32.lib
0N/A
0N/A JAVALIB =
0N/A OTHER_LCF = -export:JLI_Launch \
0N/A -export:JLI_ManifestIterate \
517N/A -export:JLI_SetTraceLauncher \
517N/A -export:JLI_ReportErrorMessage \
517N/A -export:JLI_ReportErrorMessageSys \
517N/A -export:JLI_ReportMessage \
517N/A -export:JLI_ReportExceptionDescription
0N/A
0N/Aendif
0N/A
0N/AOTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
0N/AOTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC)
0N/AOTHER_INCLUDES += -I$(ZIP_SRC)
0N/A
0N/A#
0N/A# Library to compile.
0N/A#
0N/Ainclude $(BUILDDIR)/common/Mapfile-vers.gmk
0N/Ainclude $(BUILDDIR)/common/Library.gmk
0N/A
0N/A#
0N/A# On Windows, some executable objects need to be statically linked against
0N/A# the jli library. Hence, we need both a standard library (archive) and
0N/A# an import library (associated with a dll). These both usually have the
0N/A# extension .LIB, so they need to be placed in different directories. The
0N/A# import library is build (as usual) in the $(OBJDIR) directory while the
0N/A# standard library is built in a "static" subdirectory. The standard library
0N/A# is not delivered as part of the product, but is only needed as part of
0N/A# the build process. The import library is built by the standard rules
0N/A# in Library.gmk. The additional rules which follow build the standard
0N/A# library.
0N/A#
0N/Aifeq ($(PLATFORM), windows)
0N/A
0N/ASTATIC_LIBRARY_DIR = $(OBJDIR)/static
0N/ASTATIC_LIBRARY_NAME = $(LIBPREFIX)$(LIBRARY).lib
0N/ASTATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME)
0N/A
0N/A$(STATIC_LIBRARY_DIR): $(OBJDIR)
0N/A @$(prep-target)
0N/A @$(MKDIR) $(STATIC_LIBRARY_DIR)
0N/A
0N/A$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR)
0N/A @$(prep-target)
0N/A $(LIBEXE) -nologo -out:$@ $(FILES_o)
0N/A
0N/Alibrary:: $(STATIC_LIBRARY)
0N/A
0N/Aendif # PLATFORM
0N/A
0N/A#
0N/A# Add to ambient vpath so we pick up the library files
0N/A#
0N/Avpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC)