jsig.make revision 3364
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# This code is free software; you can redistribute it and/or modify it
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# under the terms of the GNU General Public License version 2 only, as
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# published by the Free Software Foundation.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# This code is distributed in the hope that it will be useful, but WITHOUT
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# version 2 for more details (a copy is included in the LICENSE file that
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# accompanied this code).
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# You should have received a copy of the GNU General Public License version
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# 2 along with this work; if not, write to the Free Software Foundation,
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# or visit www.oracle.com if you need additional information or have any
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# Rules to build signal interposition library, used by vm.make
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# libjsig[_g].so: signal interposition library
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLIBJSIG = lib$(JSIG).so
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkJSIG_G = $(JSIG)$(G_SUFFIX)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLIBJSIG_G = lib$(JSIG_G).so
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLIBJSIG_DIZ = lib$(JSIG).diz
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLIBJSIG_G_DEBUGINFO = lib$(JSIG_G).debuginfo
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLIBJSIG_G_DIZ = lib$(JSIG_G).diz
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkJSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkDEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkDEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkDEST_JSIG_DIZ = $(JDK_LIBDIR)/$(LIBJSIG_DIZ)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# On Linux we really dont want a mapfile, as this library is small
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# and preloaded using LD_PRELOAD, making functions private will
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# cause problems with interposing. See CR: 6466665
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkLFLAGS_JSIG += -D_GNU_SOURCE -D_REENTRANT $(LDFLAGS_HASH_STYLE)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk# DEBUG_BINARIES overrides everything, use full -g debug information
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkifeq ($(DEBUG_BINARIES), true)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk JSIG_DEBUG_CFLAGS = -g
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk @echo Making signal interposition lib...
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); }
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk ifeq ($(STRIP_POLICY),all_strip)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) $(STRIP) $@
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk ifeq ($(STRIP_POLICY),min_strip)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) $(STRIP) -g $@
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk # implied else here is no stripping at all
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); }
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk ifeq ($(ZIP_DEBUGINFO_FILES),1)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); }
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenkinstall_jsig: $(LIBJSIG)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk @echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) test -f $(LIBJSIG_DIZ) && \
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk $(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
c1350cf5bc50458ba79cc93ff9e0e5fe3f1aeeb0jeff.schenk.PHONY: install_jsig