Improve how to redefine sleep in 2013/birken alt
Now one can just do
make clobber SLEEP=500 alt
or whatever.
This commit is contained in:
1 parent
359354cde8
commit
26edb2a70a
3 files changed
+13
-6
No files matched your search
@@ -57,7 +57,7 @@ ARCH=
|
|||||||
|
|
||||||
# Defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE= -DZ=15000
|
CDEFINE=
|
||||||
|
|
||||||
# Include files that are needed to compile
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
@@ -139,13 +139,18 @@ all: data ${TARGET}
|
|||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||||
|
|
||||||
${PROG}.alt: ${PROG}.alt.c
|
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
#
|
#
|
||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
# Variable to control how to redefine sleep time in alt code
|
||||||
|
#
|
||||||
|
SLEEP= 15000
|
||||||
|
|
||||||
|
${PROG}.alt: ${PROG}.alt.c
|
||||||
|
${CC} ${CFLAGS} -DZ=${SLEEP} $< -o $@ ${LDFLAGS}
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
#
|
#
|
||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ compile time. If you wish to speed it up by 100% you can instead do:
|
|||||||
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
make clobber CDEFINE=-DZ=7500 alt
|
make clobber SLEEP=7500 alt
|
||||||
```
|
```
|
||||||
|
|
||||||
and then try `birken.alt` as above.
|
and then try `birken.alt` as above.
|
||||||
|
|||||||
+4
-2
@@ -3491,11 +3491,13 @@ pairs though that should be obvious) and also some that are correct including
|
|||||||
system("reset");` (via redefining `exit(3)` so that the column ending would be
|
system("reset");` (via redefining `exit(3)` so that the column ending would be
|
||||||
the same) so that as long as it runs to completion the terminal will be sane and
|
the same) so that as long as it runs to completion the terminal will be sane and
|
||||||
the cursor will be visible. Using `atexit(3)` will not work if the program is
|
the cursor will be visible. Using `atexit(3)` will not work if the program is
|
||||||
killed and signals are ugly so this was not done.
|
killed, signals are ugly and these would be messing with the entry too much so
|
||||||
|
these were not done.
|
||||||
|
|
||||||
Cody also added the alt version that lets one control how fast the painting is
|
Cody also added the alt version that lets one control how fast the painting is
|
||||||
done, based on the author's recommendations, except that Cody made it
|
done, based on the author's recommendations, except that Cody made it
|
||||||
configurable at compile time.
|
configurable at compile time. The Makefile was modified in such a way as to make
|
||||||
|
it very easy to redefine them at compile time.
|
||||||
|
|
||||||
Cody also added the [try.sh](/2013/birken/try.sh) script for the entry and the
|
Cody also added the [try.sh](/2013/birken/try.sh) script for the entry and the
|
||||||
[try.alt.sh](/2013/birken/try.alt.sh) script for the alt code.
|
[try.alt.sh](/2013/birken/try.alt.sh) script for the alt code.
|
||||||
|
|||||||
Reference in new issue
Block a user