fix Makefile and README.md for 2012/hamano

This commit is contained in:
Landon Curt Noll committed 2023-03-23 22:42:18 -07:00
1 parent 4e9f76f482
commit 06fc780ce5
2 files changed
+38 -30

No files matched your search

+4 -5
View File
@@ -103,8 +103,8 @@ CINCLUDE=
#CINCLUDE= -include stdlib.h #CINCLUDE= -include stdlib.h
#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} -I ${X11_INCDIR}/X11
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2 #CINCLUDE= `${SDL2_CONFIG} --cflags`
# Optimization # Optimization
# #
@@ -128,7 +128,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 -lSDL2 #LIBS= `${SDL2_CONFIG} --libs`
# C compiler to use # C compiler to use
# #
@@ -142,7 +142,7 @@ ifeq ($(CC),clang)
# #
CSILENCE+= -Wno-comma -Wno-double-promotion -Wno-missing-prototypes \ CSILENCE+= -Wno-comma -Wno-double-promotion -Wno-missing-prototypes \
-Wno-missing-variable-declarations -Wno-poison-system-directories \ -Wno-missing-variable-declarations -Wno-poison-system-directories \
-Wno-shadow -Wno-shorten-64-to-3 -Wno-shadow -Wno-shorten-64-to-32
# #
CWARN+= -Weverything CWARN+= -Weverything
# #
@@ -327,4 +327,3 @@ 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"
+34 -25
View File
@@ -1,34 +1,43 @@
# Most elementary use of C - Silver award # Most elementary use of C - Silver award
Tsukasa Hamano Tsukasa Hamano
<hamano@cuspy.org> <hamano@cuspy.org>
## To build: # To build:
make all ```sh
make
```
### To run: ### To run:
./hamano < textfile > output.pdf ```sh
./hamano < textfile > output.pdf
```
### Try: ### Try:
./hamano < README.md > hint.pdf ```sh
./hamano < README.md > hint.pdf
```
# You can read output.pdf with PDF reader You can read output.pdf with PDF reader acroread hint.pdf or evince hint.pdf.
acroread hint.pdf
# or
evince hint.pdf
# deobfuscate To deobfuscate:
gcc -xc hint.pdf -o hint
./hint
# Of course, You can obfuscate c code ```sh
echo 'void main(){puts("Hello World!");}' | ./hamano > hello.pdf cc -xc hint.pdf -o hint
gcc -xc hello.pdf -o hello2 ./hint
./hello2 | gcc -xc - -o ./hello3 ```
./hello3
Of course, You can also obfuscate c code:
```sh
echo 'void main(){puts("Hello World!");}' | ./hamano > hello.pdf
cc -xc hello.pdf -o hello2
./hello2 | gcc -xc - -o ./hello3
./hello3
```
## Judges' comments ## Judges' comments
@@ -71,20 +80,20 @@ available to compile as C code.
I've been tested with GCC 4.7 and Clang 3.0 on Linux, and following I've been tested with GCC 4.7 and Clang 3.0 on Linux, and following
PDF Reader: PDF Reader:
* Adobe Acrobat Reader * Adobe Acrobat Reader
* Evince * Evince
* Ghostscript * Ghostscript
* Xpdf * Xpdf
### Obfuscations ### Obfuscations
This program is obfuscated by using classical methods. This program is obfuscated by using classical methods.
But can you find out the embedded font from fragmented glyph? But can you find out the embedded font from fragmented glyph?
-------------------------------------------------------------------------------- ## Copyright:
<!--
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved (c) Copyright 1984-2015, [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/
-->