From 06cc9aeb17ab22cdc7a5744db4e23125f1f7fbdf Mon Sep 17 00:00:00 2001
From: Ben Avison <bavison@riscosopen.org>
Date: Wed, 7 Oct 2020 20:55:14 +0100
Subject: [PATCH] Rewrite makefile to use shared makefiles

Also strip dependencies in `!MkClean` now that we create some, and set up
`.gitignore` appropriately.

Requires RiscOS/BuildSys!32
---
 !MkClean,fd7 |  1 +
 .gitignore   |  5 +++++
 Makefile     | 47 ++---------------------------------------------
 3 files changed, 8 insertions(+), 45 deletions(-)
 create mode 100644 .gitignore

diff --git a/!MkClean,fd7 b/!MkClean,fd7
index 5627679..aa5e15c 100644
--- a/!MkClean,fd7
+++ b/!MkClean,fd7
@@ -14,3 +14,4 @@
 |
 Dir <Obey$Dir>
 amu_machine clean
+stripdepnd
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cb77461
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+/Squish,ffb
+/crunched/
+/Makefile.d
+/o/
+/objs/
diff --git a/Makefile b/Makefile
index b55eed0..38097fd 100644
--- a/Makefile
+++ b/Makefile
@@ -13,52 +13,9 @@
 # limitations under the License.
 #
 # Makefile for Squish
-#
-
-#
-# Program specific options:
-#
-COMPONENT  = Squish
-MSGVERSION = ${AWK} -f Build:AwkVers
-
-include StdTools
-
-SQFLAGS = -nolist
-
-FILES  =\
- squished.${COMPONENT}
-
-#
-# Generic build rules:
-#
-all: ${FILES}
-	@${ECHO} ${COMPONENT}: all build complete
-
-install: ${FILES}
-	 ${CP} squished.${COMPONENT} ${INSTDIR}.${COMPONENT} ${CPFLAGS}
-	 @${ECHO} ${COMPONENT}: installed
-
-clean:
-	${XWIPE} squished ${WFLAGS}
-	${XWIPE} crunched ${WFLAGS}
-	${XWIPE} n ${WFLAGS}
-	@${ECHO} ${COMPONENT}: cleaned
-
-#
-# Static dependencies:
-#
-	             
-squished.${COMPONENT}: crunched.${COMPONENT} bas.Keep
-	${MKDIR} squished
-	${SQUISH} ${SQFLAGS} -keep bas.Keep -from crunched.${COMPONENT} -to $@
 
-crunched.${COMPONENT}: n.${COMPONENT}
-	${MKDIR} crunched
-	crunch.${COMPONENT}; BASIC
+COMPONENT ?= Squish
 
-n.${COMPONENT}: bas.${COMPONENT}
-	${MKDIR} n
-	${NUMBER} bas.${COMPONENT} $@
+include BasicApp
 
-#---------------------------------------------------------------------------
 # Dynamic dependencies:
-- 
GitLab