#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
BASEPATH = /usr/local
MYROCINC = $(BASEPATH)/include
MYROCBIN = $(BASEPATH)/bin
MYROCLIB = $(BASEPATH)/lib

# location of graphics libraries
GRAPHICSLIB = /usr/local/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 Linux on a personal computer
LDFLAGS= -L$(MYROCLIB) -lMyroC -leSpeakPackage -L$(GRAPHICSLIB) -ljpeg

# 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*
