fix Makefile, README.md and .gitignore for 2020/kurdyukov3
This commit is contained in:
1 parent
93a1ca052f
commit
39354fac88
3 files changed
+42
-28
No files matched your search
@@ -1 +1,3 @@
|
|||||||
prog
|
prog
|
||||||
|
prog.alt
|
||||||
|
prog.extra
|
||||||
+16
-11
@@ -62,8 +62,8 @@ X11_INCDIR= /opt/X11/include
|
|||||||
|
|
||||||
# Common C compiler warnings to silence
|
# Common C compiler warnings to silence
|
||||||
#
|
#
|
||||||
#CSILENCE=
|
CSILENCE=
|
||||||
CSILENCE= -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-unknown-warning-option
|
#CSILENCE= -Wno-implicit-int
|
||||||
|
|
||||||
# Common C compiler warning flags
|
# Common C compiler warning flags
|
||||||
#
|
#
|
||||||
@@ -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+= -Wno-comma -Wno-conditional-uninitialized -Wno-poison-system-directories
|
CSILENCE+= -Wno-comma -Wno-conditional-uninitialized -Wno-poison-system-directories \
|
||||||
|
-Wno-shorten-64-to-32 -Wno-sign-conversion
|
||||||
#
|
#
|
||||||
CWARN+= -Weverything
|
CWARN+= -Weverything
|
||||||
#
|
#
|
||||||
@@ -163,11 +164,11 @@ ENTRY= kurdyukov3
|
|||||||
PROG= prog
|
PROG= prog
|
||||||
#
|
#
|
||||||
OBJ= ${PROG}.o
|
OBJ= ${PROG}.o
|
||||||
DATA=
|
DATA= input.txt
|
||||||
TARGET= ${PROG}
|
TARGET= ${PROG}
|
||||||
#
|
#
|
||||||
ALT_OBJ= ${PROG}.alt.o
|
ALT_OBJ= ${PROG}.alt.o ${PROG}.extra.o
|
||||||
ALT_TARGET= ${PROG}.alt
|
ALT_TARGET= ${PROG}.alt ${PROG}.extra
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
@@ -184,14 +185,17 @@ all: data ${TARGET}
|
|||||||
${PROG}: ${PROG}.c
|
${PROG}: ${PROG}.c
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
${PROG}.alt: ${PROG}.alt.c
|
|
||||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
#
|
#
|
||||||
alt: data ${ALT_TARGET}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
${PROG}.alt: ${PROG}.alt.c
|
||||||
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
|
${PROG}.extra: ${PROG}.extra.c
|
||||||
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
#
|
#
|
||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
@@ -326,3 +330,4 @@ pluto: charon
|
|||||||
@echo "dwarf is a type of planet"
|
@echo "dwarf is a type of planet"
|
||||||
@echo "therefore, $@ is a planet"
|
@echo "therefore, $@ is a planet"
|
||||||
@echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them"
|
@echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them"
|
||||||
|
|
||||||
+24
-17
@@ -1,32 +1,35 @@
|
|||||||
# Bset slaml prragom
|
# Bset slaml prragom
|
||||||
|
|
||||||
|
```
|
||||||
Ilya Kurdyukov
|
Ilya Kurdyukov
|
||||||
<https://github.com/ilyakurdyukov>
|
<https://github.com/ilyakurdyukov>
|
||||||
Twitter: @ilyakurdyukov
|
Twitter: @ilyakurdyukov
|
||||||
|
```
|
||||||
|
|
||||||
The code for this entry can be found in prog.c
|
|
||||||
|
|
||||||
## Judges' comments:
|
|
||||||
|
|
||||||
## To build:
|
## To build:
|
||||||
|
|
||||||
make all
|
```sh
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
### To use:
|
### To run:
|
||||||
|
|
||||||
./prog
|
```sh
|
||||||
|
./prog
|
||||||
|
```
|
||||||
|
|
||||||
### Try:
|
### Try:
|
||||||
|
|
||||||
# first input to try
|
```sh
|
||||||
echo first input to try | ./prog
|
# first input to try
|
||||||
|
echo first input to try | ./prog
|
||||||
|
|
||||||
# try reading this output
|
# try reading this output
|
||||||
echo International Obfuscated C Code Contest | ./prog
|
echo International Obfuscated C Code Contest | ./prog
|
||||||
|
|
||||||
# try reading this other output
|
# try reading this other output
|
||||||
./prog < input.txt
|
./prog < input.txt
|
||||||
|
```
|
||||||
|
|
||||||
### Alternate code
|
### Alternate code
|
||||||
|
|
||||||
@@ -34,7 +37,9 @@ There is an alternate version of this code in `prog.alt.c` where the main code i
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
@@ -50,14 +55,16 @@ is it a pnuch crad)?
|
|||||||
|
|
||||||
Compile and try this:
|
Compile and try this:
|
||||||
|
|
||||||
|
```sh
|
||||||
cat input.txt | ./prog
|
cat input.txt | ./prog
|
||||||
|
```
|
||||||
|
|
||||||
The program can work with letters that are not represented in English, as long as these letters are encoded in the higher part of the single-byte character set (use `iconv` to convert from UTF-8 and back).
|
The program can work with letters that are not represented in English, as long as these letters are encoded in the higher part of the single-byte character set (use `iconv` to convert from UTF-8 and back).
|
||||||
|
|
||||||
-----------------------------------------------------------------------------------------------------
|
## 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