From 6a8444ea25ec07dc05e92a0fe7dc8bc4aa8b2958 Mon Sep 17 00:00:00 2001 From: Ben Huntsman Date: Fri, 30 Jul 2021 23:26:53 -0700 Subject: [PATCH] Make.aix, include/dtos.h, README.md: Initial AIX support --- CONTRIBUTORS | 1 + Make.aix | 19 +++++++++++++++++++ README.md | 2 ++ include/dtos.h | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 Make.aix diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 8f93a66..ceff764 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -8,3 +8,4 @@ Erik Quanstrom David du Colombier <0intro@gmail.com> Russ Cox Yaroslav +Ben Huntsman diff --git a/Make.aix b/Make.aix new file mode 100644 index 0000000..964d84e --- /dev/null +++ b/Make.aix @@ -0,0 +1,19 @@ +# AIX +PTHREAD=-DPTHREAD +AR=ar +RANLIB=ranlib +X11=/usr/X11R6 +CC=xlc_r +CFLAGS=-I$(ROOT) -I$(ROOT)/include -I$(ROOT)/kern -c -I$(X11)/include -D_THREAD_SAFE $(PTHREAD) -O2 -DAIX -qmaxmem=-1 -qsuppress=1506-236 -qsuppress=1506-358 -qsuppress=1500-010 -g -qfullpath +O=o +OS=posix +GUI=x11 +LDADD=-L$(X11)/lib64 -L$(X11)/lib -lX11 +LDFLAGS=$(PTHREAD) +TARG=drawterm +AUDIO=none + +all: default + +libmachdep.a: + (cd posix-port && make) diff --git a/README.md b/README.md index b6abf25..278360e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,8 @@ To build on Unix, run CONF=unix make. To build on Solaris using Sun cc, run CONF=sun make. +To build on AIX using IBM XL C, run CONF=aix make. + To build on Windows, you need Mingw. See http://www.mingw.org. Edit Make.config to uncomment the Windows section and comment out the rest. Then run CONF=win32 make. diff --git a/include/dtos.h b/include/dtos.h index 79c208b..9d31660 100644 --- a/include/dtos.h +++ b/include/dtos.h @@ -1,4 +1,4 @@ -#if defined(linux) || defined(IRIX) || defined(SOLARIS) || defined(OSF1) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) || defined(__sun) || defined(sun) || defined(__OpenBSD__) +#if defined(linux) || defined(IRIX) || defined(SOLARIS) || defined(OSF1) || defined(__FreeBSD__) || defined(__APPLE__) || defined(__NetBSD__) || defined(__sun) || defined(sun) || defined(__OpenBSD__) || defined(AIX) # include "unix.h" # ifdef __APPLE__ # define panic dt_panic