######################################################################
# Particle System API and Demo
#
# by Dave McAllister
#
######################################################################

C++ = CC

GLUT_HOME  =/usr/local/contrib/unmoderated

# new 32 // Is mips4
# LNO =-LNO:opt=1:fusion=2:fission=2:fusion_peeling_limit=2048:cs1=32K:cs2=4M
# COPT = -O3 -Ofast=IP27 $(LNO)
COPT = -o32 -O2
CFLAGS = $(COPT) $(COMPFLAGS) -I. -I.. -I$(GLUT_HOME)/include
LIBSG= -lparticle -L$(GLUT_HOME)/lib -lglut -lGL -lGLU -lXmu -lX11 -lXext -lm

POBJS =action_api.o actions.o opengl.o system.o

ALL = libparticle.a pspray

all: $(ALL)

# following line needed for c++ .cc files
.SUFFIXES	: .cpp

.cpp.o:
	$(C++) $(CFLAGS) -c $<

libparticle.a: $(POBJS)
	rm -f $@
	ar clq $@ $(POBJS)

pspray: PSpray.o libparticle.a
	$(C++) $(CFLAGS) -o $@ PSpray.o -L. $(LIBSG)

clean:
	rm -f $(ALL)
	rm -f *.o
