GNUmakefile 1.12 KB
#! smake
#---------------------------------------------------------------------
#  $Id: GNUmakefile,v 1.1 2003/04/05 15:55:08 jprincen Exp $
#  
#  File : Makefile
#  
#  Coded     by Yoshitaka Yasumoto.   Jul 24, 1997.
#  Copyright by Nintendo, Co., Ltd.           1997.
#---------------------------------------------------------------------

include $(ROOT)/usr/include/make/PRdefs

APP =		sample
OPTIMIZER =	-g

TARGETS =	rom
CODEFILES =	system.c main.c static.c
CODEOBJECTS =	$(CODEFILES:.c=.o)
CODESEGMENT =	codesegment.o

DATAFILES =     system_cfb.c system_rspbuf.c tmembuf.c
DATAOBJECTS =   $(DATAFILES:.c=.o)

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

MAPFILE =	load.map

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

LCDEFS  =	-DDEBUG -DF3DEX_GBI

LDIRT   =	$(APP) *~ $(MAPFILE) Makedepend
LDFLAGS =	$(MKDEPOPT) -L$(ROOT)/usr/lib -lultra_d -lgcc

default:	$(TARGETS)

include $(COMMONRULES)

install:	default

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

rom:		spec $(OBJECTS)
		$(MAKEROM) $(LCDEFS) -m -r rom spec > $(MAPFILE)

#======== End of Makefile ========