1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-03 18:06:23 +00:00

Create/update additional makefiles for building maiko for WSL1. Update buildRelease workflow and assicated Dockerfile to build the WSL1 variants along wih standard linux variants.

This commit is contained in:
Frank Halasz
2025-06-03 18:54:15 -07:00
parent 834a6084c3
commit 6d171bff1d
9 changed files with 159 additions and 8 deletions

View File

@@ -18,8 +18,17 @@ COPY . ${INSTALL_LOCATION}
# Build maiko
RUN cd ${INSTALL_LOCATION}/bin \
&& ./makeright x cleanup \
&& ./makeright x
RUN cd ${INSTALL_LOCATION}/bin \
&& ./makeright x \
&& if [ "$(./machinetype)" = "x86_64" ]; then \
./makeright init; \
fi
# Build specially for WSL1 by "fooling" a linux build
RUN arch="$(./machinetype)" \
&& if [ "$arch" = "x86_64" ] || [ "$arch" = "aarch64" ]; then \
cd ${INSTALL_LOCATION}/bin \
&& echo "echo #!/bin/sh" > osversion \
&& echo "echo wsl1" >> osversion \
&& ./makeright x cleanup \
&& ./makeright x \
&& ./makeright init; \
fi

View File

@@ -224,7 +224,13 @@ jobs:
RELEASE_TAG: ${{ steps.tag.outputs.release_tag }}
run: |
mkdir -p /tmp/release_tars
for OSARCH in "linux.x86_64:linux_amd64" "linux.aarch64:linux_arm64" "linux.armv7l:linux_arm_v7" ; \
for OSARCH in \
"linux.x86_64:linux_amd64" \
"linux.aarch64:linux_arm64" \
"linux.armv7l:linux_arm_v7" \
"wsl1.x86_64:linux_amd64" \
"wsl1.aarch64:linux_arm64" \
; \
do \
pushd /tmp/docker_images/${OSARCH##*:}/usr/local/interlisp >/dev/null ; \
/usr/bin/tar -c -z \
@@ -246,6 +252,8 @@ jobs:
artifacts:
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.x86_64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.aarch64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-wsl1.x86_64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-wsl1.aarch64.tgz,
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-linux.armv7l.tgz
tag: ${{ steps.tag.outputs.release_tag }}
draft: ${{ needs.inputs.outputs.draft }}

View File

@@ -0,0 +1,29 @@
# Options for Windows System for Linux v1, aarch64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(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 = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,29 @@
# Options for Windows System for Linux v1, Intel x86_64 processor, X windows, for INIT processing
CC = gcc $(GCC_CFLAGS)
#CC = clang $(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 = -DXWINDOW
# OPTFLAGS is normally -O2, for INIT we want unoptimized in case we need to debug it
OPTFLAGS = -O0 -g
DEBUGFLAGS =
DFLAGS = $(DEBUGFLAGS) $(XFLAGS) -DRELEASE=$(RELEASE) -DNOVERSION -DINIT -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/ldeinit

View File

@@ -0,0 +1,25 @@
# Options for Linux, ARM64 and SDL
CC = gcc $(GCC_CFLAGS)
#CC = clang $(CLANG_CFLAGS)
XFILES = $(OBJECTDIR)sdl.o
#
# For SDL version 2
# -DSDL=2 in SDLFLAGS and -lSDL2 in LDFLAGS
# For SDL version 3
# -DSDL=3 in SDLFLAGS and -lSDL3 in LDFLAGS
#
SDLFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(SDLFLAGS) -DRELEASE=$(RELEASE)
LDFLAGS = -lSDL2 -lm
LDELDFLAGS =
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldesdl

View File

@@ -0,0 +1,27 @@
# Options for Windows System for Linux v1, aarch64 and X-Window
CC = gcc $(GCC_CFLAGS)
#CC = clang $(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 = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex

View File

@@ -1,3 +1,30 @@
# Options for Windows System for Linux v1, Intel x86_64 and SDL
CC = gcc $(GCC_CFLAGS)
#CC = clang $(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 = -DXWINDOW
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -D__wsl1__
LDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
LDELDFLAGS = -L/usr/X11/lib -lX11 -lc -lm
OBJECTDIR = ../$(RELEASENAME)/
default : ../$(OSARCHNAME)/lde ../$(OSARCHNAME)/ldex
# Options for Linux, Intel x86_64 and SDL
CC = gcc -m64 $(GCC_CFLAGS)
@@ -15,7 +42,7 @@ XFLAGS = -DSDL=2
# OPTFLAGS is normally -O2.
OPTFLAGS = -O2 -g3
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE)
DFLAGS = $(XFLAGS) -DRELEASE=$(RELEASE) -D__wsl1__
LDFLAGS = -lm -lSDL2
LDELDFLAGS =

View File

@@ -1,4 +1,4 @@
# Options for Linux, Intel x86_64 and X-Window
# Options for Windows System for Linux v1, Intel x86_64 and X-Window
CC = gcc -m64 $(GCC_CFLAGS)
# CC = clang -m64 $(CLANG_CFLAGS)

View File

@@ -9,9 +9,6 @@ case "$os" in
alpha-dec-osf1) echo osf1 ;;
*-apple-darwin*) echo darwin ;;
*-*-linux*)
echo d"${WSL_DISTRO_NAME}"d
echo i"${WSL_INTEROP}"i
if [ -n "${WSL_DISTRO_NAME}" ] && [ -z "${WSL_INTEROP}" ];
then echo wsl1; else echo linux; fi ;;
*-*-openbsd*) echo openbsd ;;