xref: /illumos-gate/usr/src/cmd/sgs/ld/Makefile.com (revision 6446bd46)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
55aefb655Srie# Common Development and Distribution License (the "License").
65aefb655Srie# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
215aefb655Srie
227c478bd9Sstevel@tonic-gate#
2320c1c355SRod Evans# Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
2482201043SAndrew Stormont# Copyright 2016 RackTop Systems.
25cf9a187cSAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate
285aefb655SriePROG =		ld
297c478bd9Sstevel@tonic-gate
30cf9a187cSAndy Fiddamaninclude		$(SRC)/cmd/Makefile.cmd
31cf9a187cSAndy Fiddamaninclude		$(SRC)/cmd/sgs/Makefile.com
327c478bd9Sstevel@tonic-gate
335aefb655SrieCOMOBJS =	ld.o
345aefb655SrieBLTOBJ =	msg.o
357c478bd9Sstevel@tonic-gate
365aefb655SrieOBJS =		$(BLTOBJ) $(COMOBJS)
377c478bd9Sstevel@tonic-gate.PARALLEL:	$(OBJS)
387c478bd9Sstevel@tonic-gate
3969b1fd3fSRichard LoweSRCDIR =	$(SGSHOME)/ld
4069b1fd3fSRichard Lowe
4169b1fd3fSRichard LoweMAPFILES =	$(SRCDIR)/common/mapfile-intf $(MAPFILE.NGB)
4285f4cb87SRichard LoweMAPOPTS =	$(MAPFILES:%=-Wl,-M%)
437c478bd9Sstevel@tonic-gate
44*6446bd46SRichard LoweRPATH =		'-R$$ORIGIN/../../lib/$(MACH64)'
45e9db39ceSRichard Lowe
46e9db39ceSRichard LoweLDFLAGS +=	$(VERSREF) $(MAPOPTS) $(RPATH)
47*6446bd46SRichard LoweLDLIBS +=	-lumem $(LDLIBDIR64) -lld $(ELFLIBDIR64) -lelf \
48*6446bd46SRichard Lowe		    $(LDDBGLIBDIR64) -llddbg $(CONVLIBDIR64) -lconv
497c478bd9Sstevel@tonic-gate
507014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-switch
517014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
527014882cSRichard Lowe
537c478bd9Sstevel@tonic-gateBLTDEFS=	msg.h
547c478bd9Sstevel@tonic-gateBLTDATA=	msg.c
557c478bd9Sstevel@tonic-gateBLTMESG=	$(SGSMSGDIR)/ld
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateBLTFILES=	$(BLTDEFS) $(BLTDATA) $(BLTMESG)
587c478bd9Sstevel@tonic-gate
5969b1fd3fSRichard LoweSGSMSGCOM=	$(SRCDIR)/common/ld.msg
607c478bd9Sstevel@tonic-gateSGSMSGTARG=	$(SGSMSGCOM)
617c478bd9Sstevel@tonic-gateSGSMSGALL=	$(SGSMSGCOM)
627c478bd9Sstevel@tonic-gateSGSMSGFLAGS +=	-h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ld_msg
637c478bd9Sstevel@tonic-gate
6469b1fd3fSRichard LoweSRCS=		$(MACHOBJS:%.o=%.c)  $(COMOBJS:%.o=$(SRCDIR)/common/%.c)  $(BLTDATA)
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateCLEANFILES +=	$(BLTFILES)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateFILEMODE=	0755
69