diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2014-10-11 15:02:23 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2014-10-11 15:02:23 -0500 |
commit | e8ed7b1d1b5bef31e9874f679a5797c2e00d06f1 (patch) | |
tree | 421c9c50377aa664958685914f5504c4c019e21f /ext/dsent/libutil/Makefile | |
parent | a098fad174d8559037602b248b8e6f7f46bfebbb (diff) | |
download | gem5-e8ed7b1d1b5bef31e9874f679a5797c2e00d06f1.tar.xz |
ext: add the source code for DSENT
This patch adds a tool called DSENT to the ext/ directory. DSENT
is a tool that models power and area for on-chip networks. The next
patch adds a script for using the tool.
Diffstat (limited to 'ext/dsent/libutil/Makefile')
-rw-r--r-- | ext/dsent/libutil/Makefile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/ext/dsent/libutil/Makefile b/ext/dsent/libutil/Makefile new file mode 100644 index 000000000..150028346 --- /dev/null +++ b/ext/dsent/libutil/Makefile @@ -0,0 +1,43 @@ + +# Define the directories that will be compiled +DIRS_TO_COMPILE := . \ + +DIRS = $(patsubst %,$(CURDIR)/%,$(DIRS_TO_COMPILE)) + +SRCS = $(foreach dir, $(DIRS), $(wildcard $(dir)/*.cc)) + +OBJS = $(SRCS:%.cc=%.o) + +DEF_FLAGS = + +ifdef LIBUTIL_IS_LOG + LIBUTIL_IS_LOG = true +else + LIBUTIL_IS_LOG = false +endif +DEF_FLAGS += -DLIBUTIL_IS_LOG=$(LIBUTIL_IS_LOG) + +INCLUDE_FLAGS = $(foreach dir, $(DIRS), -I$(dir)) +OPT_FLAGS = -O2 -g +WARN_FLAGS = -pedantic -Wall -W -Wextra -Werror +CXXFLAGS = $(OPT_FLAGS) $(WARN_FLAGS) $(INCLUDE_FLAGS) $(DEF_FLAGS) + +TARGET = $(CURDIR)/libutil.a + +all: $(TARGET) + +$(TARGET): $(OBJS) + ar rcs $@ $^ +#$(TARGET): $(OBJS) +# $(CXX) $(CXXFLAGS) $^ -o $(TARGET) + +%.o: %.cc + $(CXX) $(CXXFLAGS) -c $< -o $@ + +%/created: + mkdir -p $(dir $@) + touch $@ + +clean: + $(RM) -rf $(OBJS) $(TARGET) + |