GNUmakefile 873 Bytes
include $(ROOT)/usr/include/make/PRdefs

APP =		osprof

OPTIMIZER =	-g -DPROFILE_INIT -DPROFILE_FLUSH -DPROFILE_STOP
#OPTIMIZER =	-g

TARGETS =	rom

CODEFILES =	main.c \
			prof.c \
			timer1.c \
			timer2.c \
			timer3.c

CODEASFILES =	
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 =	-Wall -non_shared -G 0 -D_ULTRA64 -mips2

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

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

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

default:	$(TARGETS)

include $(COMMONRULES)

install:	default

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

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