summaryrefslogtreecommitdiff
path: root/ext/mcpat/mcpat.mk
diff options
context:
space:
mode:
authorAnthony Gutierrez <atgutier@umich.edu>2014-04-01 12:44:30 -0400
committerAnthony Gutierrez <atgutier@umich.edu>2014-04-01 12:44:30 -0400
commite553a7bfa7f0eb47b78632cd63e6e1e814025c9a (patch)
treef69a8e3e0ed55b95bf276b6f857793b9ef7b6490 /ext/mcpat/mcpat.mk
parent8d665ee166bf5476bb9b73a0016843ff9953c266 (diff)
downloadgem5-e553a7bfa7f0eb47b78632cd63e6e1e814025c9a.tar.xz
ext: add McPAT source
this patch adds the source for mcpat, a power, area, and timing modeling framework.
Diffstat (limited to 'ext/mcpat/mcpat.mk')
-rw-r--r--ext/mcpat/mcpat.mk81
1 files changed, 81 insertions, 0 deletions
diff --git a/ext/mcpat/mcpat.mk b/ext/mcpat/mcpat.mk
new file mode 100644
index 000000000..9aacbe0e6
--- /dev/null
+++ b/ext/mcpat/mcpat.mk
@@ -0,0 +1,81 @@
+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)
+CXX = g++ -m32
+CC = gcc -m32
+
+VPATH = cacti
+
+SRCS = \
+ Ucache.cc \
+ XML_Parse.cc \
+ arbiter.cc \
+ area.cc \
+ array.cc \
+ bank.cc \
+ basic_circuit.cc \
+ basic_components.cc \
+ 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 \
+ processor.cc \
+ router.cc \
+ sharedcache.cc \
+ subarray.cc \
+ technology.cc \
+ uca.cc \
+ wire.cc \
+ xmlParser.cc
+
+OBJS = $(patsubst %.cc,obj_$(TAG)/%.o,$(SRCS))
+
+all: obj_$(TAG)/$(TARGET)
+ cp -f obj_$(TAG)/$(TARGET) $(TARGET)
+
+obj_$(TAG)/$(TARGET) : $(OBJS)
+ $(CXX) $(OBJS) -o $@ $(INCS) $(CXXFLAGS) $(LIBS) -pthread
+
+#obj_$(TAG)/%.o : %.cc
+# $(CXX) -c $(CXXFLAGS) $(INCS) -o $@ $<
+
+obj_$(TAG)/%.o : %.cc
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+clean:
+ -rm -f *.o $(TARGET)
+
+