Sfoglia il codice sorgente

Build on GNU/kfreeBSD and GNU/Hurd
Use __GLIBC__ instead of __linux
Simplify Make.inc as per JuliaLang/openspecfun@e91925a

Graham Inggs 9 anni fa
parent
commit
ebe1db3ce4
4 ha cambiato i file con 18 aggiunte e 33 eliminazioni
  1. 15 30
      Make.inc
  2. 1 1
      i387/bsd_asm.h
  3. 1 1
      src/fpmath.h
  4. 1 1
      src/types-compat.h

+ 15 - 30
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
+ifeq ($(OS), WINNT)
+  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

+ 1 - 1
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

+ 1 - 1
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 <features.h>
 #include <endian.h>

+ 1 - 1
src/types-compat.h

@@ -5,7 +5,7 @@
 #include <limits.h>
 #include <stdint.h>
 
-#ifdef __linux__
+#ifdef __GLIBC__
 /* Not sure what to do about __pure2 on linux */
 #define __pure2 
 #endif