diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..433667c --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +all: libdynsymlink.so +PHONY: all + +libdynsymlink.so: libdynsymlink.o + clang -o libdynsymlink.so --shared libdynsymlink.o -ldl + +test1: test1.o libdynsymlink.so + clang -o test1 test1.o libdynsymlink.so + +test2: test2.o + clang -o test2 test2.o + +libdynsymlink.o: libdynsymlink.c + clang -o libdynsymlink.o -fPIC -c libdynsymlink.c + +test1.o: test1.c + clang -o test1.o -c test1.c + +test2.o: test2.c + clang -o test2.o -c test2.c + +check: test1 test2 libdynsymlink.so + LD_LIBRARY_PATH=. ./test1 + LD_PRELOAD=./libdynsymlink.so ./test2 +PHONY: check + +clean: + +rm -f test1 test2 test1.o test2.o libdynsymlink.so libdynsymlink.o +PHONY: clean |
