From edfa4762ce2a3d158588cc4706898f87add0cb93 Mon Sep 17 00:00:00 2001 From: Jan Burgy Date: Mon, 16 Jun 2025 12:28:07 -0400 Subject: [PATCH 1/2] Add include directive --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 77d90d1..e39c630 100644 --- a/Makefile +++ b/Makefile @@ -2,13 +2,14 @@ #BUILD_ID_NONE := -Wl,--build-id=none BUILD_ID_NONE := +INCLUDE := /usr/i686-linux-gnu/include SHELL := /bin/bash all: jonesforth -jonesforth: jonesforth.S - gcc -m32 -nostdlib -static $(BUILD_ID_NONE) -o $@ $< +jonesforth: jonesforth.S $(INCLUDE) + gcc -m32 -nostdlib -static $(BUILD_ID_NONE) $(INCLUDE:%=-I %) -o $@ $< run: cat jonesforth.f $(PROG) - | ./jonesforth From 9414f270cd69c15ec7eb1ee67bed2f1cc9d3d7ca Mon Sep 17 00:00:00 2001 From: Jan Burgy Date: Mon, 29 Sep 2025 10:31:23 -0400 Subject: [PATCH 2/2] Cleaner fix --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index e39c630..807f00a 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,18 @@ #BUILD_ID_NONE := -Wl,--build-id=none BUILD_ID_NONE := -INCLUDE := /usr/i686-linux-gnu/include SHELL := /bin/bash -all: jonesforth +all: multilib jonesforth -jonesforth: jonesforth.S $(INCLUDE) - gcc -m32 -nostdlib -static $(BUILD_ID_NONE) $(INCLUDE:%=-I %) -o $@ $< +multilib: + @echo "Installing build dependencies..." + sudo apt-get update + sudo apt-get install -y gcc-multilib + +jonesforth: jonesforth.S + gcc -m32 -nostdlib -static $(BUILD_ID_NONE) -o $@ $< run: cat jonesforth.f $(PROG) - | ./jonesforth