aboutsummaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/libtrace/Makefile17
1 files changed, 17 insertions, 0 deletions
diff --git a/runtime/libtrace/Makefile b/runtime/libtrace/Makefile
index d9d311b..b74e037 100644
--- a/runtime/libtrace/Makefile
+++ b/runtime/libtrace/Makefile
@@ -4,3 +4,20 @@ LIBNAME = instr
include ../Makefile.libs
+## We need the native libraries for libinstr because they are directly
+## linked into the native CBE or LLC code. That is the only practical
+## way to debug them!
+
+LIBINSTR = ../Output/libinstr.$(ARCH).a
+all:: $(LIBINSTR)
+
+tracelib: tracelib.c
+ g++ -g -DTEST_INSTRLIB $< -o $@
+
+Debug/tracelib.o: tracelib.c Debug/.dir
+ $(CompileC) -g $< -o $@
+
+$(LIBINSTR): Debug/tracelib.o ../Output/.dir
+ ar r $@ $<
+
+tracelib.c: tracelib.h