Fixup the dwfl_end () cleanup.
[debugger.git] / Makefile
index 43c9ea2..09d6610 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,17 +3,20 @@ ELFUTILS=../elfutils-0.127
 ifdef ELFUTILS
 CC+=-I$(ELFUTILS)/include -L$(ELFUTILS)/lib
 endif
+LIBS=-lthread_db -ldw -lelf -lebl -ldl
 
 all: debugger check
 
 debugger: debugger.c debugger.h
-       $(CC) -o $@ $<
+       $(CC) -o $@ $< $(LIBS)
 
 testsuite: testsuite.c debugger.c debugger.h
-       $(CC) -o $@ $< -pthread
+       $(CC) -o $@ $< $(LIBS)
 
 threadtest: threadtest.c
-       $(CC) -o $@ $< -lthread_db -ldw -lelf -lebl -ldl
+       $(CC) -o $@ $< $(LIBS)
+       ./$@ single
+       ./$@ multi 
 
 .PHONY: check
 check: testsuite
@@ -29,5 +32,5 @@ still:
 
 .PHONY: clean
 clean:
-       $(RM) debugger testsuite
+       $(RM) debugger testsuite threadtest