# Should be set in the environment:
DEFAULT_TARGET_ARCH  = linux
DEFAULT_SYSTEMC_HOME = /Users/charleswilson/Documents/OSCI/SystemC/2.2-gcc4.0
DEFAULT_TLM_HOME     = /Users/charleswilson/Documents/ESLX/projects/tlm_2

ifndef TARGET_ARCH
 TARGET_ARCH         = $(DEFAULT_TARGET_ARCH)
endif

ifndef SYSTEMC_HOME
 SYSTEMC_HOME        = $(DEFAULT_SYSTEMC_HOME)
endif

ifndef TLM_HOME
 TLM_HOME            = $(DEFAULT_TLM_HOME)
endif

SYSTEMC_INC_DIR      = $(SYSTEMC_HOME)/include
SYSTEMC_LIB_DIR      = $(SYSTEMC_HOME)/lib-$(TARGET_ARCH)
TLM_INC_DIR          = $(TLM_HOME)/include/tlm

# use null version for SystemC-2.1v1 / boost / gcc-3.4.4
FLAG_WERROR          = -Werror
#FLAG_WERROR         =

# Add 'PTHREADS=1' to command line for a pthreads build
ifdef PTHREADS
PFLAGS		     = -DSC_USE_PTHREADS
PLDFLAGS	     = -lpthread
endif

GXX                  = g++
GCC                  = gcc
LD                   = g++

FLAGS                = -g -Wall -pedantic -Wno-long-long $(FLAG_WERROR) \
                       -DSC_INCLUDE_DYNAMIC_PROCESSES $(PFLAGS) \
                       -I$(SYSTEMC_INC_DIR) -I$(TLM_INC_DIR) 
LDFLAGS              = -L$(SYSTEMC_LIB_DIR) -lsystemc $(PLDFLAGS)
#VALGRIND             = valgrind --log-file-exactly=valgrind.log
