From 7013e0b672a881a979ef05f504ba3b2fb3dfdaf4 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 15 Aug 2013 00:58:23 -0700 Subject: Small changes to compile on Mac. --- Makefile | 6 +++++- src/misc/util/abc_global.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9c8a3a8a..ca22379d 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,11 @@ endif endif -LIBS := -ldl -lrt +# LIBS := -ldl -lrt +LIBS := -ldl +ifneq ($(findstring Darwin, $(shell uname)), Darwin) + LIBS += -lrt +endif ifneq ($(READLINE),0) CFLAGS += -DABC_USE_READLINE diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h index 8952d1e2..efd790f6 100644 --- a/src/misc/util/abc_global.h +++ b/src/misc/util/abc_global.h @@ -272,7 +272,7 @@ static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNo typedef ABC_INT64_T abctime; static inline abctime Abc_Clock() { -#if defined(LIN) || defined(LIN64) +#if defined(LIN) || defined(LIN64) && !(__APPLE__ & __MACH__) struct timespec ts; if ( clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) < 0 ) return (abctime)-1; -- cgit v1.2.3