From a764fdeb2fb7142ea4fe3e2724e5fb2a263f679c Mon Sep 17 00:00:00 2001 From: girst Date: Mon, 21 Jan 2019 17:21:04 +0100 Subject: [PATCH] make Makefile portable apparently, the "prerequisite name != target rule name" only works in GNU make. symlinking sol.c to spider.c and changing the makefile works. --- Makefile | 2 +- README.md | 7 +++++-- spider.c | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) create mode 120000 spider.c diff --git a/Makefile b/Makefile index 2e2122a..2a7925c 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ all: sol spider sol: sol.c sol.h schemes.h $(CC) $(CFLAGS) -DKLONDIKE $< -o $@ -spider: sol.c sol.h schemes.h +spider: spider.c sol.h schemes.h $(CC) $(CFLAGS) -DSPIDER $< -o $@ clean: diff --git a/README.md b/README.md index 242889e..57474e5 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,6 @@ play klondike and spider solitaire in your unicode terminal. ## TODO ### P1 - * TODO: make portable (clang on FreeBSD) - makefile's `$<` refuses to work if prequisite name != target name ### P2 * TODO: suggest moves (`h` => hint) * TODO: escape sequences (for real cursor keys) @@ -65,6 +63,11 @@ play klondike and spider solitaire in your unicode terminal. as good as it's going to get, since we can't just not draw cards at all * DONE: 'join to here' command (should take longest chain available) * DONE: expose deal() seed for restarting the game + * DONE: make portable (clang on FreeBSD) + makefile's `$<` refuses to work if prequisite name != target name + Fix: + ln -s sol.c. spider.c + sed -i 's/^spider: sol.c/spider: spider.c/' Makefile ## Notes diff --git a/spider.c b/spider.c new file mode 120000 index 0000000..a476b14 --- /dev/null +++ b/spider.c @@ -0,0 +1 @@ +sol.c \ No newline at end of file -- 2.39.3