########################################################
# Author     : Gary M. Zoppetti
# Description: Sample Makefile for CMSC 476
########################################################

########################################################
# Variable definitions
########################################################
# C++ compiler
CXX := g++
#CXX := clang++
#CXX := mpicxx

# C++ compiler flags
# Use this first configuration for debugging.
#CXXFLAGS := -ggdb -Wall -Werror -std=c++26
# Use the following configuration for release.
CXXFLAGS := -O3 -Wall -Werror -std=c++26

# Linker: for C++ should be $(CXX)
LINK := $(CXX)

# Linker flags. Usually none.
LDFLAGS := 

# Library paths, prefaced with "-L". Usually none.
LDPATHS := 

# Libraries we're using, prefaced with "-l".
LDLIBS := -ltbb

# Executable name. Needs to be the basename of your driver
#   file. I.e., your driver must be named $(EXEC).cc
EXEC := HelloTbb

#############################################################
# Rules
#   Rules have the form
#   target : prerequisites
#   	  recipe
#############################################################

# Add additional object files if you're using more than one
#   source file.
$(EXEC) : $(EXEC).o
	$(LINK) $(LDFLAGS) $^ $(LDLIBS) -o $@

# Add rules for each object file.
# No recipes are typically needed.
HelloTbb.o : HelloTbb.cc Timer.hpp

#############################################################

.PHONY : clean
clean :
	@$(RM) $(EXEC) a.out core
	@$(RM) *.o *.d *~

#############################################################
