#	START NEW ARIX SCCS HEADER
#
#	@(#) Makefile: version 25.1 created on 11/27/91 at 14:33:28
#
#	Copyright (c) 1990 by Arix Corporation
#	All Rights Reserved
#
#	@(#)Makefile	25.1	11/27/91 Copyright (c) 1990 by Arix Corporation
#
#	END NEW ARIX SCCS HEADER
#

IROOT 	= $(PWD)/..

include $(IROOT)/macdefs

AS	= $(SGS_ROOT)/bin/as2

OBJS =	date.o initimage.o dnld.o excpt_img.o localmenu.o localvars.o \
	console.o main_image.o powerup.o pwroff.o dram.o pollcss.o \
	iddiag.o debug.o iom.o iomw.o iomr.o margin.o pwrtest.o cmds.o \
	ioa0.o disp.o dispd.o dispn.o ioa1.o ioa2.o iomerr.o iomint.o \
	ckiomerr.o iomall.o pollio.o sccint.o errs.o devreq.o novtst.o \
	diskcmd.o dtreq.o edtmem.o sizemem.o tapereq.o tapecmd.o ioapwr.o \
	diskreq.o novram.o boot.o switches.o ipcc.o pmmenu.o pmrmw.o \
	pmmm.o pmcas.o adc.o dslot.o other.o boot_path.o iopm.o nothing.o \
	help.o menu.o monitor.o parse.o sprintf.o printf.o mon.vars.o util.o \
	mem0.o mem1.o edac.o

LOCAL =	makemap mktags

SINC	= ./head

CFLAG =  -SYSV -T2 -YI,$(SINC) -DSPM_IMAGE -I$(SGS_ROOT)/usr/include -O -b

all: local_bins diag

diag:	ldfile $(OBJS)
		$(LD) -o diag ldfile $(OBJS)
		./makemap diag 
		strip diag
		mcs -d diag

local_bins:
	chmod +x makemap mktags

.c.o:
	$(CC) $(CFLAG) -c $(<F)

clean:
	rm -f *.o 

clobber: clean
	rm -f tags head/tags diag diag.map *.out bootimage 

