mcpat.mk revision 10232:ae97cd1bad82
1TARGET = mcpat 2SHELL = /bin/sh 3.PHONY: all depend clean 4.SUFFIXES: .cc .o 5 6ifndef NTHREADS 7 NTHREADS = 4 8endif 9 10 11LIBS = 12INCS = -lm 13 14ifeq ($(TAG),dbg) 15 DBG = -Wall 16 OPT = -ggdb -g -O0 -DNTHREADS=1 -Icacti 17else 18 DBG = 19 OPT = -O3 -msse2 -mfpmath=sse -DNTHREADS=$(NTHREADS) -Icacti 20 #OPT = -O0 -DNTHREADS=$(NTHREADS) 21endif 22 23#CXXFLAGS = -Wall -Wno-unknown-pragmas -Winline $(DBG) $(OPT) 24CXXFLAGS = -Wno-unknown-pragmas $(DBG) $(OPT) 25CXX = g++ -m32 26CC = gcc -m32 27 28VPATH = cacti 29 30SRCS = \ 31 Ucache.cc \ 32 XML_Parse.cc \ 33 arbiter.cc \ 34 area.cc \ 35 array.cc \ 36 bank.cc \ 37 basic_circuit.cc \ 38 basic_components.cc \ 39 cacti_interface.cc \ 40 component.cc \ 41 core.cc \ 42 crossbar.cc \ 43 decoder.cc \ 44 htree2.cc \ 45 interconnect.cc \ 46 io.cc \ 47 iocontrollers.cc \ 48 logic.cc \ 49 main.cc \ 50 mat.cc \ 51 memoryctrl.cc \ 52 noc.cc \ 53 nuca.cc \ 54 parameter.cc \ 55 processor.cc \ 56 router.cc \ 57 sharedcache.cc \ 58 subarray.cc \ 59 technology.cc \ 60 uca.cc \ 61 wire.cc \ 62 xmlParser.cc 63 64OBJS = $(patsubst %.cc,$(ODIR)/obj_$(TAG)/%.o,$(SRCS)) 65 66all: $(ODIR)/obj_$(TAG)/$(TARGET) 67 cp -f $< $(ODIR)/$(TARGET) 68 69$(ODIR)/obj_$(TAG)/$(TARGET) : $(OBJS) 70 $(CXX) $^ -o $@ $(INCS) $(CXXFLAGS) $(LIBS) -pthread 71 72$(ODIR)/obj_$(TAG)/%.o : %.cc 73 $(CXX) $(CXXFLAGS) -c $< -o $@ 74 75clean: 76 -rm -f *.o $(ODIR)/$(TARGET) 77 78 79