jdk/make/java/jli/Makefile
author xdono
Wed, 02 Jul 2008 12:55:45 -0700
changeset 715 f16baef3a20e
parent 39 560da37936db
child 849 be386e469547
permissions -rw-r--r--
6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
#
715
f16baef3a20e 6719955: Update copyright year
xdono
parents: 39
diff changeset
     2
# Copyright 2005-2008 Sun Microsystems, Inc.  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
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
# published by the Free Software Foundation.  Sun designates this
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
# by Sun in the LICENSE file that accompanied this code.
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
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    21
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
# CA 95054 USA or visit www.sun.com if you need additional information or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
# have any questions.
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
# Java Launcher Infrastructure Library (libjli)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
# This library provides shared support for the Java launcher in all of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
# its manifestations (java, javaw, javac, ...).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
BUILDDIR = ../..
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
LIBRARY = jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
PRODUCT = java
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
# Must be included before Defs.gmk to be functional.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
# Note that for Windows, both a dynamic and static version are built.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
# Doing the compiles with the static library specified can be overridden
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
# by the link step, but not the reverse.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
MS_RUNTIME_STATIC = true
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
include $(BUILDDIR)/common/Defs.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
ZLIB_VERSION = 1.1.3
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
ZIP_SRC = $(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
ifeq ($(ARCH_FAMILY), amd64)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
ERGO_FAMILY=i586
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
else
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
ERGO_FAMILY=$(ARCH_FAMILY)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
# Files to compile.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
FILES_c = \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
	java.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
	splashscreen_stubs.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
	java_md.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
	parse_manifest.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
	version_comp.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
	wildcard.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
	jli_util.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
	inflate.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
	infblock.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
	inftrees.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
	infcodes.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
	inffast.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
	infutil.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
	zadler32.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
	zutil.c
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
ifneq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
FILES_c += \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
	$(CTARGDIR)ergo.c \
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
	$(CTARGDIR)ergo_$(ERGO_FAMILY).c
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
# Names of arch directories
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
LIBARCH_DEFINES = -DLIBARCHNAME='"$(LIBARCH)"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
ifeq ($(PLATFORM), solaris)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
  LIBARCH_DEFINES += -DLIBARCH32NAME='"$(LIBARCH32)"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
  LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"'
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
OTHER_CPPFLAGS += $(LIBARCH_DEFINES)
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
ifneq ($(PLATFORM), windows)	# UNIX systems
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
	LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
	# Note: its important to keep this order meaning -lc is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
	# last library otherwise it could cause compatibility issues
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
	# by pulling in SUNW_private symbols from libc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
	LDLIBS = -ldl -lc
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
ifeq ($(USE_PTHREADS),true)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
	LDLIBS += -lpthread
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
endif # USE_PTHREADS 
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
endif # PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
	EXTRA_LIBS = advapi32.lib \
39
560da37936db 6596475: (launcher) javaw should call InitCommonControls
ksrini
parents: 2
diff changeset
   110
		     comctl32.lib \
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
		     user32.lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
	JAVALIB =
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
	OTHER_LCF =  -export:JLI_Launch \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
		     -export:JLI_ManifestIterate \
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
		     -export:JLI_SetTraceLauncher
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
	# Files from zlib built here do not compile with warning level 3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
	# if warnings are fatal
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
	COMPILER_WARNINGS_FATAL=false
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
endif
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
OTHER_INCLUDES += -I$(ZIP_SRC)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
# Library to compile.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
include $(BUILDDIR)/common/Mapfile-vers.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
include $(BUILDDIR)/common/Library.gmk
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
# On Windows, some executable objects need to be statically linked against
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
# the jli library.  Hence, we need both a standard library (archive) and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
# an import library (associated with a dll).  These both usually have the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
# extension .LIB, so they need to be placed in different directories.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
# import library is build (as usual) in the $(OBJDIR) directory while the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
# standard library is built in a "static" subdirectory.  The standard library
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
# is not delivered as part of the product, but is only needed as part of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
# the build process.  The import library is built by the standard rules
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
# in Library.gmk.  The additional rules which follow build the standard
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
# library.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
ifeq ($(PLATFORM), windows)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
STATIC_LIBRARY_DIR = $(OBJDIR)/static
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
STATIC_LIBRARY_NAME = $(LIBPREFIX)$(LIBRARY).lib
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
STATIC_LIBRARY = $(STATIC_LIBRARY_DIR)/$(STATIC_LIBRARY_NAME)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
$(STATIC_LIBRARY_DIR): $(OBJDIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
	@$(MKDIR) $(STATIC_LIBRARY_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
$(STATIC_LIBRARY): $(STATIC_LIBRARY_DIR)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
	@$(prep-target)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
	$(LIBEXE) -nologo -out:$@ $(FILES_o)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
library:: $(STATIC_LIBRARY)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
endif	# PLATFORM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
# Add to ambient vpath so we pick up the library files
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
#
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
vpath %.c $(LAUNCHER_SHARE_SRC) $(ZIP_SRC) $(LAUNCHER_PLATFORM_SRC)