#the following line has to be before the include
SIGNATURE=libcore
include	../Makefile.defs
##############################################################################
.PHONY: all clean

default: all

all: $(OBJ)/main.o $(OBJ)/libcore.a 

##############################################################################
#                Objects
##############################################################################
OBJS	:=Processor.o GProcessor.o LDSTQ.o SMTProcessor.o DInst.o Pipeline.o \
	FetchEngine.o ConsistencyPolicy.o Resource.o Cluster.o \
	DepWindow.o BPred.o \
	MemRequest.o MemObj.o  OSSim.o LDSTBuffer.o \
	ProcessId.o RunningProcs.o GMemorySystem.o ValueTable.o \
	GMemoryOS.o VPred.o MemAnalyzer.o 

ifdef BULKSC
OBJS += BulkManager.o
endif

ifdef TS_CAVA
OBJS += CavaManager.o
endif

ifdef TS_MULTI
OBJS += MultiManager.o
endif

ifdef TS_RATS
OBJS += RatsManager.o
endif

ifdef CRITICALITY
OBJS += CriticalityTC.o CriticalityBuilder.o CriticalityController.o 
OBJS += CriticalityPredictor.o
endif

ifdef TLS
OBJS += Epoch.o Checkpoint.o AdvancedStats.o SysCall.o
endif

ifdef TASKSCALAR
ifdef TLS
$(error You can not compile TaskScalar simultaneously with TLS)
endif
OBJS	+=TaskContext.o TaskHandler.o MemBuffer.o GLVID.o

ifdef ATOMIC
OBJS    +=ASVersion.o
else
OBJS    +=HVersion.o
endif

ifdef TS_PROFILING
OBJS	+=Profile.o
endif
endif

ifdef SESC_ENERGY
OBJS   += EnergyMgr.o
endif

ifdef SESC_SLICE
OBJS  += Slicer.o
endif

ifdef SESC_DDIS
OBJS:=DDIS.o $(OBJS)
endif

ifdef SPEED_STEP
OBJS  += TimelineManager.o
endif

ifdef SESC_CPPRED
OBJS  += CPBuilder.o CPPred.o
endif

ifdef IPC_TRACE
OBJS += IPCTracer.o
endif

ifdef SESC_ENERGY
ifdef SPEED_STEP
OBJS  += DVFSManager.o
endif
endif

##############################################################################
#                             Change Rules                                   # 
##############################################################################
# eclean is called by clean
eclean:
	-@rm -f $(OBJ)/libcore.a
	-@rm -f $(OBJ)/main.o

size:
	-@wc *.cpp *.h *.hpp

_MAKEFILE_COMMON_SUBSHELL=1

include $(SRC_DIR)/Makefile.common

ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),clean)
-include $(DOTDEPEND)
endif
endif
# DO NOT DELETE
