10Sstevel@tonic-gate# 20Sstevel@tonic-gate# CDDL HEADER START 30Sstevel@tonic-gate# 40Sstevel@tonic-gate# The contents of this file are subject to the terms of the 51618Srie# Common Development and Distribution License (the "License"). 61618Srie# You may not use this file except in compliance with the License. 70Sstevel@tonic-gate# 80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate# See the License for the specific language governing permissions 110Sstevel@tonic-gate# and limitations under the License. 120Sstevel@tonic-gate# 130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate# 190Sstevel@tonic-gate# CDDL HEADER END 200Sstevel@tonic-gate# 211618Srie 220Sstevel@tonic-gate# 23*12927SRod.Evans@Sun.COM# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 240Sstevel@tonic-gate# 250Sstevel@tonic-gate 260Sstevel@tonic-gatePROG= elfdump 270Sstevel@tonic-gate 280Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd 290Sstevel@tonic-gateinclude $(SRC)/cmd/sgs/Makefile.com 300Sstevel@tonic-gate 319085SAli.Bahrami@Sun.COMCOMOBJ = main.o corenote.o \ 329085SAli.Bahrami@Sun.COM dwarf.o struct_layout.o \ 339085SAli.Bahrami@Sun.COM struct_layout_i386.o struct_layout_amd64.o \ 349085SAli.Bahrami@Sun.COM struct_layout_sparc.o struct_layout_sparcv9.o 351618Srie 364665Sab196087COMOBJ32 = elfdump32.o fake_shdr32.o 371618Srie 384665Sab196087COMOBJ64 = elfdump64.o fake_shdr64.o 390Sstevel@tonic-gate 401618SrieTOOLOBJ = leb128.o 411618Srie 421618SrieBLTOBJ = msg.o 431618Srie 441618SrieOBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) $(TOOLOBJ) 450Sstevel@tonic-gate 464271SrieMAPFILE= $(MAPFILE.NGB) 474271SrieMAPOPT= $(MAPFILE:%=-M%) 480Sstevel@tonic-gate 491618SrieCPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ 501824Srie -I$(SRCBASE)/lib/libc/inc -I$(SRCBASE)/uts/$(ARCH)/sys \ 5111734SAli.Bahrami@Sun.COM $(CPPFLAGS.master) -I$(ELFCAP) 520Sstevel@tonic-gateLLDFLAGS = $(VAR_ELFDUMP_LLDFLAGS) 53*12927SRod.Evans@Sun.COMLLDFLAGS64 = $(VAR_ELFDUMP_LLDFLAGS64) 5411827SRod.Evans@Sun.COMLDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPT) $(LLDFLAGS) 550Sstevel@tonic-gateLDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ 561618Srie $(CONVLIBDIR) $(CONV_LIB) 570Sstevel@tonic-gate 580Sstevel@tonic-gateLINTFLAGS += -x 590Sstevel@tonic-gateLINTFLAGS64 += -x 600Sstevel@tonic-gate 611618SrieBLTDEFS = msg.h 621618SrieBLTDATA = msg.c 631618SrieBLTMESG = $(SGSMSGDIR)/elfdump 640Sstevel@tonic-gate 651618SrieBLTFILES = $(BLTDEFS) $(BLTDATA) $(BLTMESG) 660Sstevel@tonic-gate 671618SrieSGSMSGCOM = ../common/elfdump.msg 681618SrieSGSMSGTARG = $(SGSMSGCOM) 691618SrieSGSMSGALL = $(SGSMSGCOM) 700Sstevel@tonic-gateSGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n elfdump_msg 710Sstevel@tonic-gate 721618SrieSRCS = $(COMOBJ:%.o=../common/%.c) \ 731618Srie $(COMOBJ32:%32.o=../common/%.c) \ 741618Srie $(TOOLOBJ:%.o=../../tools/common/%.c) $(BLTDATA) 751618SrieLINTSRCS = $(SRCS) ../common/lintsup.c 760Sstevel@tonic-gate 776635Sab196087CLEANFILES += $(LINTOUTS) $(BLTFILES) gen_struct_layout 78