diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
commit | 3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch) | |
tree | f87bd4a126b3a843858eb447e8fd5893c3ee3882 /tests/deckard/contrib/libfaketime/src/Makefile.OSX | |
parent | Initial commit. (diff) | |
download | knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.tar.xz knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.zip |
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/deckard/contrib/libfaketime/src/Makefile.OSX')
-rw-r--r-- | tests/deckard/contrib/libfaketime/src/Makefile.OSX | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/tests/deckard/contrib/libfaketime/src/Makefile.OSX b/tests/deckard/contrib/libfaketime/src/Makefile.OSX new file mode 100644 index 0000000..683ad04 --- /dev/null +++ b/tests/deckard/contrib/libfaketime/src/Makefile.OSX @@ -0,0 +1,75 @@ +# +# Notes: +# +# * Compilation Defines: +# +# FAKE_STAT +# - Enables time faking also for files' timestamps. +# +# NO_ATFILE +# - Disables support for the fstatat() group of functions +# +# PTHREAD +# - Define this to enable multithreading support. +# +# PTHREAD_SINGLETHREADED_TIME +# - Define this if you want to single-thread time() ... there ARE +# possible caching side-effects in a multithreaded environment +# without this, but the performance impact may require you to +# try it unsynchronized. +# +# FAKE_SLEEP +# - Also intercept sleep(), nanosleep(), usleep(), alarm(), [p]poll() +# +# * Compilation addition: second libMT target added for building the pthread- +# enabled library as a separate library +# +# * Compilation switch change: previous versions compiled using '-nostartfiles' +# This is no longer the case since there is a 'startup' constructor for the library +# which is used to activate the start-at times when specified. This also initializes +# the dynamic disabling of the FAKE_STAT calls. +# +# By default, libfaketime will be compiled for your system's default architecture. +# To build for a different architecture, add -arch flags to CFLAGS and LDFLAGS. +# +# default to clang to support thread local variables +CC ?= clang +INSTALL ?= install + +PREFIX ?= /usr/local + +CFLAGS += -DFAKE_SLEEP -DFAKE_INTERNAL_CALLS -DPREFIX='"'${PREFIX}'"' +LIB_LDFLAGS += -dynamiclib -current_version 0.9.7 -compatibility_version 0.7 + +SONAME = 1 +LIBS = libfaketime.${SONAME}.dylib +BINS = faketime + +all: ${LIBS} ${BINS} + +libfaketime.${SONAME}.dylib: libfaketime.c + ${CC} -o $@ ${CFLAGS} ${LDFLAGS} ${LIB_LDFLAGS} -install_name ${PREFIX}/lib/faketime/$@ $< + +faketime: faketime.c + ${CC} -o $@ ${CFLAGS} ${LDFLAGS} $< + +clean: + @rm -f ${OBJ} ${LIBS} ${BINS} + +distclean: clean + @echo + +install: ${LIBS} ${BINS} + @echo + @echo "Copying the faketime libraries to ${DESTDIR}${PREFIX}/lib/faketime and the faketime wrapper script to ${DESTDIR}${PREFIX}/bin ..." + $(INSTALL) -dm0755 "${DESTDIR}${PREFIX}/lib/faketime/" + $(INSTALL) -m0644 ${LIBS} "${DESTDIR}${PREFIX}/lib/faketime/" + $(INSTALL) -dm0755 "${DESTDIR}${PREFIX}/bin" + $(INSTALL) -m0755 faketime "${DESTDIR}${PREFIX}/bin/faketime" + +uninstall: + for f in ${LIBS}; do rm -f "${DESTDIR}${PREFIX}/lib/faketime/$$f"; done + rmdir "${DESTDIR}${PREFIX}/lib/faketime" + rm -f "${DESTDIR}${PREFIX}/bin/faketime" + +.PHONY: all clean distclean install uninstall |