2014-04-01 18:44:30 +02:00
|
|
|
TARGET = mcpat
|
|
|
|
SHELL = /bin/sh
|
|
|
|
.PHONY: all depend clean
|
|
|
|
.SUFFIXES: .cc .o
|
|
|
|
|
|
|
|
ifndef NTHREADS
|
|
|
|
NTHREADS = 4
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
LIBS =
|
|
|
|
INCS = -lm
|
|
|
|
|
|
|
|
ifeq ($(TAG),dbg)
|
|
|
|
DBG = -Wall
|
|
|
|
OPT = -ggdb -g -O0 -DNTHREADS=1 -Icacti
|
|
|
|
else
|
|
|
|
DBG =
|
|
|
|
OPT = -O3 -msse2 -mfpmath=sse -DNTHREADS=$(NTHREADS) -Icacti
|
|
|
|
#OPT = -O0 -DNTHREADS=$(NTHREADS)
|
|
|
|
endif
|
|
|
|
|
|
|
|
#CXXFLAGS = -Wall -Wno-unknown-pragmas -Winline $(DBG) $(OPT)
|
|
|
|
CXXFLAGS = -Wno-unknown-pragmas $(DBG) $(OPT)
|
2014-06-03 22:32:53 +02:00
|
|
|
CXX = g++
|
|
|
|
CC = gcc
|
2014-04-01 18:44:30 +02:00
|
|
|
|
|
|
|
VPATH = cacti
|
|
|
|
|
|
|
|
SRCS = \
|
|
|
|
Ucache.cc \
|
|
|
|
arbiter.cc \
|
|
|
|
area.cc \
|
|
|
|
array.cc \
|
|
|
|
bank.cc \
|
|
|
|
basic_circuit.cc \
|
|
|
|
basic_components.cc \
|
2014-06-03 22:32:59 +02:00
|
|
|
bus_interconnect.cc \
|
|
|
|
cachearray.cc \
|
|
|
|
cachecontroller.cc \
|
|
|
|
cacheunit.cc \
|
2014-04-01 18:44:30 +02:00
|
|
|
cacti_interface.cc \
|
|
|
|
component.cc \
|
|
|
|
core.cc \
|
|
|
|
crossbar.cc \
|
|
|
|
decoder.cc \
|
|
|
|
htree2.cc \
|
|
|
|
interconnect.cc \
|
|
|
|
io.cc \
|
|
|
|
iocontrollers.cc \
|
|
|
|
logic.cc \
|
|
|
|
main.cc \
|
|
|
|
mat.cc \
|
|
|
|
memoryctrl.cc \
|
|
|
|
noc.cc \
|
|
|
|
nuca.cc \
|
|
|
|
parameter.cc \
|
|
|
|
router.cc \
|
|
|
|
subarray.cc \
|
2014-06-03 22:32:59 +02:00
|
|
|
system.cc \
|
2014-04-01 18:44:30 +02:00
|
|
|
technology.cc \
|
|
|
|
uca.cc \
|
|
|
|
wire.cc \
|
2014-06-03 22:32:59 +02:00
|
|
|
xmlParser.cc
|
2014-04-01 18:44:30 +02:00
|
|
|
|
2014-06-03 22:32:29 +02:00
|
|
|
OBJS = $(patsubst %.cc,$(ODIR)/obj_$(TAG)/%.o,$(SRCS))
|
2014-04-01 18:44:30 +02:00
|
|
|
|
2014-06-03 22:32:29 +02:00
|
|
|
all: $(ODIR)/obj_$(TAG)/$(TARGET)
|
|
|
|
cp -f $< $(ODIR)/$(TARGET)
|
2014-04-01 18:44:30 +02:00
|
|
|
|
2014-06-03 22:32:29 +02:00
|
|
|
$(ODIR)/obj_$(TAG)/$(TARGET) : $(OBJS)
|
|
|
|
$(CXX) $^ -o $@ $(INCS) $(CXXFLAGS) $(LIBS) -pthread
|
2014-04-01 18:44:30 +02:00
|
|
|
|
2014-06-03 22:32:29 +02:00
|
|
|
$(ODIR)/obj_$(TAG)/%.o : %.cc
|
2014-04-01 18:44:30 +02:00
|
|
|
$(CXX) $(CXXFLAGS) -c $< -o $@
|
|
|
|
|
|
|
|
clean:
|
2014-06-03 22:32:29 +02:00
|
|
|
-rm -f *.o $(ODIR)/$(TARGET)
|
2014-04-01 18:44:30 +02:00
|
|
|
|
|
|
|
|