+Support local elfutils copy.
[debugger.git] / Makefile
1 CC=gcc -ggdb3 -Wall -Werror
2 ELFUTILS=../elfutils-0.127
3 ifdef ELFUTILS
4 CC+=-I$(ELFUTILS)/include -L$(ELFUTILS)/lib
5 endif
6
7 all: debugger check
8
9 debugger: debugger.c debugger.h
10         $(CC) -o $@ $<
11
12 testsuite: testsuite.c debugger.c debugger.h
13         $(CC) -o $@ $< -pthread
14
15 threadtest: threadtest.c
16         $(CC) -o $@ $< -lthread_db -ldw -lelf -lebl -ldl
17
18 .PHONY: check
19 check: testsuite
20         ./testsuite
21         @echo OK
22
23 .PHONY: still
24 still:
25         ls -l core* 2>/dev/null || true
26         date --iso=seconds
27         set -ex; ulimit -c unlimited; time ./testsuite -l
28
29
30 .PHONY: clean
31 clean:
32         $(RM) debugger testsuite
33