Makefile 1.65 KB
#!smake -k
#
# Makefile for  NINTENDO64 SAMPLE PROGRAM 1
#
#	Copyright (C) 1997, NINTENDO Co,Ltd.
#

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

#FINAL =

#ifdef FINAL
OPTIMIZER       = -O2
LCDEFS          = -DNDEBUG -D_FINALROM -DF3DEX_GBI_2
N64LIB          = -lultra_rom
#else
OPTIMIZER       = -g
LCDEFS          = -DF3DEX_GBI_2 -D_AUDIO_DEBUG_
N64LIB          = -lultra_d
#endif

APP =		nnsample1

TARGETS =	rom

TEXHFILES =

HFILES =	def.h message.h vram.h nnsched.h segment.h main.h  \
		controller.h audio.h graphic.h main01.h cont_finish.h \
		fiter_1s1.h fiter_2s1.h reflect.h 

CODEFILES   = 	boot.c rdp_output.c dram_stack.c \
		main.c message.c nnsched.c main00.c controller.c audio.c \
		graphic.c graphic_00.c gfxyield.c gfxinit.c main01.c  \
		graphic_01.c

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

DATAFILES   =	cfb.c zbuf.c gfxdlistbuf.c fiter_1s1.c  fiter_2s1.c \
		cont_finish.c

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

CODESEGMENT =	codesegment.o

OBJECTS =	$(CODESEGMENT) $(DATAOBJECTS)

LCINCS =	-I.
LCOPTS =	-fullwarn -wlint,-f -woff 813,818,819,826,827,852 -non_shared -G 0
LDFLAGS =	$(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib $(N64LIB)

LDIRT  =	$(APP)

default:	$(TARGETS)

include $(COMMONRULES)

install:	default
		$(INSTALL) -m 444 -F /usr/src/PR/demos_old/nnsample1 \
			$(HFILES) $(CODEFILES) $(DATAFILES) Makefile spec \
			README.ASCII README.TXT nnsched.txt

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

#ifdef FINAL
$(TARGETS) $(APP):      spec $(OBJECTS)
	$(MAKEROM) -s 9 -r $(TARGETS) spec
#ifndef NOMAKEMASK
	makemask $(TARGETS)
#endif
#else
$(TARGETS) $(APP):      spec $(OBJECTS)
	$(MAKEROM) -r $(TARGETS) spec
#endif