summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-11-07 19:15:22 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2013-11-07 19:15:22 -0800
commit5021909cb1c42e80a27df117f084608dcbf3e2c3 (patch)
tree2dc771153db020bba7a791a26ff992c9f8c669e7
parent24ffd5269aa8228488f56b4898a29ff1bf7da21f (diff)
parent6ce69bf4ede911a2f94290543a7fab657a5cb7a3 (diff)
downloadabc-5021909cb1c42e80a27df117f084608dcbf3e2c3.tar.gz
abc-5021909cb1c42e80a27df117f084608dcbf3e2c3.tar.bz2
abc-5021909cb1c42e80a27df117f084608dcbf3e2c3.zip
Merged in atomb/abc (pull request #2)
More portability/flexibility fixes
-rw-r--r--Makefile6
-rw-r--r--src/misc/util/abc_global.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ca22379d..4f751b24 100644
--- a/Makefile
+++ b/Makefile
@@ -38,10 +38,10 @@ default: $(PROG)
arch_flags : arch_flags.c
$(CC) arch_flags.c -o arch_flags
-ARCHFLAGS := $(shell $(CC) arch_flags.c -o arch_flags && ./arch_flags)
-OPTFLAGS := -g -O #-DABC_NAMESPACE=xxx
+ARCHFLAGS ?= $(shell $(CC) arch_flags.c -o arch_flags && ./arch_flags)
+OPTFLAGS ?= -g -O #-DABC_NAMESPACE=xxx
-CFLAGS += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(OPTFLAGS) $(ARCHFLAGS) -I$(PWD)/src
+CFLAGS += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(OPTFLAGS) $(ARCHFLAGS) -Isrc
# Set -Wno-unused-bug-set-variable for GCC 4.6.0 and greater only
ifneq ($(or $(findstring gcc,$(CC)),$(findstring g++,$(CC))),)
diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h
index 144177da..b2b6ec91 100644
--- a/src/misc/util/abc_global.h
+++ b/src/misc/util/abc_global.h
@@ -274,7 +274,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) && !(__APPLE__ & __MACH__)) && !defined(__MINGW32__)
+#if (defined(LIN) || defined(LIN64)) && !(__APPLE__ & __MACH__) && !defined(__MINGW32__)
struct timespec ts;
if ( clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) < 0 )
return (abctime)-1;