X-Git-Url: http://nsz.repo.hu/git/?p=ldtrace;a=blobdiff_plain;f=Makefile;fp=Makefile;h=0e1313bfc87cd30728fa99dfd4f1ac410ae6b705;hp=a78a1ff3c74b0af2f9d8ab72c3347e4a512541b6;hb=2dc8cd24da4d22e625a4815a5fb2787139eaafed;hpb=2694aa91c4849c393dd6d17bba260a86f696fc47 diff --git a/Makefile b/Makefile index a78a1ff..0e1313b 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,19 @@ CFLAGS=-std=c99 -Os -g #CFLAGS+=-fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables LDFLAGS=-g CC=musl-gcc -all: wrap.so hello stress +all: wrap.so hello stress wrapasm.so hello: hello.o stress: stress.o wrap.o: head.h func.h wrap.so: wrap.o - $(CC) $(LDFLAGS) -shared -o $@ $< -ldl -lm -lrt -lcrypt + $(CC) $(LDFLAGS) -shared -o $@ $< -ldl -lm -lrt -lpthread -lutil -lcrypt +func.s: funcnames + ./genasm.sh <$< >$@ +func.o: func.s +wrapasm.so: func.o wrap_help.o + $(CC) $(LDFLAGS) -shared -o $@ $^ -ldl -lm -lrt -lpthread -lutil -lcrypt clean: - rm -f wrap.so hello stress *.o + rm -f wrap.so hello stress *.o wrapasm.so test: all LD_PRELOAD=./wrap.so ./hello LD_PRELOAD=./wrap.so ./stress 2>&1 |wc -l