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) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 247c478bd9Sstevel@tonic-gate# 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gatePROG= elfdump 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/Makefile.cmd 297c478bd9Sstevel@tonic-gateinclude $(SRC)/cmd/sgs/Makefile.com 307c478bd9Sstevel@tonic-gate 317e16fca0SAli BahramiCOMOBJ = main.o corenote.o \ 327e16fca0SAli Bahrami dwarf.o struct_layout.o \ 33c6c9aed4Sab196087 struct_layout_i386.o struct_layout_amd64.o \ 34c6c9aed4Sab196087 struct_layout_sparc.o struct_layout_sparcv9.o 355aefb655Srie 3639773e46Sab196087COMOBJ32 = elfdump32.o fake_shdr32.o 375aefb655Srie 3839773e46Sab196087COMOBJ64 = elfdump64.o fake_shdr64.o 395aefb655Srie 405aefb655SrieTOOLOBJ = leb128.o 415aefb655Srie 427c478bd9Sstevel@tonic-gateBLTOBJ = msg.o 437c478bd9Sstevel@tonic-gate 445aefb655SrieOBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) $(TOOLOBJ) 457c478bd9Sstevel@tonic-gate 4624da5b34SrieMAPFILE= $(MAPFILE.NGB) 4724da5b34SrieMAPOPT= $(MAPFILE:%=-M%) 487c478bd9Sstevel@tonic-gate 495aefb655SrieCPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ 5010a4fa49Srie -I$(SRCBASE)/lib/libc/inc -I$(SRCBASE)/uts/$(ARCH)/sys \ 5169112eddSAli Bahrami $(CPPFLAGS.master) -I$(ELFCAP) 527c478bd9Sstevel@tonic-gateLLDFLAGS = $(VAR_ELFDUMP_LLDFLAGS) 5320c1c355SRod EvansLLDFLAGS64 = $(VAR_ELFDUMP_LLDFLAGS64) 5408278a5eSRod EvansLDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPT) $(LLDFLAGS) 557c478bd9Sstevel@tonic-gateLDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ 565aefb655Srie $(CONVLIBDIR) $(CONV_LIB) 577c478bd9Sstevel@tonic-gate 587c478bd9Sstevel@tonic-gateLINTFLAGS += -x 597c478bd9Sstevel@tonic-gateLINTFLAGS64 += -x 607c478bd9Sstevel@tonic-gate 61*7014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized 62*7014882cSRichard Lowe 637c478bd9Sstevel@tonic-gateBLTDEFS = msg.h 647c478bd9Sstevel@tonic-gateBLTDATA = msg.c 657c478bd9Sstevel@tonic-gateBLTMESG = $(SGSMSGDIR)/elfdump 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gateBLTFILES = $(BLTDEFS) $(BLTDATA) $(BLTMESG) 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gateSGSMSGCOM = ../common/elfdump.msg 707c478bd9Sstevel@tonic-gateSGSMSGTARG = $(SGSMSGCOM) 717c478bd9Sstevel@tonic-gateSGSMSGALL = $(SGSMSGCOM) 727c478bd9Sstevel@tonic-gateSGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n elfdump_msg 737c478bd9Sstevel@tonic-gate 745aefb655SrieSRCS = $(COMOBJ:%.o=../common/%.c) \ 755aefb655Srie $(COMOBJ32:%32.o=../common/%.c) \ 765aefb655Srie $(TOOLOBJ:%.o=../../tools/common/%.c) $(BLTDATA) 777c478bd9Sstevel@tonic-gateLINTSRCS = $(SRCS) ../common/lintsup.c 787c478bd9Sstevel@tonic-gate 79c6c9aed4Sab196087CLEANFILES += $(LINTOUTS) $(BLTFILES) gen_struct_layout 80