#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

# Use the gcc compiler
CC = gcc

# Set preprocessor flags
CPPFLAGS=-I/usr/local/include

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

# Set linker flags to include the relevant libraries
LDFLAGS=-lWs2_32 -L/usr/local/bin -lMyroC -leSpeakPackage -ljpeg -lturbojpeg -lglew32 -lglu32 -lfreeglut -lopengl32 

# general rule for compiling a program involving both MyroC and the eSpeakPackage: 
%.exe: %.c 
	$(CC) $(CPPFLAGS) $(CFLAGS) $<.c -o $@.exe -lWs2_32 -L/usr/local/bin -leSpeakPackage

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