source = main.cpp node_gl.cpp node_display.cpp scene.cpp network.cpp frame-lock.cpp
executables = sportcast-node

CPP = g++
LIBS = -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lGL -lraw1394 -liec61883 -lmpeg2 
#CPPFLAGS = -Wall -pipe -O3 -fomit-frame-pointer -march=x86-64 -mcpu=x86-64 -pthread
CPPFLAGS = -Wall -pipe -g -march=x86-64 -mcpu=x86-64 -pthread

all: $(executables)

sportcast-node: main.o node_gl.o node_display.o scene.o network.o frame-lock.o
	$(CPP) $(CPPFLAGS) -o $@ main.o node_gl.o node_display.o \
	scene.o network.o frame-lock.o $(LIBS)

include depend

depend: $(source)
	$(CPP) $(INCLUDES) -MM $(source) > depend

.PHONY: clean
clean:
	-rm -f $(executables) depend *.o
