1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
|
From: Sergio Durigan Junior <sergiodj@sergiodj.net>
Date: Sat, 2 Jul 2016 08:17:33 -0400
Subject: Support GNU/kFreeBSD builds
---
configure | 11 +++++++++++
makefile_kfreebsdLP64_utf8 | 6 +++---
makefile_kfreebsdLP64_utf8_ffi | 6 +++---
makefile_kfreebsd_utf8 | 6 +++---
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/configure b/configure
index edd06f8..14fbd64 100755
--- a/configure
+++ b/configure
@@ -11,6 +11,7 @@ echo
case `uname` in
Darwin) true ${os_type:=MAC_OSX} ;;
Linux) true ${os_type:=LINUX} ;;
+ GNU/kFreeBSD) true ${os_type:=kFreeBSD} ;;
FreeBSD) true ${os_type:=_BSD} ;;
NetBSD) true ${os_type:=_BSD} ;;
OpenBSD) true ${os_type:=_BSD} ;;
@@ -88,6 +89,16 @@ elif [ ${os_type} = LINUX ] ; then
cp makefile_linux_utf8_ffi makefile_build
fi
fi
+elif [ ${os_type} = kFreeBSD ] ; then
+ if [ ${memory_model} = LP64 ] ; then
+ if [ -f /usr/include/*-kfreebsd-gnu/ffi.h ] ; then
+ cp makefile_kfreebsdLP64_utf8_ffi makefile_build
+ else
+ cp makefile_kfreebsdLP64_utf8 makefile_build
+ fi
+ else
+ cp makefile_kfreebsd_utf8 makefile_build
+ fi
elif [ ${os_type} = _BSD ] ; then
if [ ${memory_model} = LP64 ] ; then
if [ -f /usr/local/include/ffi.h ] ; then
diff --git a/makefile_kfreebsdLP64_utf8 b/makefile_kfreebsdLP64_utf8
index ce99091..df44803 100644
--- a/makefile_kfreebsdLP64_utf8
+++ b/makefile_kfreebsdLP64_utf8
@@ -6,16 +6,16 @@ OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-fil
# the option -fno-strict-aliasing may not be available on some BSD versions
-DEFAULT_CFLAGS = -m64 -Wall -Wno-strict-aliasing -O2 -c -g -DREADLINE -DNEWLISP64 -DSUPPORT_UTF8 -DKFREEBSD $(CFLAGS)
+DEFAULT_CFLAGS = -Wall -Wno-strict-aliasing -O2 -c -g -DREADLINE -DNEWLISP64 -DSUPPORT_UTF8 -DKFREEBSD $(CFLAGS)
# or without readline lib
#CFLAGS = -Wall -Wno-strict-aliasing -O2 -c -g -DNEWLISP64 -DKFREEBSD
CC = cc
default: $(OBJS)
- $(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -ldl -lreadline -lncurses -o newlisp
+ $(CC) $(LDFLAGS) $(OBJS) -g -lm -ldl -lreadline -lncurses -o newlisp
# or without readline lib
-# $(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -o newlisp
+# $(CC) $(LDFLAGS) $(OBJS) -g -lm -o newlisp
.c.o:
$(CC) $(CPPFLAGS) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_kfreebsdLP64_utf8_ffi b/makefile_kfreebsdLP64_utf8_ffi
index 251434a..6af6ac6 100644
--- a/makefile_kfreebsdLP64_utf8_ffi
+++ b/makefile_kfreebsdLP64_utf8_ffi
@@ -5,7 +5,7 @@ OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-fil
nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
# the option -fno-strict-aliasing may not be available on some BSD versions
-DEFAULT_CFLAGS = -m64 -Wall -fno-strict-aliasing -O2 -c -g -DREADLINE -DNEWLISP64 -DSUPPORT_UTF8 -DKFREEBSD -DFFI $(CFLAGS)
+DEFAULT_CFLAGS = -Wall -fno-strict-aliasing -O2 -c -g -DREADLINE -DNEWLISP64 -DSUPPORT_UTF8 -DKFREEBSD -DFFI $(CFLAGS)
# or without readline lib and libffi
#CFLAGS = -Wall -Wno-strict-aliasing -O2 -c -g -DNEWLISP64 -DKFREEBSD
@@ -13,9 +13,9 @@ DEFAULT_CFLAGS = -m64 -Wall -fno-strict-aliasing -O2 -c -g -DREADLINE -DNEWLISP6
CC = cc
default: $(OBJS)
- $(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -lreadline -lncurses -ldl -lffi -o newlisp
+ $(CC) $(LDFLAGS) $(OBJS) -g -lm -lreadline -lncurses -ldl -lffi -o newlisp
# or without readline lib
-# $(CC) $(LDFLAGS) $(OBJS) -m64 -g -lm -o newlisp
+# $(CC) $(LDFLAGS) $(OBJS) -g -lm -o newlisp
.c.o:
$(CC) $(CPPFLAGS) $(DEFAULT_CFLAGS) $<
diff --git a/makefile_kfreebsd_utf8 b/makefile_kfreebsd_utf8
index a9140b2..8b28151 100644
--- a/makefile_kfreebsd_utf8
+++ b/makefile_kfreebsd_utf8
@@ -4,16 +4,16 @@
OBJS = newlisp.o nl-symbol.o nl-math.o nl-list.o nl-liststr.o nl-string.o nl-filesys.o \
nl-sock.o nl-import.o nl-xml-json.o nl-web.o nl-matrix.o nl-debug.o nl-utf8.o pcre.o
-DEFAULT_CFLAGS = -m32 -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -DKFREEBSD -DSUPPORT_UTF8 $(CFLAGS)
+DEFAULT_CFLAGS = -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DREADLINE -DKFREEBSD -DSUPPORT_UTF8 $(CFLAGS)
# or without readline lib
#CFLAGS = -Wall -Wno-uninitialized -fno-strict-aliasing -O2 -c -g -DKFREEBSD -DSUPPORT_UTF8
CC = cc
default: $(OBJS)
- $(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -lreadline -ldl -lncurses -o newlisp
+ $(CC) $(LDFLAGS) $(OBJS) -g -lm -lreadline -ldl -lncurses -o newlisp
# or without readline lib
-# $(CC) $(LDFLAGS) $(OBJS) -m32 -g -lm -o newlisp
+# $(CC) $(LDFLAGS) $(OBJS) -g -lm -o newlisp
.c.o:
$(CC) $(CPPFLAGS) $(DEFAULT_CFLAGS) $<
|