Makefile 1.54 KB
#!smake -k
#
# Makefile for onetri demo application 
#
#

DDPROCDIR = ../ddproc
PRDEPTH = ../../..
include $(ROOT)/usr/include/make/PRdefs
MAKEDISK = $(ROOT)/usr/sbin/makedisk

#FINAL =

#ifdef FINAL
OPTIMIZER       = -O2
LCDEFS          =
N64LIB          = -lleo -lultra_rom
ARGS            = FINAL=  
#else
OPTIMIZER       = -g
LCDEFS          = -DDEBUG
N64LIB          = -lleo_d -lultra_d
#endif

APP =		onetri

TARGETS =	onetri.rom

TEXHFILES =	brick.h

HFILES =	$(TEXHFILES) onetri.h herr.h hmenu.h

CODEFILES   =	onetri.c dram_stack.c rdp_output.c rdp_output_len.c \
		static.c \
		dd_proc.c err.c menu.c

CODEOBJECTS =	$(CODEFILES:.c=.o)

DATAFILES   =	cfb.c rsp_cfb.c

DATAOBJECTS =	$(DATAFILES:.c=.o)

DDPROCOBJECT = ddproc.o
CODESEGMENT  = codesegment.o

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

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

LDIRT  =	$(APP) $(TARGETS) gwrite

LDFLAGS =	$(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR \
		$(N64LIB)

default:	$(TARGETS)

include $(COMMONRULES)

install:	default
		$(INSTALL) -m 444 -F /usr/src/PR/demos/reboot/onetri \
			$(HFILES) $(CODEFILES) $(DATAFILES) Makefile spec

$(CODESEGMENT):	$(CODEOBJECTS) $(DDPROCOBJECT)
		$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS)  $(DDPROCOBJECT) $(LDFLAGS)

$(TARGETS) $(APP):      spec $(OBJECTS)
	$(MAKEDISK) -t 0 -R $(TARGETS) -S gwrite -B 1 spec 

ddproc.o : $(DDPROCDIR)/ddproc2.o 
	cp $(DDPROCDIR)/ddproc2.o ./ddproc.o

$(DDPROCDIR)/ddproc2.o !
	(cd $(DDPROCDIR);$(MAKE) $(ARGS));