X-Git-Url: http://nsz.repo.hu/git/?p=ldtrace;a=blobdiff_plain;f=Makefile;h=0e1313bfc87cd30728fa99dfd4f1ac410ae6b705;hp=c0d1a68930f9edfebff07b95126e85dc4204442d;hb=HEAD;hpb=39bb160cb7e48dd391dadb4b0de1f5eb5ce8c5ba diff --git a/Makefile b/Makefile index c0d1a68..0e1313b 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,20 @@ 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 *.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