Simplify how to redefine macros in 2014/birken

Now one can do

    make clobber PORT=31337 TIME=50000 alt

or whatever.
This commit is contained in:
Cody Boone Ferguson committed 2023-12-12 05:09:50 -08:00
1 parent 03ba78f2d1
commit 359354cde8
3 files changed
+13 -4

No files matched your search

+8
View File
@@ -139,6 +139,14 @@ ${PROG}: ${PROG}.c
alt: data ${ALT_TARGET}
@${TRUE}
# Variables to control port and timing constant in alt code
#
PORT= 1701
TIME= 500000
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} -DNCC=${PORT} -DSTARDATE=${TIME} $< -o $@ ${LDFLAGS}
# data files
#
data: ${DATA}
+3 -3
View File
@@ -56,13 +56,13 @@ described by the author. See [configuration](#configuration) below.
To specify the port to say, 31337, try:
```sh
make clobber CDEFINE="-DNCC=31337" alt
make clobber PORT=31337 alt
```
To change the `STARDATE` timing constant, try:
To change the timing constant, `STARDATE`, try:
```sh
make clobber CDEFINE="-DSTARDATE=5000000" alt
make clobber TIME=5000000 alt
```
You can combine them both of course.
+2 -1
View File
@@ -3677,7 +3677,8 @@ code](/2014/birken/README.md#alternate-code) that lets one redefine the port to
bind to in case there is a firewall issue or there is some other reason to not
have the default port. Remember that ports < 1024 are privileged. It also lets
you redefine the timing constant `STARDATE` (see the author's remarks for more
details).
details on this macro). The Makefile was made to use variables so it's easier to
redefine the port and timing constant.
## <a name="2014_deak"></a>[2014/deak](/2014/deak/prog.c) ([README.md](/2014/deak/README.md))