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


USOUTILPATH = /usr/sbin
USOLIBPATH = /usr/lib
USO = $(USOUTILPATH)/uso
USOBUF = $(USOUTILPATH)/usobuf

USOLIB = -L$(USOLIBPATH) -luso

STLINC = -I/usr/people/giles/src/stl/latest

INCLUDEPATHS = $(APPINC) $(STLINC) -I$(GDLPATH)/include -I$(GDLPATH)/$(GDLTYPE)/include -I/usr/include/PR 
LIBS = -L$(LIB_DIR)/$(GDLTYPE) -lgdl_$(GDLTYPE)  -L$(ROOT)/usr/lib -lultra_rom  

ULTRA_LIB = /usr/lib/libultra_rom.a

ROM_CFLAGS = -DVTX_CACHE_SIZE=32 -DF3DLP_GBI

LDFLAGS =  -nostdlib -non_shared 
LDFLAGS1 =  -nostdlib -r

#LD = CC

LD = /usr/lib/PR/nld
CC = CC
cc = cc

DEPSTUFF = -MDupdate makedepend

NOOPT_FLAGS = -O0
OPT_FLAGS = -O2

CPPFLAGS = $(DEPSTUFF) $(INCLUDEPATHS) -D_GDL_U64 $(ROM_CFLAGS) -Wab,-r4300_mul -Wf,-Yc -woff 3106,3920,3554 -fullwarn -non_shared -G 0 -nostdinc -mips2 -o32 -no_auto_include  
CFLAGS = -Xcpluscomm $(DEPSTUFF) $(ROM_CFLAGS) -fullwarn -Wab,-r4300_mul -mips2 -32 -non_shared -G0 $(INCLUDEPATHS) 



.SUFFIXES: .c .cpp .o 

.c.o:
	@echo Compiling $<
	$(cc) $(OPT_FLAGS) $(CFLAGS) -c $< -o $@

.cpp.o:
	@echo Compiling $<
	$(CC) $(OPT_FLAGS) $(CPPFLAGS) -c $< -o $@




#.c.o:
#	@echo Compiling $<
#	$(cc) $(CFLAGS) -c $< -o $(<D)/$(USER)/$(@F)
#.cpp.o:
#	@echo Compiling $<
#	$(CC) $(CPPFLAGS) -c $< -o $(<D)/$(USER)/$(@F)

