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# 23*7e16fca0SAli Bahrami# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gatePROG= elfdump 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd 307c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/sgs/Makefile.com 317c478bd9Sstevel@tonic-gate 32*7e16fca0SAli BahramiCOMOBJ = main.o corenote.o \ 33*7e16fca0SAli Bahrami dwarf.o struct_layout.o \ 34c6c9aed4Sab196087 struct_layout_i386.o struct_layout_amd64.o \ 35c6c9aed4Sab196087 struct_layout_sparc.o struct_layout_sparcv9.o 365aefb655Srie 3739773e46Sab196087COMOBJ32 = elfdump32.o fake_shdr32.o 385aefb655Srie 3939773e46Sab196087COMOBJ64 = elfdump64.o fake_shdr64.o 405aefb655Srie 415aefb655SrieTOOLOBJ = leb128.o 425aefb655Srie 437c478bd9Sstevel@tonic-gateBLTOBJ = msg.o 447c478bd9Sstevel@tonic-gate 455aefb655SrieOBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) $(TOOLOBJ) 467c478bd9Sstevel@tonic-gate 4724da5b34SrieMAPFILE= $(MAPFILE.NGB) 4824da5b34SrieMAPOPT= $(MAPFILE:%=-M%) 497c478bd9Sstevel@tonic-gate 505aefb655SrieCPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ 5110a4fa49Srie -I$(SRCBASE)/lib/libc/inc -I$(SRCBASE)/uts/$(ARCH)/sys \ 527c478bd9Sstevel@tonic-gate $(CPPFLAGS.master) 537c478bd9Sstevel@tonic-gateLLDFLAGS = $(VAR_ELFDUMP_LLDFLAGS) 547c478bd9Sstevel@tonic-gateLLDFLAGS64 = $(VAR_LD_LLDFLAGS64) 5567e3a03eSrieLDFLAGS += $(VERSREF) $(USE_PROTO) $(MAPOPT) $(LLDFLAGS) 567c478bd9Sstevel@tonic-gateLDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ 575aefb655Srie $(CONVLIBDIR) $(CONV_LIB) 587c478bd9Sstevel@tonic-gate 597c478bd9Sstevel@tonic-gateLINTFLAGS += -x 607c478bd9Sstevel@tonic-gateLINTFLAGS64 += -x 617c478bd9Sstevel@tonic-gate 627c478bd9Sstevel@tonic-gateBLTDEFS = msg.h 637c478bd9Sstevel@tonic-gateBLTDATA = msg.c 647c478bd9Sstevel@tonic-gateBLTMESG = $(SGSMSGDIR)/elfdump 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gateBLTFILES = $(BLTDEFS) $(BLTDATA) $(BLTMESG) 677c478bd9Sstevel@tonic-gate 687c478bd9Sstevel@tonic-gateSGSMSGCOM = ../common/elfdump.msg 697c478bd9Sstevel@tonic-gateSGSMSGTARG = $(SGSMSGCOM) 707c478bd9Sstevel@tonic-gateSGSMSGALL = $(SGSMSGCOM) 717c478bd9Sstevel@tonic-gateSGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n elfdump_msg 727c478bd9Sstevel@tonic-gate 735aefb655SrieSRCS = $(COMOBJ:%.o=../common/%.c) \ 745aefb655Srie $(COMOBJ32:%32.o=../common/%.c) \ 755aefb655Srie $(TOOLOBJ:%.o=../../tools/common/%.c) $(BLTDATA) 767c478bd9Sstevel@tonic-gateLINTSRCS = $(SRCS) ../common/lintsup.c 777c478bd9Sstevel@tonic-gate 78c6c9aed4Sab196087CLEANFILES += $(LINTOUTS) $(BLTFILES) gen_struct_layout 79