Difference between
modified post a0452 by Anonymous on Mon 10th Jul 2023 15:22
original post 9fe by Anonymous on Mon 1st Aug 2022 16:32
Download diff
Show
old version |
new version |
both versions
| 1 | - | --- /dev/null 2022-07-25 11:42:10.933510077 +0200 | |
| 1 | + | + for i in pthread_mutex_attr_util/* | |
| 2 | - | +++ pthread_interceptor/Makefile 2022-08-01 15:09:58.790413283 +0200 | |
| 2 | + | + diff -u /dev/null pthread_mutex_attr_util/Makefile | |
| 3 | - | @@ -0,0 +1,53 @@ | |
| 3 | + | --- /dev/null 2023-07-10 02:44:06.720465928 +0200 | |
| 4 | + | +++ pthread_mutex_attr_util/Makefile 2023-07-10 16:10:28.308408997 +0200 | |
| 4 | 6 | +# | |
| 5 | - | +# Makefile for LD_PRELOAD pthreadinterceptor | |
| 7 | + | +# Makefile for LD_PRELOAD pthread_mutex_attr_util | |
| 6 | 8 | +# | |
| 9 | + | +# Written by Roland Mainz <roland.mainz@nrubsig.org> | |
| 8 | 10 | +# | |
| 11 | + | + | |
| 9 | 14 | +# ToDo: | |
| 10 | 15 | +# - cleanup (this Makefile is horrible and should actually use macros) | |
| 11 | 16 | +# - build 32bit and 64bit at the same time | |
| 12 | 17 | +# | |
| 13 | 18 | + | |
| 19 | + | +SHELL=/bin/ksh93 | |
| 14 | 21 | +CSTDFLAGS=-std=c17 | |
| 15 | 22 | +CARCHFLAGS=-m32 # -m32 or -m64 | |
| 16 | 23 | +CC=gcc # gcc or clang | |
| 17 | 24 | + | |
| 18 | 25 | +# | |
| 19 | 26 | +# misc | |
| 20 | 27 | +# | |
| 21 | - | +all: run_test pthr_inter_binaries.tar.bz2 | |
| 28 | + | +all: tests pthread_mutex_attr_util_binaries.tar.bz2 | |
| 22 | 29 | + | |
| 23 | 30 | +clean: | |
| 24 | - | + rm -f *.o *.so test1 pthr_inter_binaries.tar.bz2 | |
| 31 | + | + rm -f \ | |
| 32 | + | + *.o \ | |
| 25 | 37 | + | |
| 26 | 38 | +# | |
| 27 | - | +# build LD_PRELOAD function interceptor | |
| 39 | + | +# build shared library object for LD_PRELOAD | |
| 28 | 40 | +# | |
| 29 | - | +pthread_interceptor.o: pthread_interceptor.c | |
| 41 | + | +pthread_mutex_attr_util.o: pthread_mutex_attr_util.c | |
| 30 | - | + $(CC) $(CSTDFLAGS) $(CARCHFLAGS) -Wall -g pthread_interceptor.c -fPIC -rdynamic -c -o pthread_interceptor.o | |
| 42 | + | + $(CC) $(CSTDFLAGS) $(CARCHFLAGS) -Wall -g pthread_mutex_attr_util.c -fPIC -rdynamic -c -o pthread_mutex_attr_util.o | |
| 31 | - | +pthread_interceptor.so: pthread_interceptor.o | |
| 43 | + | +pthread_mutex_attr_util.so: pthread_mutex_attr_util.o | |
| 32 | - | + $(CC) $(CSTDFLAGS) $(CARCHFLAGS) -Wall -g pthread_interceptor.o -fPIC -rdynamic -shared -ldl -lpthread -o pthread_interceptor.so | |
| 44 | + | + $(CC) $(CSTDFLAGS) $(CARCHFLAGS) -Wall -g pthread_mutex_attr_util.o -fPIC -rdynamic -shared -ldl -lpthread -o pthread_mutex_attr_util.so | |
| 33 | 45 | + | |
| 34 | 46 | +# | |
| 47 | + | +# compile wrapper script | |
| 36 | 48 | +# | |
| 49 | + | +pthread_mutex_attr_util_wrapper: pthread_mutex_attr_util_wrapper.ksh | |
| 37 | 52 | + | |
| 38 | - | +# -rdynamic is required so that we get accurate function names | |
| 53 | + | +# | |
| 39 | - | +# from |backtrace()|&co | |
| 54 | + | +# tests | |
| 55 | + | +# | |
| 42 | 56 | + | |
| 43 | - | +run_test: test1 pthread_interceptor.so pthread_interceptor_wrapper.ksh | |
| 57 | + | +# -rdynamic is required for gcc so that we get accurate function | |
| 58 | + | +# names from |backtrace()|&co | |
| 44 | 63 | + @printf "# Begin tests.\n" | |
| 45 | - | + ksh93 pthread_interceptor_wrapper.ksh ./test1 | |
| 64 | + | + ./pthread_mutex_attr_util_wrapper ./test1 | |
| 46 | 65 | + @printf "# End tests.\n" | |
| 47 | 66 | + | |
| 48 | 67 | +# | |
| 49 | 68 | +# package binaries | |
| 50 | 69 | +# | |
| 51 | - | +pthr_inter_binaries.tar.bz2: pthread_interceptor.so pthread_interceptor_wrapper.ksh | |
| 70 | + | +pthread_mutex_attr_util_binaries.tar.bz2: \ | |
| 52 | - | + tar -cvf - pthread_interceptor.so pthread_interceptor_wrapper.ksh | \ | |
| 71 | + | + pthread_mutex_attr_util.so \ | |
| 53 | - | + bzip2 -9 >"pthr_inter_binaries.tar.bz2" | |
| 72 | + | + pthread_mutex_attr_util_wrapper \ | |
| 73 | + | + pthread_mutex_attr_util_wrapper.ksh \ | |
| 54 | 80 | + | |
| 81 | + | +# EOF. |
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
rovema.kpaste.net RSS