Makefile revision 5aefb6555731130ca4fd295960123d71f2d21fe8
6033N/A#
6033N/A# CDDL HEADER START
6033N/A#
6033N/A# The contents of this file are subject to the terms of the
6033N/A# Common Development and Distribution License (the "License").
6033N/A# You may not use this file except in compliance with the License.
6033N/A#
6033N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6033N/A# or http://www.opensolaris.org/os/licensing.
6033N/A# See the License for the specific language governing permissions
6033N/A# and limitations under the License.
6033N/A#
6033N/A# When distributing Covered Code, include this CDDL HEADER in each
6033N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6033N/A# If applicable, add the following below this CDDL HEADER, with the
6033N/A# fields enclosed by brackets "[]" replaced with your own identifying
6033N/A# information: Portions Copyright [yyyy] [name of copyright owner]
6033N/A#
6033N/A# CDDL HEADER END
6033N/A#
6033N/A
6033N/A#
6033N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
6033N/A# Use is subject to license terms.
6033N/A#
6033N/A# ident "%Z%%M% %I% %E% SMI"
6033N/A#
6033N/A
6033N/AE_TOOLOBJS = leb128.o
6033N/AL_MACHOBJS32 = machrel.intel32.o machsym.intel32.o
6033N/AL_MACHOBJS64 = machrel.amd64.o machsym.intel64.o unwind.amd64.o
6033N/A
6033N/Ainclude ../Makefile.com
6033N/A
6033N/A.KEEP_STATE:
6033N/A
6033N/AROOTFS_LIBDIR64 = \
6033N/A $(VAR_LIBLD_64_ROOTFS_LIBDIR)
6033N/A
6033N/AROOTFS_DYNLIB64 = \
6033N/A $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%)
6033N/A
6033N/ASGSMSGCHK = ../common/libld.chk.msg
6033N/ASGSMSGTARG += $(SGSMSGINTEL)
6033N/A
6033N/A#
6033N/A# For cross-compilation, it is necessary to trigger the correct include files
6033N/A# (see sys/elf.h).
6033N/A#
6033N/AELFTARGET64 = -DELF_TARGET_AMD64
6033N/AELFTARGET32 = -DELF_TARGET_386
6033N/A
6033N/AELFLIBDIR = $(ELFLIBDIR64)
LDDBGLIBDIR = $(LDDBGLIBDIR64)
CONVLIBDIR = $(CONVLIBDIR64)
$(ROOTFS_DYNLIB64) := FILEMODE= 755
all: $(DYNLIB) $(LIBLINKS)
install \
package: all $(ROOTFS_DYNLIB64)
include ../Makefile.targ
include ../../Makefile.sub.64
# Associate ELF32 and ELF64 objects to the appropriate headers.
pics/%32.o := CPPFLAGS += -I$(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld
pics/%64.o := CPPFLAGS += -I$(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld
# Associate the various lint targets with the appropriate headers/files.
$(LINTOUT32) := CPPFLAGS += -I$(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld \
$(ELFTARGET32)
$(LINTOUT64) := CPPFLAGS += -I$(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld \
$(ELFTARGET64) -D_ELF64
$(LINTLIB32) := CPPFLAGS += -I$(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld \
$(ELFTARGET32)
$(LINTLIB64) := CPPFLAGS += -I$(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld \
$(ELFTARGET64) -D_ELF64
LINTSRCS32 += $(G_MACHOBJS32:%32.o=$(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld/%.c)
LINTSRCS64 += $(G_MACHOBJS64:%64.o=$(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld/%.c)
# Compensate chkmsg with the doreloc family.
CHKSRCS += $(G_MACHOBJS32:%32.o=$(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld/%.c)
CHKSRCS += $(G_MACHOBJS64:%64.o=$(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld/%.c)
pics/%32.o: \
$(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld/%.c
$(COMPILE.c) -o $@ $(ELFTARGET32) $<
$(POST_PROCESS_O)
pics/%64.o: \
$(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld/%.c
$(COMPILE.c) -o $@ $(ELFTARGET64) -D_ELF64 $<
$(POST_PROCESS_O)