mcpat.mk revision 10234:5cb711fa6176
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++ 26CC = gcc 27 28VPATH = cacti 29 30SRCS = \ 31 Ucache.cc \ 32 arbiter.cc \ 33 area.cc \ 34 array.cc \ 35 bank.cc \ 36 basic_circuit.cc \ 37 basic_components.cc \ 38 bus_interconnect.cc \ 39 cachearray.cc \ 40 cachecontroller.cc \ 41 cacheunit.cc \ 42 cacti_interface.cc \ 43 component.cc \ 44 core.cc \ 45 crossbar.cc \ 46 decoder.cc \ 47 htree2.cc \ 48 interconnect.cc \ 49 io.cc \ 50 iocontrollers.cc \ 51 logic.cc \ 52 main.cc \ 53 mat.cc \ 54 memoryctrl.cc \ 55 noc.cc \ 56 nuca.cc \ 57 parameter.cc \ 58 router.cc \ 59 subarray.cc \ 60 system.cc \ 61 technology.cc \ 62 uca.cc \ 63 wire.cc \ 64 xmlParser.cc 65 66OBJS = $(patsubst %.cc,$(ODIR)/obj_$(TAG)/%.o,$(SRCS)) 67 68all: $(ODIR)/obj_$(TAG)/$(TARGET) 69 cp -f $< $(ODIR)/$(TARGET) 70 71$(ODIR)/obj_$(TAG)/$(TARGET) : $(OBJS) 72 $(CXX) $^ -o $@ $(INCS) $(CXXFLAGS) $(LIBS) -pthread 73 74$(ODIR)/obj_$(TAG)/%.o : %.cc 75 $(CXX) $(CXXFLAGS) -c $< -o $@ 76 77clean: 78 -rm -f *.o $(ODIR)/$(TARGET) 79 80 81