diff --git a/2001/kev/Makefile b/2001/kev/Makefile index 4449ffbc6..ff6d6e312 100644 --- a/2001/kev/Makefile +++ b/2001/kev/Makefile @@ -57,9 +57,15 @@ CSTD= -std=gnu99 # ARCH= +# variables for the macros for easier redefining +# +PORT= 5455 +SPEED= 100 +L= "socket(il.sin_family=AF_INET,SOCK_STREAM,0)" + # Defines that are needed to compile # -CDEFINE= -DPORT=5455 -DSPEED=100 -Dl_="socket(il.sin_family=AF_INET,SOCK_STREAM,0)" +CDEFINE= -DPORT=${PORT} -DSPEED=${SPEED} -Dl_=${L} # Include files that are needed to compile # diff --git a/2001/kev/README.md b/2001/kev/README.md index 98580b79f..de2ab8b34 100644 --- a/2001/kev/README.md +++ b/2001/kev/README.md @@ -42,23 +42,24 @@ If you need to change the speed you can reconfigure it like (say for over a network and not the same host): ```sh -make clobber CDEFINE="-DSPEED=50" all # original default value which is very fast +make clobber SPEED=50 all # original default value which is very fast ``` If you wish to change the port you can do so like: ```sh -make clobber CDEFINE="-DPORT=3773" all +make clobber PORT=3773 all ``` Of course if you want a port < 1024 you'll need to be root so don't do that. And if you know what you're doing you can redefine the call to the `socket(2)` -syscall with the `l_` macro. Of course you can do more than one at the same -time. For instance to change the speed and port: +syscall with the `l_` macro, changing the `L` variable like one would `PORT`. Of +course you can do more than one at the same time. For instance to change the +speed and port: ```sh -make clobber CDEFINE="-DSPEED=512 -DPORT=3773" all +make clobber SPEED=512 PORT=3773 all ``` If you have `xterm` try on one system: