OCR_OBJ=SChecker.o  \
	rainbow_light.o\
	gs_light.o\
	gs_shader.o

all: $(OCR_OBJ) 

LD_DBG_OPT=-bl:load.map 	-bR:rmap

# Check the machine type that you have, and put that CFLAGS last.
CFLAGS=	           #IBM
CFLAGS=-G 0 -mips2 #SGI, R4000
CFLAGS=-G 0        #SGI, R3000

# Check the machine type that you have, and put that LDFLAGS last.
LDFLAGS=-bI:ocr.import -lc -lm -K                      #IBM
LDFLAGS=-lm	                                           #SGI

# Check the operating system type that you have, and put that LDOPT line last.
LDOPT_THAT_GO_FIRST=-H512 -T512 -bhalt:4 -bnodelcsect  # AIX
LDOPT_THAT_GO_FIRST=-shared                            # IRIX 5
LDOPT_THAT_GO_FIRST=-G 0 -e OCR_Entry -r               # IRIX 4

.c.o: 
	cc $(CFLAGS) -c -I. -I.. -I$(ALIAS_LOCATION)/include $*.c
	mv $*.o _$*.o
	ld  $(LDOPT_THAT_GO_FIRST) _$*.o  $(LDFLAGS) -o $@
	rm -f _$*.o

test: ./pix testS  testbow testgs
	echo 'Renderer Test Successful'

testgs: gs_light.o gs_shader.o
	renderer $(ALIAS_LOCATION)/sdl/gs_trims0.125
	cmp pix/gs_trims0.125  $(ALIAS_LOCATION)/pix/gs_trims0.125
	echo 

testbow: rainbow_light.o
	renderer $(ALIAS_LOCATION)/sdl/rainbow
	cmp pix/rainbow $(ALIAS_LOCATION)/pix/rainbow
	
testS: SChecker.o 
	renderer $(ALIAS_LOCATION)/sdl/SChecker
	cmp pix/BALL.SChecker $(ALIAS_LOCATION)/pix/BALL.SChecker

./pix:
	mkdir ./pix

clean:
	rm -f  $(OCR_OBJ) pix/BALL.SChecker "ocra*"
