summaryrefslogtreecommitdiff
path: root/util/statetrace/Makefile
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2009-07-27 00:53:39 -0700
committerAli Saidi <saidi@eecs.umich.edu>2009-07-27 00:53:39 -0700
commit081b6fe9db97bf3d9e49428dc5e19f27b141a642 (patch)
tree9a8ebef8a1384976b76416e9e31bb0f363786b23 /util/statetrace/Makefile
parent6835dbce340dcf5c651093229f2decd7f38943e6 (diff)
downloadgem5-081b6fe9db97bf3d9e49428dc5e19f27b141a642.tar.xz
ARM: Add ARM support to statetrace.
Diffstat (limited to 'util/statetrace/Makefile')
-rw-r--r--util/statetrace/Makefile31
1 files changed, 25 insertions, 6 deletions
diff --git a/util/statetrace/Makefile b/util/statetrace/Makefile
index 2abc06d8e..438828981 100644
--- a/util/statetrace/Makefile
+++ b/util/statetrace/Makefile
@@ -26,12 +26,31 @@
#
# Authors: Gabe Black
-.PHONY: statetrace
+CXX := g++
+INCLUDES := -I ./ -I ./arch
+CXXFLAGS := -O3 -ggdb
-statetrace: statetrace-native
+define build-obj
+$(CXX) -c $(patsubst %.o,%.cc,$@) -o $@ $(INCLUDES) $(CXXFLAGS)
+endef
-statetrace-native: statetrace.cc tracechild.cc tracechild_arch.cc printer.cc printer.hh refcnt.hh regstate.hh tracechild.hh
- g++ statetrace.cc tracechild.cc tracechild_arch.cc printer.cc -I ./ -I ./arch/ -O3 --static -o statetrace
+define final-link
+$(CXX) $(INCLUDES) $(CXXFLAGS) -o $@ $^
+endef
-statetrace-sparc: statetrace.cc tracechild.cc tracechild_arch.cc printer.cc printer.hh refcnt.hh regstate.hh tracechild.hh
- sparc64-unknown-linux-gnu-g++ statetrace.cc tracechild.cc tracechild_arch.cc printer.cc -g -I ./ -I ./arch/ -O3 --static -o statetrace
+all: statetrace
+
+printer.o: printer.cc printer.hh tracechild.hh refcnt.hh regstate.hh
+ $(build-obj)
+statetrace.o: statetrace.cc printer.hh tracechild.hh refcnt.hh regstate.hh
+ $(build-obj)
+tracechild.o: tracechild.cc tracechild.hh regstate.hh
+ $(build-obj)
+tracechild_arch.o: statetrace.cc printer.hh tracechild.hh refcnt.hh regstate.hh arch/tracechild_arm.hh arch/tracechild_arm.cc arch/tracechild_i386.hh arch/tracechild_i386.cc arch/tracechild_amd64.cc arch/tracechild_amd64.hh arch/tracechild_sparc.cc arch/tracechild_sparc.hh
+ $(build-obj)
+
+statetrace: printer.o statetrace.o tracechild.o tracechild_arch.o
+ $(final-link)
+
+clean:
+ rm -f *.o statetrace