diff --git a/1998/schweikh3/Makefile b/1998/schweikh3/Makefile index d7e2f2bab..fefa31df9 100644 --- a/1998/schweikh3/Makefile +++ b/1998/schweikh3/Makefile @@ -55,10 +55,13 @@ CSTD= -std=gnu90 # ARCH= +# variable for size, primarily for alt code +# +SIZE=32767 # Defines that are needed to compile # CDEFINE= -DM0=sizeof -DM1=long -DM2=void \ - -DM3=realloc -DM4=calloc -DM5=free -DSZ=32767 + -DM3=realloc -DM4=calloc -DM5=free -DSZ=${SIZE} # Include files that are needed to compile # @@ -138,6 +141,11 @@ ${PROG}: ${PROG}.c alt: data ${ALT_TARGET} @${TRUE} + +${PROG}.alt: ${PROG}.alt.c + ${CC} ${CFLAGS} $< -o $@ ${LDFLAGS} + ${LN} -sf $@ samefile.alt + # data files # data: ${DATA} diff --git a/1998/schweikh3/README.md b/1998/schweikh3/README.md index aac682d00..190aca9ab 100644 --- a/1998/schweikh3/README.md +++ b/1998/schweikh3/README.md @@ -54,11 +54,10 @@ If you wish to change the size to say, 55555: ```sh -make clobber CDEFINE="-DSZ=55555" alt +make clobber SIZE=55555 alt ``` -or whatever you wish to redefine it to. See [alternate code](#alternate-code) -below. +or whatever you wish to redefine it to. ## Judges' remarks: