Makefile revision 1195
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
7e5b2100ea65658a7ec3795919b4ecd29a6f118aMark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
04428429c4e689333e3ef8d19a2debeb20d4d15dMark Andrews#
eae67738cba5ca069e9d1d4e7b836a2f7b00a374Mark Andrews# Permission is hereby granted, free of charge, to any person obtaining a
eae67738cba5ca069e9d1d4e7b836a2f7b00a374Mark Andrews# copy of this software and associated documentation files (the "Software"),
2a40fdc2d34adb8a5c72a748449699666032d461Mark Andrews# to deal in the Software without restriction, including without limitation
46e873c835bf7d9ec3e1097e0aceb8db5b1ae93aMark Andrews# the rights to use, copy, modify, merge, publish, distribute, sublicense,
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrews# and/or sell copies of the Software, and to permit persons to whom the
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# Software is furnished to do so, subject to the following conditions:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The above copyright notice and this permission notice (including the next
068a66979695c77359e7a9181bb3f831c965b21cMark Andrews# paragraph) shall be included in all copies or substantial portions of the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Software.
d56e188030368b835122d759ebbf8d9613c166f4Mark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a9789e288ee11ae4315e27235c33bae5405bd7c4Mark Andrews# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# DEALINGS IN THE SOFTWARE.
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews#
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# LD_PRELOADable shared objects to interpose on time calls to make builds
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# more reproducible.
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
b6617c5adad7f12e5fcde1e873f7b982d247fe05Mark Andrewsall: time-$(MACH).so
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
b6617c5adad7f12e5fcde1e873f7b982d247fe05Mark Andrewsinstall: $(DESTDIR)/time-$(MACH).so
b6617c5adad7f12e5fcde1e873f7b982d247fe05Mark Andrews
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssontime-%.o: $(srcdir)/time.c
b6617c5adad7f12e5fcde1e873f7b982d247fe05Mark Andrews $(CC) -Kpic $(CFLAGS) -c -o $@ $<
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
a3b428812703d22a605a9f882e71ed65f0ffdc65Mark Andrewstime-%.so: time-%.o
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(CC) -G $(CFLAGS) -o $@ $<
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews
c6d4f781529d2f28693546b25b2967d44ec89e60Mark Andrewsclean:
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(RM) time-*.o time-*.so
c718d15a9a95054ee3c71540c02335426071fc6dMark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews$(DESTDIR)/time-%.so: time-%.so
c069a20053d41ae299eb9457e50ea44ae9f73ed2Mark Andrews $(INSTALL) $< $@
ed178efa9ab8f813538fce4ff603b81ded9f1799Mark Andrews