makeultra 1021 Bytes
include $(ROOT)/usr/include/make/PRdefs

APP =		corefunc

OPTIMIZER =	-g

TARGETS =	rom

CODEFILES =	main.c \
		event0.c \
		int0.c int1.c int2.c int3.c int4.c \
		mesg0.c mesg1.c mesg2.c mesg3.c \
		mesg4.c mesg5.c mesg6.c \
		thread0.c thread1.c thread2.c thread3.c thread4.c \
		thread5.c thread6.c thread7.c thread8.c thread9.c tlb0.c
CODEASFILES =	threadasm.s end_program.s
CODEOBJECTS =	$(CODEFILES:.c=.o) $(CODEASFILES:.s=.o)

DATAFILES =	buffer.c
DATAOBJECTS=	$(DATAFILES:.c=.o)
OBJECTS =       codesegment.o $(DATAOBJECTS)

LCINCS =	-I. -I$(ROOT)/usr/include/PR
LCOPTS =	-fullwarn -non_shared -G 0 -D_ULTRA64

LASINCS =	$(LCINCS)
LASOPTS =	-non_shared -G 0 -D_ULTRA64

LDIRT  =	$(APP) $(APP).sym

LDFLAGS =	$(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -lultra_d

default:	$(TARGETS)

include $(COMMONRULES)

install:	default

codesegment.o:	$(CODEOBJECTS) $(ROOT)/usr/lib/libultra_i.a
		$(LD) -o codesegment.o -r $(CODEOBJECTS) $(LDFLAGS)

rom $(APP):	spec.ultra $(OBJECTS) $(MAKEROM)
		$(MAKEROM)  -r rom spec.ultra