# Compiler/linker setup ------------------------------------------------------

# Mac OS X-specific flags.  Comment these out if using Linux.
#PLATFORM = osx
#CC       = gcc
#CFLAGS   = -fast -Wall
#OSLIBS   = -Wl,-framework -Wl,IOKit
#LDFLAGS  =

# Linux-specific flags.  Comment these out if using Mac OS X.
PLATFORM = linux
CC       = g++
CFLAGS   = -O3 -Wall -std=c++11
OSLIBS   =
LDFLAGS  = -ltbb

#-std=c++11: special modifier to allow for lambda expressions in TBB

# make all: all OBJS are compiled and executable available
# make <individual>
# make clean
# '-ltbb' has to be included at the end of the command (can't be in the CFLAGS)
# do not use spaces (tabs are allowed)
# Example programs -----------------------------------------------------------

OBJS = dot_product
all: $(OBJS)

dot_product: dot_product.cpp dot_product_fun.o
	$(CC) $(CFLAGS) dot_product.cpp dot_product_fun.o $(LDFLAGS) -o dot_product

# library
dot_product_fun.o: dot_product_fun.cpp dot_product_fun.h
	$(CC) $(CFLAGS) -c dot_product_fun.cpp $(LDFLAGS)

# Maintenance and stuff ------------------------------------------------------
clean:
	rm -f $(OBJS) *.o core
