27 |
.SUFFIXES: .c .o |
.SUFFIXES: .c .o |
28 |
## |
## |
29 |
|
|
30 |
CFLAGS=-Wall -g |
CFLAGS=-Wall -g -O0 |
31 |
LDFLAGS=-ldl -lmcheck -Xlinker --export-dynamic |
LDFLAGS=-ldl -lmcheck -Xlinker --export-dynamic |
32 |
|
|
33 |
all: stack |
all: stack TAGS |
34 |
|
|
35 |
stack: stack.c stack.h |
stack: stack.c stack.h |
36 |
$(CC) -I$(srcdir) $(CFLAGS) $(LDFLAGS) stack.c -o $@ |
$(CC) -I$(srcdir) $(CFLAGS) $(LDFLAGS) -pg stack.c -o $@ |
37 |
|
|
38 |
mtrace: stack |
mtrace: stack |
39 |
MALLOC_TRACE=mtrace.log ./stack |
MALLOC_TRACE=mtrace.log ./stack |
41 |
|
|
42 |
check: stack |
check: stack |
43 |
[ $(shell ./fib.st) = 832040 ] |
[ $(shell ./fib.st) = 832040 ] |
44 |
|
|
45 |
|
TAGS: $(shell find . -iname "*.[ch]" -print) |
46 |
|
etags $^ |