mirror of
https://github.com/Interlisp/maiko.git
synced 2026-02-22 07:07:53 +00:00
Support building on OpenBSD, x86-64 (#207)
* Support building on OpenBSD, x86-64 * Clean up OpenBSD Makefile * Add OpenBSD to cmake build * Use clang as CC for OpenBSD Co-authored-by: Alex Segura <alex@lispm.dev>
This commit is contained in:
@@ -66,6 +66,11 @@ ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
|||||||
"-DFREEBSD"
|
"-DFREEBSD"
|
||||||
"-DNOFORN"
|
"-DNOFORN"
|
||||||
)
|
)
|
||||||
|
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
|
||||||
|
LIST(APPEND MAIKO_DEFINITIONS
|
||||||
|
"-DOPENBSD"
|
||||||
|
"-DNOFORN"
|
||||||
|
)
|
||||||
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
LIST(APPEND MAIKO_DEFINITIONS
|
LIST(APPEND MAIKO_DEFINITIONS
|
||||||
"-DAIX" # This is temporary
|
"-DAIX" # This is temporary
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ case "$os" in
|
|||||||
x86_64-apple-darwin15*) echo 386 ;;
|
x86_64-apple-darwin15*) echo 386 ;;
|
||||||
x86_64-*) echo x86_64 ;;
|
x86_64-*) echo x86_64 ;;
|
||||||
powerpc-*) echo ppc ;;
|
powerpc-*) echo ppc ;;
|
||||||
|
amd64-*) echo x86_64 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
### Don't leave the variables set.
|
### Don't leave the variables set.
|
||||||
|
|||||||
52
bin/makefile-openbsd.x86_64-x
Normal file
52
bin/makefile-openbsd.x86_64-x
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Options for OpenBSD, Intel x86_64 and X-Window
|
||||||
|
|
||||||
|
CC = clang -m64 $(CLANG_CFLAGS)
|
||||||
|
|
||||||
|
XFILES = $(OBJECTDIR)xmkicon.o \
|
||||||
|
$(OBJECTDIR)xbbt.o \
|
||||||
|
$(OBJECTDIR)dspif.o \
|
||||||
|
$(OBJECTDIR)xinit.o \
|
||||||
|
$(OBJECTDIR)xscroll.o \
|
||||||
|
$(OBJECTDIR)xcursor.o \
|
||||||
|
$(OBJECTDIR)xlspwin.o \
|
||||||
|
$(OBJECTDIR)xrdopt.o \
|
||||||
|
$(OBJECTDIR)xwinman.o
|
||||||
|
|
||||||
|
|
||||||
|
XFLAGS = -I/usr/X11R6/include -DXWINDOW -DNOPIXRECT
|
||||||
|
|
||||||
|
# This is to make the %$#@! Apollo cc happy
|
||||||
|
OEXT = .o
|
||||||
|
# OPTFLAGS is normally -O2.
|
||||||
|
OPTFLAGS = -O2 -g3
|
||||||
|
DISPOPTFLAGS = -O2 -g3
|
||||||
|
FPFLAGS =
|
||||||
|
DFLAGS = -DOPENBSD -DAIX -DOLD_CURSOR \
|
||||||
|
-DBYTESWAP -DFORKCOMM -DNOFORN -DLOGINT $(XFLAGS) \
|
||||||
|
-DRELEASE=351
|
||||||
|
|
||||||
|
LDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm
|
||||||
|
LDELDFLAGS = -L/usr/X11R6/lib -lX11 -lc -lm
|
||||||
|
|
||||||
|
INLINE = # $(SRCDIR)dspSPARC.il
|
||||||
|
BITBLTFILE = # $(OBJECTDIR)bbtSPARC.o
|
||||||
|
BYTESWAPFILES = $(OBJECTDIR)byteswap.o
|
||||||
|
|
||||||
|
OBJECTDIR = ../$(RELEASENAME)/
|
||||||
|
|
||||||
|
default : ../$(OSARCHNAME)/lde
|
||||||
|
|
||||||
|
############
|
||||||
|
#
|
||||||
|
# SPECIAL xc.o for debugging
|
||||||
|
#
|
||||||
|
############
|
||||||
|
$(OBJECTDIR)xc.o: $(SRCDIR)xc.c $(INCDIR)lispemul.h $(INCDIR)emlglob.h \
|
||||||
|
$(INCDIR)address.h \
|
||||||
|
$(INCDIR)adr68k.h $(INCDIR)stack.h $(INCDIR)lspglob.h \
|
||||||
|
$(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)cell.h \
|
||||||
|
$(INCDIR)initatms.h $(INCDIR)gcdata.h \
|
||||||
|
$(INCDIR)arith.h $(INCDIR)stream.h \
|
||||||
|
$(INCDIR)tos1defs.h $(INCDIR)tosret.h \
|
||||||
|
$(INCDIR)tosfns.h $(INCDIR)inlineC.h
|
||||||
|
$(CC) $(DISPRFLAGS) -UOPDISP $(SRCDIR)xc.c -I$(INCDIR) -o $(OBJECTDIR)xc.o
|
||||||
@@ -263,7 +263,7 @@ typedef signed char s_char;
|
|||||||
/********************************************************/
|
/********************************************************/
|
||||||
/* */
|
/* */
|
||||||
/********************************************************/
|
/********************************************************/
|
||||||
#if defined(MACOSX) || defined(FREEBSD)
|
#if defined(MACOSX) || defined(FREEBSD) || defined(OPENBSD)
|
||||||
/* MacOS X, FreeBSD - mostly POSIX-compliant Unix */
|
/* MacOS X, FreeBSD - mostly POSIX-compliant Unix */
|
||||||
typedef signed char s_char;
|
typedef signed char s_char;
|
||||||
#endif /* MACOSX || FREEBSD */
|
#endif /* MACOSX || FREEBSD */
|
||||||
|
|||||||
Reference in New Issue
Block a user