1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22# 23# Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27# 28# cmd/sgs/nm/sparcv9/Makefile 29# 30 31PROG= nm 32 33ARFORMAT= PORTAR 34 35include ../../../Makefile.cmd 36include ../../Makefile.com 37 38COMOBJS= nm.o 39 40OBJS= $(COMOBJS) 41 42SRCS= $(COMOBJS:%.o=../common/%.c) 43 44LDFLAGS += '-R$$ORIGIN/../../../lib/$(MACH64)' 45INCLIST= -I../../include -I../../include/sparc \ 46 -I$(SRCBASE)/uts/$(ARCH)/sys 47DEFLIST= -DTARGET=SPARC -DSPARC=1 -D$(ARFORMAT) -DELF 48CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) 49LDLIBS += -L ../../sgsdemangler/sparcv9 -ldemangle \ 50 -L ../../libconv/sparcv9 -lconv -lelf 51LINTFLAGS64= -mx $(LDLIBS) -Xarch=v9 52CLEANFILES += $(LINTOUT) 53 54 55%.o: ../common/%.c 56 $(COMPILE.c) $< 57 58$(ROOTCCSBIN64)/%: % 59 $(INS.file) 60 61.KEEP_STATE: 62 63all: $(PROG) 64 65$(PROG): $(OBJS) ../../sgsdemangler/sparcv9/libdemangle.a 66 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 67 $(POST_PROCESS) 68 69package \ 70install: all $(ROOTCCSBINPROG64) 71 72clean: 73 $(RM) $(OBJS) $(CLEANFILES) 74 75lint: $(LINTOUT) 76 77$(LINTOUT): $(SRCS) 78 $(LINT.c) $(SRCS) > $(LINTOUT) 2>&1 79 80include ../../../Makefile.targ 81include ../../Makefile.sub.64 82