#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 

# special rule for compiling eSpeakExample1.c, using eSpeakPackage only, without MyroC
eSpeakExample1: eSpeakExample1.c
	$(CC) $(CPPFLAGS) $(CFLAGS) eSpeakExample1.c -o eSpeakExample1.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*
