#
# Definition file for dmon

#SAPATH=		$(ROOT)/../pdiagSA
#SAPATH=		/usr/people/frias/pdiagSA
#SA=		$(SAPATH)



#CSU=		$(DEPTH)/monitor/$(VERSION)_MONITOR/csu.monitor.o
#CSU.SRC=	$(DEPTH)/monitor/csu.monitor.s

MARK_S=		$(DEPTH)/monitor/$(VERSION)_MONITOR/mark_s.o
MARK_E=		$(DEPTH)/monitor/$(VERSION)_MONITOR/mark_e.o

#CMNPATH=	$(ROOT)/stand/arcs/dmon/libpdiag

# Where we will place the objects and libraries
#
OBJDIR=	$(DEPTH)/$(PRODUCT).O


# VPATH contains names of directories to look in for files not
# found in the current directory.
#
VPATH=	$(OBJDIR)


# Libraries built, used to create a dependency for the executable
DMONLIBS =  $(OBJDIR)/libcache.a $(OBJDIR)/libmonitor.a $(OBJDIR)/libmem.a


# Local directories to remove files from, picked up in commondefs
#
LDIRT= $(OBJDIR)/*.o $(OBJDIR)/*.a


# Local defines for the 'C' and assembly routines. Picked up by commondefs
# file in CCF and ASF definitions.
LCDEFS=	-DR4000 -DR4230 $(PRODDEFS)  -DDIAG_MONITOR  -D$(CPUBOARD)

# Define include paths for 'C' files and some compiler flags
# Note these variable are used by the commondefs file
#
LCINCS=		-I$(DEPTH)/../include
LCOPTS=		-G 0 -O -DLANGUAGE_C -non_shared -coff


# Define include paths for assembly files and some assembly options
# Note, LASINCS and LASOPTS are local variables included by commondefs
#
LASINCS= -I$(DEPTH)/../include
LASOPTS=-G 0 -g -w -Wab,-mips3 -Wab,-diag -B $(LCDEFS) -DLOCORE -DLANGUAGE_ASSEMBLY -non_shared -coff


# Used by low level Makefile to create a library.
BLDLIB= (cd $(OBJDIR); $(AR) scr $(TARGETS) $(OBJECTS))


# Define the 'C' and 'as' rules
#
.c.o:
	-rm -f $@
	$(CCF) $< -c -o $(OBJDIR)/$*.o

.s.o:
	-rm -f $@
	$(ASF) -o $(OBJDIR)/$@ $<
