#
# Definition file for dmon
DEPTH= ..


# Needs to be changed over to $(ROOT)/irix/kern/sys/
#SAPATH=		/usr/people/frias//pdiagSA
#SA=		$(SAPATH)

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. PRODDEFS is defined in $(ROOT/usr/
# include/make/(x)defs file.
DEFINES=	-DR4000 -DR4230
LCDEFS=	-DDIAG_MONITOR $(DEFINES) $(PRODDEFS) -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 -I$(DEPTH)/../include -I$(ROOT)/irix/kern/sys
LCINCS=	-I$(DEPTH)/include -I$(DEPTH)/../include -I$(ROOT)/usr/include/sys
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 -I$(DEPTH)/../include -I$(ROOT)/usr/include -I$(ROOT)/usr/include/sys
# LASOPTS=-G 0 -g -w -non_shared -coff  -mips3 -32bit -Wab,-diag -B $(LCDEFS) -DLOCORE -D_LANGUAGE_ASSEMBLY
LASOPTS=-G 0 -g -w -non_shared -coff  -mips3 -32 -Wab,-diag -B $(LCDEFS) -DLOCORE -D_LANGUAGE_ASSEMBLY


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


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

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