Makefile.sgi.n 1.21 KB
include $(ROOT)/usr/include/make/PRdefs

# command names #
RM		= rm -f
CC		= cc
LD		= ld

# addition files used by make #
FILE_MAKEROM	= Makefile.makerom.n
FILE_DEPENDS	= Makefile.depend

# custom settings for compilation and linking #
OPTIMISE	= -O0 -g -mips2
DEFINES		= -D_DEBUG
LIBS		= -ln_mus_d -ln_audio_sc -lultra_d

# default settings for compilation and linking #
CCOPTS = -Wab,-r4300_mul $(DEFINES) -fullwarn -non_shared -G 0 -Xcpluscomm -I/usr/include/PR  -I./
LDFLAGS = $(MKDEPOPT) -nostdlib -L$(ROOT)/usr/lib -L$(ROOT)/usr/lib/PR $(LIBS)

# files to be made..
CODESEGMENT	= n_test_wave.o
CODEFILES 	= test_main.c test_music.c nnsched.c
CODEOBJECTS 	= $(CODEFILES:.c=.o)
DATAFILES	= test_workspace.c
DATAOBJECTS	= $(DATAFILES:.c=.o)

default:        rom

include $(COMMONRULES)
include $(FILE_DEPENDS)

$(CODESEGMENT):	$(CODEOBJECTS)
	@echo "Linking code files"
	$(LD) -o $(CODESEGMENT) -r $(CODEOBJECTS) $(LDFLAGS)

# generate stand alone test rom #
rom:	$(FILE_MAKEROM) $(CODESEGMENT) $(DATAOBJECTS)
	@echo "Making rom"
	$(MAKEROM) $(FILE_MAKEROM)

# remove generated output files #
remove:
	$(RM) *.o test_wave rom

# compile C files to object files #
.c.o:
	@echo Compiling ':' $*.c
	$(CC) $(CCOPTS) $(OPTIMISE) -c $*.c