From aa0aac798319a12f164c87fb5b14aa766a11ed83 Mon Sep 17 00:00:00 2001 From: Dan Jones Date: Wed, 12 Jan 2022 08:40:51 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Improve=20Makefiles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 4 ++-- lib/Makefile | 24 ++++++++++++++++-------- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 791c39d..9f90261 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,8 @@ remontel.ulx: remontel.inf includes/*.inf lib/Parser.h lib/VerbLib.h lib/Grammar remontel.z5: remontel.inf includes/*.inf lib/Parser.h lib/VerbLib.h lib/Grammar.h inform +include_path=includes,lib $< -lib/Parser.h lib/VerbLib.h lib/Grammar.h: - $(MAKE) -C lib Parser.h +lib/%.h: + $(MAKE) -C '$(@D)' '$(@F)' script.pdf: script.fountain screenplain $< $@ diff --git a/lib/Makefile b/lib/Makefile index ca62c1b..fa6e32a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -1,15 +1,23 @@ .PHONY: default -default: Parser.h +default: Parser.h Grammar.h VerbLib.h -parser.h grammar.h verblib.h: +parser.h grammar.h verblib.h version.h english.h: wget https://ifarchive.org/if-archive/infocom/compilers/inform6/library/inform6lib-6.12.5.zip unzip -u -j inform6lib-6.12.5.zip rm -v inform6lib-6.12.5.zip -Parser.h Grammar.h VerbLib.h: parser.h grammar.h verblib.h - ln -s parser.h Parser.h - ln -s grammar.h Grammar.h - ln -s verblib.h VerbLib.h - ln -s english.h English.h - ln -s version.h Version.h +Parser.h: parser.h Version.h + ln -s $< $@ + +Grammar.h: grammar.h English.h + ln -s $< $@ + +VerbLib.h: verblib.h + ln -s $< $@ + +Version.h: version.h + ln -s $< $@ + +English.h: english.h + ln -s $< $@