fix Makefile and README.md for 2020/kurdyukov1
This commit is contained in:
1 parent
dda8062766
commit
c099cbc168
2 files changed
+27
-17
No files matched your search
@@ -102,7 +102,7 @@ CINCLUDE=
|
|||||||
#CINCLUDE= -include stdio.h
|
#CINCLUDE= -include stdio.h
|
||||||
#CINCLUDE= -include stdlib.h -include stdio.h
|
#CINCLUDE= -include stdlib.h -include stdio.h
|
||||||
#CINCLUDE= -I ${X11_INCDIR}
|
#CINCLUDE= -I ${X11_INCDIR}
|
||||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
#CINCLUDE= `${SDL2_CONFIG} --cflags`
|
||||||
|
|
||||||
# Optimization
|
# Optimization
|
||||||
#
|
#
|
||||||
@@ -126,7 +126,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
|||||||
LIBS=
|
LIBS=
|
||||||
#LIBS= -lm
|
#LIBS= -lm
|
||||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
|
#LIBS= `${SDL2_CONFIG} --libs`
|
||||||
|
|
||||||
# C compiler to use
|
# C compiler to use
|
||||||
#
|
#
|
||||||
@@ -138,7 +138,8 @@ CC= cc
|
|||||||
#
|
#
|
||||||
ifeq ($(CC),clang)
|
ifeq ($(CC),clang)
|
||||||
#
|
#
|
||||||
#CSILENCE+=
|
CSILENCE+= -Wno-comma -Wno-poison-system-directories -Wno-shorten-64-to-32 \
|
||||||
|
-Wno-sign-conversion
|
||||||
#
|
#
|
||||||
CWARN+= -Weverything
|
CWARN+= -Weverything
|
||||||
#
|
#
|
||||||
@@ -163,7 +164,7 @@ ENTRY= kurdyukov1
|
|||||||
PROG= prog
|
PROG= prog
|
||||||
#
|
#
|
||||||
OBJ= ${PROG}.o
|
OBJ= ${PROG}.o
|
||||||
DATA= prog.x86.asm prog.x86_64.asm
|
DATA=
|
||||||
TARGET= ${PROG}
|
TARGET= ${PROG}
|
||||||
#
|
#
|
||||||
ALT_OBJ= ${PROG}.alt.o
|
ALT_OBJ= ${PROG}.alt.o
|
||||||
@@ -184,14 +185,14 @@ all: data ${TARGET}
|
|||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
${PROG}.alt: ${PROG}.alt.c
|
|
||||||
${CC} ${CFLAGS} --include stdint.h --include stdio.h $< -o $@ ${LIBS}
|
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
#
|
#
|
||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
${PROG}.alt: ${PROG}.alt.c
|
||||||
|
${CC} ${CFLAGS} --include stdint.h --include stdio.h $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
#
|
#
|
||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
|
|||||||
+19
-10
@@ -1,24 +1,32 @@
|
|||||||
# Best utility
|
# Best utility
|
||||||
|
|
||||||
|
```
|
||||||
Ilya Kurdyukov
|
Ilya Kurdyukov
|
||||||
<https://github.com/ilyakurdyukov>
|
<https://github.com/ilyakurdyukov>
|
||||||
Twitter: @ilyakurdyukov
|
Twitter: @ilyakurdyukov
|
||||||
|
```
|
||||||
|
|
||||||
## Judges' comments:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
### To use:
|
### To run:
|
||||||
|
|
||||||
./prog
|
```sh
|
||||||
|
./prog
|
||||||
|
```
|
||||||
|
|
||||||
### Try:
|
### Try:
|
||||||
|
|
||||||
echo IOCCC | ./prog
|
```sh
|
||||||
|
echo IOCCC | ./prog
|
||||||
|
|
||||||
./prog < prog.x86.asm
|
./prog < prog.x86.asm
|
||||||
|
|
||||||
./prog < prog.x86_64.asm
|
./prog < prog.x86_64.asm
|
||||||
|
```
|
||||||
|
|
||||||
### Alternate code
|
### Alternate code
|
||||||
|
|
||||||
@@ -26,7 +34,9 @@ An even smaller alternate version of this entry, prog.alt.c, is provided. This
|
|||||||
|
|
||||||
To compile this alternate version:
|
To compile this alternate version:
|
||||||
|
|
||||||
make alt
|
```sh
|
||||||
|
make alt
|
||||||
|
```
|
||||||
|
|
||||||
Use `prog.alt` as you would `prog` above.
|
Use `prog.alt` as you would `prog` above.
|
||||||
|
|
||||||
@@ -70,11 +80,10 @@ Added a macro hack to make stdin work in binary mode under Windows (tested under
|
|||||||
|
|
||||||
- `prog.x86.asm` and for x86, although the headers are smaller, but the binary code is larger due to fewer registers and lack of 64-bit multiply.
|
- `prog.x86.asm` and for x86, although the headers are smaller, but the binary code is larger due to fewer registers and lack of 64-bit multiply.
|
||||||
|
|
||||||
|
## Copyright:
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------
|
|
||||||
(c) Copyright 1984-2020, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
(c) Copyright 1984-2020, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||||
|
|
||||||
[judges]: http://www.ioccc.org/judges.html
|
[judges]: http://www.ioccc.org/judges.html
|
||||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
-----------------------------------------------------------------------------------------------------
|
|
||||||
Reference in new issue
Block a user