#Patterned on Makefile by Jerod Weinman for CSC 161, Spring 2015

# Type "make foo". 
# We rely on the implicit  rules foo.c -> foo.o for compiling and
# foo.o --> foo for linking

# MyroC directories for MathLAN
BASEPATH = /home/walker/MyroC
MYROCINC = $(BASEPATH)/include
MYROCBIN = $(BASEPATH)/bin
MYROCLIB = $(BASEPATH)/lib

# location of graphics libraries
#GRAPHICSLIB = /usr/local/lib
GRAPHICSLIB = /usr/X11R6/lib

# Use the gcc compiler
CC = gcc

# Set preprocessor flags
CPPFLAGS=-I$(MYROCINC)

# Set appropriate compiling flags
CFLAGS=-Wall -Wno-deprecated-declarations -std=gnu99 

# Set linker flags to include the relevant libraries
# flags needed for MathLAN
LDFLAGS=-L/home/walker/MyroC/lib -lMyroC -lbluetooth -ljpeg -leSpeakPackage -lm -lglut -lGLU -lGL -L/usr/X11R6/lib -lXmu -lXi -lXext -lX11 -lXt -pthread

# make the libraries known to the execution environment 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(MYROCLIB)

#----------------------------------------------------------------------------
# cleanup rules: To invoke this command, type "make clean".
# Use this target to clean up your directory, deleting (without warning) 
#   object files, old emacs source versions, and core dumps.

clean: 
	rm -f *.o *.exe *~ core*
