From 6344fd55846ae707016acccc546767b70a555c5f Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Fri, 19 Jan 2024 05:48:26 -0800 Subject: [PATCH] Update 1996/schweikh3/Makefile for SunOS Rather than make anyone manually update the Makefile (the command in the README.md file suggested that one would use Makefile variables) or type a more complicated command the Makefile now tries to compile the entry as suggested if compilation fails. Thus one can type 'make all' and if compilation fails it will try the SunOS way. --- 1996/schweikh3/Makefile | 3 ++- 1996/schweikh3/README.md | 8 -------- thanks-for-help.md | 7 +++++++ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/1996/schweikh3/Makefile b/1996/schweikh3/Makefile index 9fcc955dd..0a1facb23 100644 --- a/1996/schweikh3/Makefile +++ b/1996/schweikh3/Makefile @@ -129,7 +129,8 @@ all: data ${TARGET} sandwich supernova deep_magic magic charon pluto ${PROG}: ${PROG}.c - ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} + ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} || \ + ${CC} ${CFLAGS} -I. '-Ddifftime(a,b)=(double)(b-a)' $< -o $@ ${LDFLAGS} # alternative executable # diff --git a/1996/schweikh3/README.md b/1996/schweikh3/README.md index 3e39ab8bd..b5e2c63ff 100644 --- a/1996/schweikh3/README.md +++ b/1996/schweikh3/README.md @@ -33,14 +33,6 @@ But still it is a useful utility. To use try: and thanks for the virtual memories! :-) -NOTE: On some systems such as SunOS, one may need to compile with: - -```make - ${CC} ${CFLAGS} \ - -I. -D_POSIX_SOURCE '-Ddifftime(a,b)=(double)(b-a)' \ - schweikh3.c -o schweikh3 -``` - ## Author's remarks: diff --git a/thanks-for-help.md b/thanks-for-help.md index 522020397..f9844e76b 100644 --- a/thanks-for-help.md +++ b/thanks-for-help.md @@ -2192,6 +2192,13 @@ suggested that one try the longer version too but it will run in an infinite loop so having it in a script is less desired). +## [1996/schweikh3](/1996/schweikh3/schweikh3.c) ([README.md](/1996/schweikh3/README.md])) + +[Cody](#cody) updated the Makefile so that if it fails to compile it will try he +method suggested for SunOS rather than having to update the Makefile manually or +running a more complicated command: now one can just run `make`. + + ## [1996/westley](/1996/westley/westley.c) ([README.md](/1996/westley/README.md])) [Cody](#cody) fixed a segfault in this entry as well as it displaying environmental