annotate make/java/jli/Makefile @ 3853:6aeed99af874

7025631: Remove the modules build support from jdk 7 Reviewed-by: alanb, ohair
author mchung
date Wed, 09 Mar 2011 23:11:07 -0800
parents a06412e13bf7
children d7034302bc24
rev   line source
duke@0 1 #
ohair@3413 2 # Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
duke@0 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 #
duke@0 5 # This code is free software; you can redistribute it and/or modify it
duke@0 6 # under the terms of the GNU General Public License version 2 only, as
ohair@2486 7 # published by the Free Software Foundation. Oracle designates this
duke@0 8 # particular file as subject to the "Classpath" exception as provided
ohair@2486 9 # by Oracle in the LICENSE file that accompanied this code.
duke@0 10 #
duke@0 11 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 14 # version 2 for more details (a copy is included in the LICENSE file that
duke@0 15 # accompanied this code).
duke@0 16 #
duke@0 17 # You should have received a copy of the GNU General Public License version
duke@0 18 # 2 along with this work; if not, write to the Free Software Foundation,
duke@0 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 20 #
ohair@2486 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
ohair@2486 22 # or visit www.oracle.com if you need additional information or have any
ohair@2486 23 # questions.
duke@0 24 #
duke@0 25
duke@0 26 #
duke@0 27 # Java Launcher Infrastructure Library (libjli)
duke@0 28 #
duke@0 29 # This library provides shared support for the Java launcher in all of
duke@0 30 # its manifestations (java, javaw, javac, ...).
duke@0 31 #
duke@0 32 BUILDDIR = ../..
duke@0 33 LIBRARY = jli
duke@0 34 PRODUCT = java
duke@0 35
duke@0 36 #
duke@0 37 # Must be included before Defs.gmk to be functional.
duke@0 38 #
duke@0 39 # Note that for Windows, both a dynamic and static version are built.
duke@0 40 # Doing the compiles with the static library specified can be overridden
duke@0 41 # by the link step, but not the reverse.
duke@0 42 #
duke@0 43 MS_RUNTIME_STATIC = true
duke@0 44
duke@0 45 include $(BUILDDIR)/common/Defs.gmk
duke@0 46
duke@0 47 ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
duke@0 48 LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
duke@0 49 LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
duke@0 50
gbenson@1870 51 ifeq ($(ZERO_BUILD), true)
gbenson@1870 52 ERGO_FAMILY=zero
gbenson@1870 53 else
duke@0 54 ifeq ($(ARCH_FAMILY), amd64)
duke@0 55 ERGO_FAMILY=i586
duke@0 56 else
duke@0 57 ERGO_FAMILY=$(ARCH_FAMILY)
duke@0 58 endif
gbenson@1870 59 endif
duke@0 60
duke@0 61
duke@0 62 #
duke@0 63 # Files to compile.
duke@0 64 #
duke@0 65 FILES_c = \
duke@0 66 java.c \
duke@0 67 splashscreen_stubs.c \
duke@0 68 java_md.c \
duke@0 69 parse_manifest.c \
duke@0 70 version_comp.c \
duke@0 71 wildcard.c \
duke@0 72 jli_util.c \
duke@0 73 inflate.c \
duke@0 74 inftrees.c \
duke@0 75 inffast.c \
duke@0 76 zadler32.c \
sherman@1671 77 zcrc32.c \
duke@0 78 zutil.c
duke@0 79
duke@0 80 ifneq ($(PLATFORM), windows)
duke@0 81
duke@0 82 FILES_c += \
duke@0 83 $(CTARGDIR)ergo.c \
duke@0 84 $(CTARGDIR)ergo_$(ERGO_FAMILY).c
duke@0 85 endif
duke@0 86
duke@0 87
duke@0 88 # Names of arch directories
duke@0 89 LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"'
duke@0 90 ifeq ($(PLATFORM), solaris)
duke@0 91 LIBARCH_DEFINES += -DLIBARCH32NAME='"$(LIBARCH32)"'
duke@0 92 LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"'
duke@0 93 endif
duke@0 94
duke@0 95 OTHER_CPPFLAGS += $(LIBARCH_DEFINES)
duke@0 96
duke@0 97
duke@0 98 ifneq ($(PLATFORM), windows) # UNIX systems
ksrini@2048 99 LD_RUNPATH_EXTRAS += ..
duke@0 100 LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
duke@0 101 # Note: its important to keep this order meaning -lc is the
duke@0 102 # last library otherwise it could cause compatibility issues
duke@0 103 # by pulling in SUNW_private symbols from libc
duke@0 104 LDLIBS = -ldl -lc
duke@0 105 ifeq ($(USE_PTHREADS),true)
duke@0 106 LDLIBS += -lpthread
duke@0 107 endif # USE_PTHREADS
duke@0 108 endif # PLATFORM
duke@0 109
duke@0 110 ifeq ($(PLATFORM), windows)
duke@0 111 EXTRA_LIBS = advapi32.lib \
ksrini@16 112 comctl32.lib \
duke@0 113 user32.lib
duke@0 114
duke@0 115 JAVALIB =
duke@0 116 OTHER_LCF = -export:JLI_Launch \
duke@0 117 -export:JLI_ManifestIterate \
ksrini@525 118 -export:JLI_SetTraceLauncher \
ksrini@525 119 -export:JLI_ReportErrorMessage \
ksrini@525 120 -export:JLI_ReportErrorMessageSys \
ksrini@525 121 -export:JLI_ReportMessage \
ksrini@525 122 -export:JLI_ReportExceptionDescription
duke@0 123
duke@0 124 endif
duke@0 125
duke@0 126 OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
duke@0 127 OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC)
duke@0 128 OTHER_INCLUDES += -I$(ZIP_SRC)
duke@0 129
duke@0 130 #
duke@0 131 # Library to compile.
duke@0 132 #
duke@0 133 include $(BUILDDIR)/common/Mapfile-vers.gmk
duke@0 134 include $(BUILDDIR)/common/Library.gmk
duke@0 135
duke@0 136 #
duke@0 137 # On Windows, some executable objects need to be statically linked against
duke@0 138 # the jli library. Hence, we need both a standard library (archive) and
duke@0 139 # an import library (associated with a dll). These both usually have the
duke@0 140 # extension .LIB, so they need to be placed in different directories. The
duke@0 141 # import library is build (as usual) in the $(OBJDIR) directory while the
duke@0 142 # standard library is built in a "static" subdirectory. The standard library
duke@0 143 # is not delivered as part of the product, but is only needed as part of
duke@0 144 # the build process. The import library is built by the standard rules
duke@0 145 # in Library.gmk. The additional rules which follow build the standard
duke@0 146 # library.
duke@0 147 #
duke@0 148 ifeq ($(PLATFORM), windows)
duke@0 149
ksrini@3146 150 STATIC_LIBRARY = $(OBJDIR)/static/$(LIBPREFIX)$(LIBRARY).lib
duke@0 151
ksrini@3146 152 $(STATIC_LIBRARY): $(FILES_o)
duke@0 153 @$(prep-target)
duke@0 154 $(LIBEXE) -nologo -out:$@ $(FILES_o)
duke@0 155
duke@0 156 library:: $(STATIC_LIBRARY)
duke@0 157
duke@0 158 endif # PLATFORM
duke@0 159
duke@0 160 #
duke@0 161 # Add to ambient vpath so we pick up the library files
duke@0 162 #
duke@0 163 vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC)