diff --git a/Make.inc b/Make.inc index b23d241..030f2d7 100644 --- a/Make.inc +++ b/Make.inc @@ -82,37 +82,22 @@ override OS=WINNT endif #keep these if statements separate + ifeq ($(OS), WINNT) -SHLIB_EXT = dll -SONAME_FLAG = -soname -CFLAGS_add += -nodefaultlibs -shlibdir = $(bindir) -else -shlibdir = $(libdir) -endif - -ifeq ($(OS), Linux) -SHLIB_EXT = so -SONAME_FLAG = -soname -CFLAGS_add+=-fPIC -endif - -ifeq ($(OS), FreeBSD) -SHLIB_EXT = so -SONAME_FLAG = -soname -CFLAGS_add+=-fPIC -endif - -ifeq ($(OS), OpenBSD) -SHLIB_EXT = so -SONAME_FLAG = -soname -CFLAGS_add+=-fPIC -endif - -ifeq ($(OS), Darwin) -SHLIB_EXT = dylib -SONAME_FLAG = -install_name -CFLAGS_add+=-fPIC + SHLIB_EXT = dll + SONAME_FLAG = -soname + override CFLAGS_add += -nodefaultlibs + shlibdir = $(bindir) + else + ifeq ($(OS), Darwin) + SHLIB_EXT = dylib + SONAME_FLAG = -install_name + else + SHLIB_EXT = so + SONAME_FLAG = -soname + endif + override CFLAGS_add += -fPIC + shlibdir = $(libdir) endif # The target specific FLAGS_add diff --git a/i387/bsd_asm.h b/i387/bsd_asm.h index c00d277..0e3c01e 100644 --- a/i387/bsd_asm.h +++ b/i387/bsd_asm.h @@ -39,7 +39,7 @@ #if defined(__APPLE__) #include "osx_asm.h" #define CNAME(x) EXT(x) -#elif defined(__FreeBSD__) || defined(__linux__) || defined(_WIN32) +#else #include "bsd_cdefs.h" #ifdef PIC diff --git a/src/fpmath.h b/src/fpmath.h index ae194a4..492bf90 100644 --- a/src/fpmath.h +++ b/src/fpmath.h @@ -47,7 +47,7 @@ #define _PDP_ENDIAN __ORDER_PDP_ENDIAN__ #define _BYTE_ORDER __BYTE_ORDER__ -#elif defined(__linux) +#elif defined(__GLIBC__) #include #include diff --git a/src/types-compat.h b/src/types-compat.h index 5a6712b..665c1e3 100644 --- a/src/types-compat.h +++ b/src/types-compat.h @@ -5,7 +5,7 @@ #include #include -#ifdef __linux__ +#ifdef __GLIBC__ /* Not sure what to do about __pure2 on linux */ #define __pure2 #endif