New state: STATE_DISK_SLEEP
[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 LIBS=-lthread_db -ldw -lelf -lebl -ldl
7
8 all: debugger check
9
10 debugger: debugger.c debugger.h
11         $(CC) -o $@ $< $(LIBS)
12
13 testsuite: testsuite.c debugger.c debugger.h
14         $(CC) -o $@ $< $(LIBS)
15
16 threadtest: threadtest.c
17         $(CC) -o $@ $< $(LIBS)
18         ./$@ single
19         ./$@ multi 
20
21 .PHONY: check
22 check: testsuite
23         ./testsuite
24         @echo OK
25
26 .PHONY: still
27 still: testsuite
28         ls -l core* 2>/dev/null || true
29         date --iso=seconds
30         set -ex; ulimit -c unlimited; time ./testsuite -l
31
32
33 .PHONY: clean
34 clean:
35         $(RM) debugger testsuite threadtest
36