Makefile revision 5353
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# This code is free software; you can redistribute it and/or modify it
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# under the terms of the GNU General Public License version 2 only, as
9afe19d634946d50eab30e3b90cb5cebcde39eeaDaniel Lezcano# published by the Free Software Foundation. Oracle designates this
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# particular file as subject to the "Classpath" exception as provided
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# by Oracle in the LICENSE file that accompanied this code.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# This code is distributed in the hope that it will be useful, but WITHOUT
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# version 2 for more details (a copy is included in the LICENSE file that
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# accompanied this code).
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# You should have received a copy of the GNU General Public License version
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# 2 along with this work; if not, write to the Free Software Foundation,
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# or visit www.oracle.com if you need additional information or have any
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand# Makefile for building Pack200
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen# Files to compile
724e753cb0055b84f896522e8c5ec45ad996c195Michel NormandAUTO_FILES_JAVA_DIRS = com/sun/java/util/jar/pack
ded1d23faabc31a5bbbf5f52c17423c59f63e23aDaniel Lezcano ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME)
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand ZIPOBJS = $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \
13f5be6276100761eaeddd77b7b55fbec6b0c9abSerge Hallyn ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen # JDK name required here
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen /D "JDK_FTYPE=0x1L"
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen# setup the list of libraries to link in...
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight EngenUNPACK_EXE_FILES_cpp = $(filter-out jni.cpp,$(FILES_cpp))
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(patsubst %.cpp,%.$(OBJECT_SUFFIX),$(UNPACK_EXE_FILES_cpp)) \
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight EngenCOBJDIR = $(strip $(subst unpack,unpack-cmd,$(OBJDIR)))
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(call make-launcher, pack200, com.sun.java.util.jar.pack.Driver, , --pack)
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen# ignore mapfile for non-product binary
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(MAKE) $(UNPACK_EXE) STANDALONE=true LDMAPFLAGS_DBG=
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight EngenIMVERSIONVALUE=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER)
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight EngenSED_ALL_MANIFEST=$(SED) -e 's%IMVERSION%$(IMVERSIONVALUE)%g'
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(CAT) $(TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest | $(SED_ALL_MANIFEST) > $(OBJDIR)/unpack200.exe.manifest
2ac9aafca6793e74587df7b81a1b27a71a16caa9Serge Hallyn# Mapfile-vers.gmk, does not copy over the mapfile-vers-unpack200, when
2ac9aafca6793e74587df7b81a1b27a71a16caa9Serge Hallyn# the make utiliy is re-invoked, as in this case. In order to workaround
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen# this special case, the mapfile required for the unpack200 command, is
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen# explicitly copied over to the expected location.
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen$(UNPACK_EXE): $(UNPACK_EXE_FILES_o) updatefiles winres
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(CP) mapfile-vers-unpack200 $(TEMPDIR)/mapfile-vers
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(LINKER) $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(MT) /manifest $(OBJDIR)/unpack200$(EXE_SUFFIX).manifest /outputresource:$(TEMPDIR)/unpack200$(EXE_SUFFIX);#1
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
724e753cb0055b84f896522e8c5ec45ad996c195Michel Normand $(RC) $(RC_FLAGS) $(CC_OBJECT_OUTPUT_FLAG)$(@) $(VERSIONINFO_RESOURCE)
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(COMPILE.cc) $(CC_OBJECT_OUTPUT_FLAG)$(COBJDIR)/$*.$(OBJECT_SUFFIX) $<
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(RM) -r $(CLASSDESTDIR)/com/sun/java/util/jar/pack $(TEMPDIR)
ef6e34eec8d5a9f1447462d6080facb674b3ccdbDwight Engen $(RM) -r $(OUTPUTDIR)/tmp/$(PRODUCT)/$(PACKAGE)