From 55e61f65e498ed3188b490f0635d0b5ecd924705 Mon Sep 17 00:00:00 2001 From: Nguyen Anh Quynh Date: Mon, 26 Dec 2016 15:54:46 +0800 Subject: [PATCH] python: only preload librt.so on Linux --- bindings/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/Makefile b/bindings/Makefile index fa488af3..14e88df8 100644 --- a/bindings/Makefile +++ b/bindings/Makefile @@ -9,7 +9,13 @@ SAMPLE := $(SAMPLE:sample_batch_reg=) SAMPLE := $(SAMPLE:sample_x86_32_gdt_and_seg_regs=) SAMPLE := $(SAMPLE:shellcode=) +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S), Linux) ENV_VARS = LD_PRELOAD=librt.so LD_LIBRARY_PATH=../ DYLD_LIBRARY_PATH=../ +else +ENV_VARS = LD_LIBRARY_PATH=../ DYLD_LIBRARY_PATH=../ +endif + .PHONY: build install python c clean check test