Improve redefining size in 1998/schweikh3
Now one can do
make clobber SIZE=55555 alt
or whatever size they wish.
This commit is contained in:
1 parent
75839e221c
commit
1041382f68
2 files changed
+11
-4
No files matched your search
@@ -55,10 +55,13 @@ CSTD= -std=gnu90
|
|||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
|
# variable for size, primarily for alt code
|
||||||
|
#
|
||||||
|
SIZE=32767
|
||||||
# Defines that are needed to compile
|
# Defines that are needed to compile
|
||||||
#
|
#
|
||||||
CDEFINE= -DM0=sizeof -DM1=long -DM2=void \
|
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
|
# Include files that are needed to compile
|
||||||
#
|
#
|
||||||
@@ -138,6 +141,11 @@ ${PROG}: ${PROG}.c
|
|||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
|
||||||
|
${PROG}.alt: ${PROG}.alt.c
|
||||||
|
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||||
|
${LN} -sf $@ samefile.alt
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
#
|
#
|
||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
|
|||||||
@@ -54,11 +54,10 @@ If you wish to change the size to say, 55555:
|
|||||||
|
|
||||||
|
|
||||||
```sh
|
```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)
|
or whatever you wish to redefine it to.
|
||||||
below.
|
|
||||||
|
|
||||||
|
|
||||||
## Judges' remarks:
|
## Judges' remarks:
|
||||||
|
|||||||
Reference in new issue
Block a user