# See the Open Render instalation guide for more help.
OBJ=simple_texture.o simple_shader.o simple_light.o

all: $(OBJ) ./pix 

# These flags are options for the C/C++ compiler.
# Check the machine type that you have, and put that CFLAGS last.
CFLAGS= -O                  # IBM
CFLAGS= -O -G 0 -mips2      # SGI, R4K, R5K, R8K, R10K, Irix 5
CFLAGS= -O -G 0 -mips3 -n32 # SGI, R4K,                 Irix 6
CFLAGS= -O -G 0 -mips4 -n32 # SGI, R5K, R8K, R10K,      Irix 6

# These flags are the link options to allow your code to find libraries
# of system defined functions.
# Check the machine type that you have, and put that LDFLAGS last.
LDFLAGS=-bI:ocr.import -lc -lm -K                      # IBM
LDFLAGS=-lm	                                           # SGI

# These flags are load options which enable the produced object file to be
# Check the operating system type that you have, and put that LDOPT line last.
# To check the operating system, type 'uname -a' in a SGI UNIX shell. The third
# number you see is the operating system revision.
LDOPT_THAT_GO_FIRST=-H512 -T512 -bhalt:4 -bnodelcsect  # AIX (IBM)
LDOPT_THAT_GO_FIRST=-G 0 -e OCR_Entry -r               # IRIX 4
LDOPT_THAT_GO_FIRST=-shared                            # IRIX 5
LDOPT_THAT_GO_FIRST=-shared -n32                       # IRIX 6

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

./pix:
	mkdir ./pix

clean:
	rm -f $(OBJ)

