Makefile revision 59f081ed215eb7d3fbf19cce3474b2987eaf3225
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# CDDL HEADER START
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User# The contents of this file are subject to the terms of the
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# Common Development and Distribution License (the "License").
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# You may not use this file except in compliance with the License.
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User# See the License for the specific language governing permissions
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews# and limitations under the License.
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e20309353e6246485c521278131d3fced73d7957Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
e20309353e6246485c521278131d3fced73d7957Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater# CDDL HEADER END
e20309353e6246485c521278131d3fced73d7957Tinderbox User# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
e20309353e6246485c521278131d3fced73d7957Tinderbox User# Use is subject to license terms.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# ident "%Z%%M% %I% %E% SMI"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# Note that we build libc_pic.a for the benefit of building
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# ld.so.1, but we do not install it. Only ld.so.1 needs it
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# and it must be built in the same workspace as libc.
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterROOTFS_LINTLIB64= $(ROOTFS_LINTDIR64)/$(LINTLIB)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# include common library definitions
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# on some architectures, we build multiple libc variants
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserVAR1_DYNLIB = $(LIBRARY:%.a=%_$(VAR1).so$(VERS))
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsVAR2_DYNLIB = $(LIBRARY:%.a=%_$(VAR2).so$(VERS))
e20309353e6246485c521278131d3fced73d7957Tinderbox UserVAR3_DYNLIB = $(LIBRARY:%.a=%_$(VAR3).so$(VERS))
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterSUBDIRS= $(MACH) $(MACH_ETC) $(VARIANT_SUBDIRS)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterROOTLIBS64= $(ROOTLIBDIR64)/$(DYNLIB) $(ROOTLIBDIR64)/$(LINTLIB)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonMACHLIBS64= $(MACH64)/$(DYNLIB) $(MACH64)/$(LINTLIB)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterVARIANTLIBS= $(VARIANTS:%=$(MACH)_%/$(LIBBASENAME)_%.so.1)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterROOTVARIANTLIBS= $(VARIANTS:%=$(ROOTVARIANTDIR)/$(LIBBASENAME)_%.so.1)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# definitions for install_h target
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User# install rules for install_h target
2ba8f584b97cbab864570e38fd26b8cb90961428Tinderbox User$(ROOTFS_LIBDIR64)/$(DYNLIB) := FILEMODE = 755
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews$(ROOTVARIANTDIR)/$(VAR1_DYNLIB) := FILEMODE= 755
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews$(ROOTVARIANTDIR)/$(VAR2_DYNLIB) := FILEMODE= 755
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater$(ROOTVARIANTDIR)/$(VAR3_DYNLIB) := FILEMODE= 755
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updaterall: check_i18n .WAIT lib32 $(BUILD64) .WAIT lib64 .WAIT etc
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updaterlib32: $(MACHLIBS) $(MACH)/$(LIB_PIC) $(VARIANTLIBS)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson cd $(MACH)/i18n_pics ; $(AR) -x $(ROOTFS_LIBDIR)/libc_i18n.a
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater @if $(ELFDUMP) -r $(MACH)/$(DYNLIB) | $(GREP) -w environ ; then \
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews $(ECHO) "Error: Invalid reference to environ" ; \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(ECHO) "Error: See comments in port/gen/env_data.c" ; \
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updaterlib64: $(MACHLIBS64) $(MACH64)/$(LIB_PIC) $(VARIANTLIBS)
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater cd $(MACH64)/i18n_pics ; $(AR) -x $(ROOTFS_LIBDIR64)/libc_i18n.a
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater @if $(ELFDUMP) -r $(MACH64)/$(DYNLIB) | $(GREP) -w environ ; then \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(ECHO) "Error: Invalid reference to environ" ; \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(ECHO) "Error: See comments in port/gen/env_data.c" ; \
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User @cd $(@D); pwd; VERSION='$(VERSION)' $(MAKE) $(@F)
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updaterinslib32: $(ROOTFS_LIBS) $(ROOTFS_LINKS) $(ROOTFS_LINT) \
8f2c45a35dd8c40bcc9caba8f7d40ce64fc27bcdAutomatic Updaterinslib64: $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) \
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater$(ROOTFS_LIBDIR)/$(LIBLINKS): $(ROOTFS_LIBDIR)/$(LIBLINKS)$(VERS)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater$(ROOTFS_LIBDIR64)/$(LIBLINKS): $(ROOTFS_LIBDIR64)/$(LIBLINKS)$(VERS)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater$(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR1_BLDDIR)/%
7f94d9a8162c9a96b56e66176702b66e79d8e1a2Automatic Updater$(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR2_BLDDIR)/%
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater$(ROOTVARIANTDIR)/%: $(ROOTVARIANTDIR) $(VAR3_BLDDIR)/%
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# install rule for lint library target
da59e63e7af147a8bcef985b98b04443e04c3a0eTinderbox User @cd $(MACH); pwd; VERSION='$(VERSION)' $(MAKE) $@
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews @cd $(MACH64); pwd; VERSION='$(VERSION)' $(MAKE) $@
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews @cd $(MACH); pwd; VERSION='$(VERSION)' $(MAKE) $(LIB_PIC)
27c3c21f41520e8d6336d80a8094389e321cb6d2Mark Andrews @cd $(MACH64); pwd; VERSION='$(VERSION)' $(MAKE) $(LIB_PIC)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User @cd $@; pwd; VERSION='$(VERSION)' $(MAKE) $(TARGET)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# include MACH-specific library targets