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# 217c478bd9Sstevel@tonic-gate# 22*fca42680SGary Mills# Copyright 2015 Gary Mills 23cd3e9333SAli Bahrami# Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gateLIBRARY= libelf.a 277c478bd9Sstevel@tonic-gateVERS= .1 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateMACHOBJS= 307c478bd9Sstevel@tonic-gateCOMOBJS= ar.o begin.o cntl.o cook.o \ 317c478bd9Sstevel@tonic-gate data.o end.o fill.o flag.o \ 327c478bd9Sstevel@tonic-gate getarhdr.o getarsym.o getbase.o getdata.o \ 337c478bd9Sstevel@tonic-gate getehdr.o getident.o getphdr.o getscn.o \ 347c478bd9Sstevel@tonic-gate getshdr.o \ 3530da1432Sahl getphnum.o getshnum.o getshstrndx.o \ 367c478bd9Sstevel@tonic-gate hash.o input.o kind.o \ 377c478bd9Sstevel@tonic-gate ndxscn.o newdata.o newehdr.o newphdr.o \ 387c478bd9Sstevel@tonic-gate newscn.o next.o nextscn.o output.o \ 397c478bd9Sstevel@tonic-gate rand.o rawdata.o rawfile.o rawput.o \ 407c478bd9Sstevel@tonic-gate strptr.o update.o error.o gelf.o \ 417c478bd9Sstevel@tonic-gate clscook.o checksum.o 426b1abd46SPeter Dennis - Sustaining EngineerCLASSOBJS= clscook64.o newehdr64.o newphdr64.o update64.o \ 436b1abd46SPeter Dennis - Sustaining Engineer checksum64.o 447c478bd9Sstevel@tonic-gateBLTOBJS= msg.o xlate.o xlate64.o 457c478bd9Sstevel@tonic-gateMISCOBJS= String.o args.o demangle.o nlist.o \ 467c478bd9Sstevel@tonic-gate nplist.o 477c478bd9Sstevel@tonic-gateMISCOBJS64= nlist.o 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateOBJECTS= $(BLTOBJS) $(MACHOBJS) $(COMOBJS) $(CLASSOBJS) $(MISCOBJS) 507c478bd9Sstevel@tonic-gate 51da2e3ebdSchininclude $(SRC)/lib/Makefile.lib 52da2e3ebdSchin 53*fca42680SGary Mills# Use the value of M4 set in Makefile.master via Makefile.lib 54*fca42680SGary Mills 5520c1c355SRod EvansDEMOFILES= Makefile 00README acom.c dcom.c \ 567c478bd9Sstevel@tonic-gate pcom.c tpcom.c dispsyms.c 57da2e3ebdSchinDEMOFILESRCDIR= ../demo 58da2e3ebdSchinROOTDEMODIRBASE=$(ROOT)/usr/demo/ELF 59da2e3ebdSchinROOTDEMODIRS= $(ROOTDEMODIRBASE) 607c478bd9Sstevel@tonic-gate 617c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/sgs/Makefile.com 627c478bd9Sstevel@tonic-gate 637c478bd9Sstevel@tonic-gateWARLOCKFILES= $(OBJECTS:%.o=wlocks/%.ll) 647c478bd9Sstevel@tonic-gate 65cd3e9333SAli BahramiMAPFILES = ../common/mapfile-vers 667c478bd9Sstevel@tonic-gate 67f808c858SrafDYNFLAGS += $(VERSREF) 6820c1c355SRod EvansLDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lc 697c478bd9Sstevel@tonic-gate 707c478bd9Sstevel@tonic-gateLINTFLAGS += -u -erroff=E_BAD_PTR_CAST_ALIGN 717c478bd9Sstevel@tonic-gateLINTFLAGS64 += -u -erroff=E_CAST_INT_TO_SMALL_INT 727c478bd9Sstevel@tonic-gate 737014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 747014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 757014882cSRichard Lowe 767c478bd9Sstevel@tonic-gateBUILD.AR= $(RM) $@ ; \ 777c478bd9Sstevel@tonic-gate $(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)` 787c478bd9Sstevel@tonic-gate $(POST_PROCESS_A) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gateBLTDEFS= msg.h 827c478bd9Sstevel@tonic-gateBLTDATA= msg.c 837c478bd9Sstevel@tonic-gateBLTMESG= $(SGSMSGDIR)/libelf 847c478bd9Sstevel@tonic-gate 857c478bd9Sstevel@tonic-gateBLTFILES= $(BLTDEFS) $(BLTDATA) $(BLTMESG) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gateSGSMSGCOM= ../common/libelf.msg 887c478bd9Sstevel@tonic-gateSGSMSG32= ../common/libelf.32.msg 897c478bd9Sstevel@tonic-gateSGSMSGTARG= $(SGSMSGCOM) 907c478bd9Sstevel@tonic-gateSGSMSGALL= $(SGSMSGCOM) $(SGSMSG32) 917c478bd9Sstevel@tonic-gate 927c478bd9Sstevel@tonic-gateSGSMSGFLAGS1= $(SGSMSGFLAGS) -m $(BLTMESG) 937c478bd9Sstevel@tonic-gateSGSMSGFLAGS2= $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libelf_msg 947c478bd9Sstevel@tonic-gate 957c478bd9Sstevel@tonic-gateBLTSRCS= $(BLTOBJS:%.o=%.c) 967c478bd9Sstevel@tonic-gateLIBSRCS= $(COMOBJS:%.o=../common/%.c) $(MISCOBJS:%.o=../misc/%.c) \ 977c478bd9Sstevel@tonic-gate $(MACHOBJS:%.o=%.c) $(BLTSRCS) 987c478bd9Sstevel@tonic-gateSRCS= ../common/llib-lelf 997c478bd9Sstevel@tonic-gateLINTSRCS= $(LIBSRCS) ../common/lintsup.c 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gateROOTFS_DYNLIB= $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) 1027c478bd9Sstevel@tonic-gateROOTFS_LINTLIB= $(LINTLIB:%=$(ROOTFS_LIBDIR)/%) 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gateROOTFS_DYNLIB64= $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) 1057c478bd9Sstevel@tonic-gateROOTFS_LINTLIB64= $(LINTLIB:%=$(ROOTFS_LIBDIR64)/%) 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate$(ROOTFS_DYNLIB) := FILEMODE= 755 1087c478bd9Sstevel@tonic-gate$(ROOTFS_DYNLIB64) := FILEMODE= 755 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gateLIBS = $(DYNLIB) $(LINTLIB) 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gateCLEANFILES += $(LINTOUTS) $(BLTSRCS) $(BLTFILES) $(WARLOCKFILES) 1137c478bd9Sstevel@tonic-gate 114da2e3ebdSchin.PARALLEL: $(LIBS) 115