fix Makefile, README.md and .gitignore for 2020/kurdyukov3

This commit is contained in:
Landon Curt Noll committed 2023-03-11 00:06:43 -08:00
1 parent 93a1ca052f
commit 39354fac88
3 files changed
+42 -28

No files matched your search

+2
View File
@@ -1 +1,3 @@
prog
prog.alt
prog.extra
+16 -11
View File
@@ -62,8 +62,8 @@ X11_INCDIR= /opt/X11/include
# Common C compiler warnings to silence
#
#CSILENCE=
CSILENCE= -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-unknown-warning-option
CSILENCE=
#CSILENCE= -Wno-implicit-int
# Common C compiler warning flags
#
@@ -102,7 +102,7 @@ CINCLUDE=
#CINCLUDE= -include stdio.h
#CINCLUDE= -include stdlib.h -include stdio.h
#CINCLUDE= -I ${X11_INCDIR}
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
#CINCLUDE= `${SDL2_CONFIG} --cflags`
# Optimization
#
@@ -126,7 +126,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
LIBS=
#LIBS= -lm
#LIBS= -L ${X11_LIBDIR} -lX11
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL
#LIBS= `${SDL2_CONFIG} --libs`
# C compiler to use
#
@@ -138,7 +138,8 @@ CC= cc
#
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
#
@@ -163,11 +164,11 @@ ENTRY= kurdyukov3
PROG= prog
#
OBJ= ${PROG}.o
DATA=
DATA= input.txt
TARGET= ${PROG}
#
ALT_OBJ= ${PROG}.alt.o
ALT_TARGET= ${PROG}.alt
ALT_OBJ= ${PROG}.alt.o ${PROG}.extra.o
ALT_TARGET= ${PROG}.alt ${PROG}.extra
#################
@@ -184,14 +185,17 @@ all: data ${TARGET}
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# alternative executable
#
alt: data ${ALT_TARGET}
@${TRUE}
${PROG}.alt: ${PROG}.alt.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
${PROG}.extra: ${PROG}.extra.c
${CC} ${CFLAGS} $< -o $@ ${LIBS}
# data files
#
data: ${DATA}
@@ -326,3 +330,4 @@ pluto: charon
@echo "dwarf is a type of planet"
@echo "therefore, $@ is a planet"
@echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them"
+24 -17
View File
@@ -1,32 +1,35 @@
# Bset slaml prragom
```
Ilya Kurdyukov
<https://github.com/ilyakurdyukov>
Twitter: @ilyakurdyukov
The code for this entry can be found in prog.c
## Judges' comments:
```
## To build:
make all
```sh
make
```
### To use:
### To run:
./prog
```sh
./prog
```
### Try:
# first input to try
echo first input to try | ./prog
```sh
# first input to try
echo first input to try | ./prog
# try reading this output
echo International Obfuscated C Code Contest | ./prog
# try reading this output
echo International Obfuscated C Code Contest | ./prog
# try reading this other output
./prog < input.txt
# try reading this other output
./prog < input.txt
```
### 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:
make alt
```sh
make alt
```
Use `prog.alt` as you would `prog` above.
@@ -50,14 +55,16 @@ is it a pnuch crad)?
Compile and try this:
```sh
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).
-----------------------------------------------------------------------------------------------------
## Copyright:
(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].
[judges]: http://www.ioccc.org/judges.html
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
-----------------------------------------------------------------------------------------------------