Makefile revision 7c478bd95313f5f23a4c958a745db2134aa03244
460N/A#
460N/A# CDDL HEADER START
460N/A#
460N/A# The contents of this file are subject to the terms of the
460N/A# Common Development and Distribution License, Version 1.0 only
460N/A# (the "License"). You may not use this file except in compliance
460N/A# with the License.
460N/A#
460N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
460N/A# or http://www.opensolaris.org/os/licensing.
460N/A# See the License for the specific language governing permissions
460N/A# and limitations under the License.
460N/A#
460N/A# When distributing Covered Code, include this CDDL HEADER in each
460N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
460N/A# If applicable, add the following below this CDDL HEADER, with the
460N/A# fields enclosed by brackets "[]" replaced with your own identifying
460N/A# information: Portions Copyright [yyyy] [name of copyright owner]
460N/A#
460N/A# CDDL HEADER END
460N/A#
460N/A#
460N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
460N/A# Use is subject to license terms.
460N/A#
460N/A# ident "%Z%%M% %I% %E% SMI"
460N/A#
460N/A
460N/ABASEPLAT= sparc
618N/Ainclude $(SRC)/cmd/sgs/libld/Makefile.com
460N/A
460N/A#
460N/A# Share machrel.c with the 32-bit sparc directory since
460N/A# they both need the Elf32 and the Elf64 code.
460N/A#
460N/AL_MACHSRCS32= ../$(MACH)/machrel.c ../$(MACH)/machsym.c
460N/AL_MACHSRCS64= $(L_MACHSRCS32)
460N/ACHKSRCS= $(SRCBASE)/uts/common/krtld/reloc.h $(L_MACHSRCS32)
460N/A
460N/ALIB64= libld.so.3
460N/A$(LIB64) := SONAME = $(LIB64)
460N/A
460N/ADBGLIB = -L ../../liblddbg/$(MACH64)
460N/AELFLIB = -L ../../libelf/$(MACH64)
460N/A
460N/ACONVLIBDIR= $(CONVLIBDIR64)
460N/ALDDBGLIBDIR= $(LDDBGLIBDIR64)
460N/AELFLIBDIR= $(ELFLIBDIR64)
460N/A
460N/ALINTFLAGS64 += $(VAR_LINTFLAGS64)
460N/A
460N/ASGSMSGTARG += $(SGSMSGSPARC)
460N/A
460N/A.PARALLEL: $(LINTOUT32) $(LINTOUT64)
460N/A
460N/APICS64= $(OBJECTS:%=pics64/%)
460N/A$(PICS64) := sparcv9_CFLAGS += -xregs=no%appl -K pic
460N/ACPPFLAGS += -I../../../../uts/sparc/krtld
460N/ACTFMERGE_LIB64= $(CTFMERGE) -t -f -L VERSION -o $@ $(PICS64)
460N/A$(PICS64) := CFLAGS += $(CTF_FLAGS)
460N/A$(PICS64) := CFLAGS64 += $(CTF_FLAGS)
460N/A$(PICS64) := CTFCONVERT_POST = $(CTFCONVERT_O)
460N/A$(LIB64) := CTFMERGE_POST = $(CTFMERGE_LIB64)
460N/A
460N/A.PARALLEL: $(PICS64)
460N/A
460N/AROOTFS_LIBDIR= $(VAR_LIBLD_64_ROOTFS_LIBDIR)
460N/AROOTFS_DYNLIB64= $(ROOTFS_LIBDIR)/$(LIB64)
460N/A$(ROOTFS_DYNLIB64) := FILEMODE= 755
460N/A
460N/A.KEEP_STATE:
460N/A
460N/Aall: $(DYNLIB) $(LIBLINKS) .WAIT $(LIB64)
460N/A
460N/A$(LIB64) $(SGSPROTO)/$(LIB64): \
460N/A pics64 .WAIT $$(PICS64) $(MAPFILES)
460N/A $(CC) $(sparcv9_XARCH) -o $@ -G $(DYNFLAGS) $(PICS64) $(LDLIBS)
460N/A $(POST_PROCESS_SO)
460N/A
460N/Alint: $(LINTLIB64) $(LINTOUT64)
460N/A
460N/A#
460N/A# Share machrel.c with the base architecture, since they
460N/A# both need all the Elf32 and Elf64 code.
460N/A#
460N/Apics/machrel.o: ../sparc/machrel.c
460N/A $(COMPILE.c) -o $@ ../sparc/machrel.c
460N/A $(POST_PROCESS_O)
460N/A
460N/Apics64/machrel.o: ../sparc/machrel.c
460N/A $(COMPILE.c) -D_ELF64 -o $@ ../sparc/machrel.c
460N/A $(POST_PROCESS_O)
460N/A
460N/Apics/machsym.o: ../sparc/machsym.c
460N/A $(COMPILE.c) -o $@ ../sparc/machsym.c
460N/A $(POST_PROCESS_O)
460N/A
pics64/machsym.o: ../sparc/machsym.c
$(COMPILE.c) -D_ELF64 -o $@ ../sparc/machsym.c
$(POST_PROCESS_O)
native: $(SGSPROTO)/$(DYNLIB) $(SGSPROTO)/$(LIB64)
native-proto:
-@mkdir -p proto/$(MACH) proto/$(MACH64)
pics64:
-@mkdir -p $@
install package: all $(ROOTFS_DYNLIB) $(ROOTFS_DYNLIB64)
clean: clean64
clean64:
-$(RM) $(PICS64)
clobber: clobber64
clobber64:
-$(RM) $(LIB64)
delete:
$(RM) $(DYNLIB) $(LIB64)
include $(SRC)/cmd/sgs/libld/Makefile.targ
include ../../Makefile.sub.64
$(LIBLINKS) := DYNLIB=$(LIB64)
pics64/%.o: $(SRCBASE)/uts/sparc/krtld/%.c
$(COMPILE.c) -o $@ -D_ELF64 $<
$(POST_PROCESS_O)
pics/%.o: $(SRCBASE)/uts/sparc/krtld/%.c
$(COMPILE.c) -o $@ $<
$(POST_PROCESS_O)