From 0fcd68f250156cc5742e5d07e4e5dda9d9873a26 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Thu, 7 Dec 2023 05:48:10 -0800 Subject: [PATCH] Improve how to redefine sleep time in 1993/plummer Using a Makefile variable one may do make clobber SLEEP=50 alt to change the Z macro to 50 or whatever they want. --- 1993/plummer/Makefile | 6 ++++-- 1993/plummer/README.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/1993/plummer/Makefile b/1993/plummer/Makefile index b1c56da2e..8107ae4e8 100644 --- a/1993/plummer/Makefile +++ b/1993/plummer/Makefile @@ -58,7 +58,7 @@ ARCH= # Defines that are needed to compile # -CDEFINE= -DZ=200 +CDEFINE= -DZ=${SLEEP} # Include files that are needed to compile # @@ -138,8 +138,10 @@ ${PROG}: ${PROG}.c alt: data ${ALT_TARGET} @${TRUE} +# variable to control how long to sleep in alt version +SLEEP= 200 ${PROG}.alt: ${PROG}.alt.c - ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} + ${CC} ${CFLAGS} -DZ=${SLEEP} $< -o $@ ${LDFLAGS} # data files # diff --git a/1993/plummer/README.md b/1993/plummer/README.md index 26de8dda2..7d6288840 100644 --- a/1993/plummer/README.md +++ b/1993/plummer/README.md @@ -44,7 +44,7 @@ make alt If you wish to change the time to sleep (default `200`) you can do so like: ```sh -make clobber CDEFINE="-DZ=50" alt +make clobber SLEEP=50 alt ```