a78a1ff3c74b0af2f9d8ab72c3347e4a512541b6
[ldtrace] / Makefile
1 CFLAGS=-std=c99 -Os -g
2 #CFLAGS+=-fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables
3 LDFLAGS=-g
4 CC=musl-gcc
5 all: wrap.so hello stress
6 hello: hello.o
7 stress: stress.o
8 wrap.o: head.h func.h
9 wrap.so: wrap.o
10         $(CC) $(LDFLAGS) -shared -o $@ $< -ldl -lm -lrt -lcrypt
11 clean:
12         rm -f wrap.so hello stress *.o
13 test: all
14         LD_PRELOAD=./wrap.so ./hello
15         LD_PRELOAD=./wrap.so ./stress 2>&1 |wc -l