fix .gitignore, Makefile and README.md for 2012/endoh2
This commit is contained in:
1 parent
bafd5886e1
commit
ea9e4ce570
4 files changed
+588
-241
No files matched your search
+245
-78
@@ -1,43 +1,52 @@
|
|||||||
#!/usr/bin/env make
|
#!/usr/bin/env make
|
||||||
#
|
#
|
||||||
# 2012 makefile
|
# 2012 Makefile
|
||||||
|
|
||||||
|
################################################################################
|
||||||
#
|
#
|
||||||
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
|
# Regarding individual entries:
|
||||||
# is licensed under:
|
#
|
||||||
|
# IOCCC winning entry code may not work on your system. Even with standards,
|
||||||
|
# conditions and build environments change, especially when it comes to more
|
||||||
|
# extreme code such you might find in an IOCCC winner. Moreover, what was
|
||||||
|
# allowed and liked in one IOCCC contest may no longer be liked/allowed in
|
||||||
|
# later IOCCC years.
|
||||||
|
#
|
||||||
|
# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
|
||||||
|
#
|
||||||
|
# GitHub pull requests are welcome:
|
||||||
|
#
|
||||||
|
# If you have a patch that might make running an entry work in modern Unix-like
|
||||||
|
# environments, please create a GitHub pull request for the IOCCC judges to
|
||||||
|
# consider.
|
||||||
|
#
|
||||||
|
# Suggestions and corrections regarding Makefiles, winning author information,
|
||||||
|
# fixing typos in remarks, and code patches are welcome via opening a GitHub
|
||||||
|
# issue or better yet, by creating a GitHub pull request for the IOCCC judges
|
||||||
|
# to consider. To form a GitHub issue or GitHub pull, please visit:
|
||||||
|
#
|
||||||
|
# https://github.com/ioccc-src/winner
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
|
||||||
#
|
#
|
||||||
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||||
#
|
#
|
||||||
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
|
|
||||||
|
|
||||||
################
|
#############################
|
||||||
# tool locations
|
# shell used by this Makefile
|
||||||
################
|
#############################
|
||||||
#
|
#
|
||||||
SHELL= /bin/bash
|
SHELL= bash
|
||||||
CP= cp
|
|
||||||
CPP= cpp
|
|
||||||
GUNZIP= gunzip
|
|
||||||
LD= ld
|
|
||||||
MAKE= make
|
|
||||||
RM= rm
|
|
||||||
SED= sed
|
|
||||||
TAR= tar
|
|
||||||
TRUE= true
|
|
||||||
|
|
||||||
# Set X11_LIBDIR to the directory where the X11 library resides
|
#######################
|
||||||
|
# common tool locations
|
||||||
|
#######################
|
||||||
#
|
#
|
||||||
X11_LIBDIR= /usr/X11R6/lib
|
include ../var.mk
|
||||||
|
|
||||||
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
|
||||||
#
|
|
||||||
X11_INCDIR= /usr/X11R6/include
|
|
||||||
|
|
||||||
# ANSI compiler
|
|
||||||
#
|
|
||||||
# Set CC to the name of your ANSI compiler.
|
|
||||||
#
|
|
||||||
CC= cc
|
|
||||||
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
@@ -47,55 +56,122 @@ CC= cc
|
|||||||
WINNERS= blakely deckmyn dlowe endoh1 endoh2 grothe hamano \
|
WINNERS= blakely deckmyn dlowe endoh1 endoh2 grothe hamano \
|
||||||
hou kang konno omoikane tromp vik zeitak
|
hou kang konno omoikane tromp vik zeitak
|
||||||
|
|
||||||
|
YEAR= 2012
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# build all entries
|
# build all entries
|
||||||
###################
|
###################
|
||||||
#
|
#
|
||||||
all:
|
all:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
@for i in ${WINNERS} ; do \
|
@for i in ${WINNERS} ; do \
|
||||||
echo "(cd $$i && $(MAKE) ENTRY=$$i X11_LIBDIR=${X11_LIBDIR} X11_INCDIR=${X11_INCDIR} $@)"; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
(cd $$i && $(MAKE) "ENTRY=$$i" "X11_LIBDIR=${X11_LIBDIR}" "X11_INCDIR=${X11_INCDIR}" $@); \
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
done
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
.PHONY: all alt data everything clean clobber install \
|
||||||
|
love haste waste maker easter_egg sandwich \
|
||||||
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
#
|
#
|
||||||
alt:
|
alt:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
@for i in ${WINNERS} ; do \
|
@for i in ${WINNERS} ; do \
|
||||||
echo "(cd $$i && $(MAKE) ENTRY=$$i X11_LIBDIR=${X11_LIBDIR} X11_INCDIR=${X11_INCDIR} $@)"; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
(cd $$i && $(MAKE) "ENTRY=$$i" "X11_LIBDIR=${X11_LIBDIR}" "X11_INCDIR=${X11_INCDIR}" $@); \
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
done
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
# data files
|
||||||
|
#
|
||||||
|
data:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
# both all and alt
|
||||||
|
#
|
||||||
|
everything:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# utility rules
|
# utility rules
|
||||||
###############
|
###############
|
||||||
#
|
#
|
||||||
everything: all alt
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
@for i in ${WINNERS} ; do \
|
@for i in ${WINNERS} ; do \
|
||||||
echo "(cd $$i && $(MAKE) ENTRY=$$i $@)"; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
(cd $$i && $(MAKE) "ENTRY=$$i" $@); \
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
done
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
clobber: clean
|
clobber:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
@for i in ${WINNERS} ; do \
|
@for i in ${WINNERS} ; do \
|
||||||
echo "(cd $$i && $(MAKE) ENTRY=$$i $@)"; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
(cd $$i && $(MAKE) "ENTRY=$$i" $@); \
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
done
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
nuke: clobber
|
echo; \
|
||||||
@for i in ${WINNERS} ; do \
|
|
||||||
echo "(cd $$i && $(MAKE) ENTRY=$$i $@)"; \
|
|
||||||
(cd $$i && $(MAKE) "ENTRY=$$i" $@); \
|
|
||||||
done
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
@for i in ${WINNERS} ; do \
|
@for i in ${WINNERS} ; do \
|
||||||
echo "(cd $$i && $(MAKE) ENTRY=$$i $@)"; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
(cd $$i && $(MAKE) "ENTRY=$$i" $@); \
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
done
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
indent.c:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
@@ -103,45 +179,136 @@ install:
|
|||||||
##################
|
##################
|
||||||
#
|
#
|
||||||
love:
|
love:
|
||||||
@echo 'not war?'
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
haste:
|
haste:
|
||||||
$(MAKE) waste
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
waste:
|
waste:
|
||||||
@echo 'waste'
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
maker:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
easter_egg:
|
easter_egg:
|
||||||
@echo you expected to mis-understand this $${RANDOM} magic
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
@echo chongo '<was here>' "/\\oo/\\"
|
@echo
|
||||||
@echo Readers shall be disallowed from not being unable to partly misunderstand this partocular final echo.
|
@for i in ${WINNERS} ; do \
|
||||||
@${TRUE}
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
# These rules are written in the sytle of "I Am the Walrus"
|
sandwich:
|
||||||
# and in particular John Lennon's take on deep analysis of art. :-)
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
|
||||||
|
# The IOCCC resident astronomer states
|
||||||
#
|
#
|
||||||
# See also the sub-directory Makefiles for non-propaganda.
|
supernova:
|
||||||
#
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
supernova: nuke
|
@echo
|
||||||
@-if [ -r .code_anal ]; then \
|
@for i in ${WINNERS} ; do \
|
||||||
${RM} -f .code_anal_v3; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
else \
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
echo "You are not expected to understand this"; \
|
(cd $$i && $(MAKE) $@); \
|
||||||
fi
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
@${TRUE}
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
deep_magic:
|
deep_magic:
|
||||||
@-if [ -r .code_anal ]; then \
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
ccode_analysis --deep_magic 1c2c85c7a02c55d1add91967eca491d53c101dc1 --FNV1a_hash 256-bit -R ."; \
|
@echo
|
||||||
else \
|
@for i in ${WINNERS} ; do \
|
||||||
echo "Understand different"; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
fi
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
@${TRUE}
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
magic: deep_magic
|
magic:
|
||||||
@-if [ -r .code_anal ]; then \
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
ccode_analysis --mode 391581 --level 216193 --FNV1a_hash 256-bit -R ."; \
|
@echo
|
||||||
else \
|
@for i in ${WINNERS} ; do \
|
||||||
echo "These aren't the droids you're looking for Mr. Spock!"; \
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
fi
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
@${TRUE}
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
charon:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
|
|
||||||
|
pluto:
|
||||||
|
@echo '=-=-= ${YEAR} begin make $@ =-=-='
|
||||||
|
@echo
|
||||||
|
@for i in ${WINNERS} ; do \
|
||||||
|
echo "=-= start ${YEAR}/$$i =-="; \
|
||||||
|
echo "(cd $$i && $(MAKE) $@)"; \
|
||||||
|
(cd $$i && $(MAKE) $@); \
|
||||||
|
echo "=-= end ${YEAR}/$$i =-="; \
|
||||||
|
echo; \
|
||||||
|
done
|
||||||
|
@echo '=-=-= ${YEAR} complete make $@ =-=-='
|
||||||
@@ -1 +1,41 @@
|
|||||||
|
271
|
||||||
|
271.c
|
||||||
|
2718
|
||||||
|
2718.c
|
||||||
|
27182
|
||||||
|
27182.c
|
||||||
|
271828
|
||||||
|
271828.c
|
||||||
|
2718281
|
||||||
|
2718281.c
|
||||||
|
27182818
|
||||||
|
27182818.c
|
||||||
|
271828182
|
||||||
|
271828182.c
|
||||||
|
2718281828
|
||||||
|
2718281828.c
|
||||||
|
27182818284
|
||||||
|
27182818284.c
|
||||||
|
314
|
||||||
|
314.c
|
||||||
|
3141
|
||||||
|
3141.c
|
||||||
|
31415
|
||||||
|
31415.c
|
||||||
|
314159
|
||||||
|
314159.c
|
||||||
|
3141592
|
||||||
|
3141592.c
|
||||||
|
31415926
|
||||||
|
31415926.c
|
||||||
|
314159265
|
||||||
|
314159265.c
|
||||||
|
3141592653
|
||||||
|
3141592653.c
|
||||||
|
31415926535
|
||||||
|
31415926535.c
|
||||||
|
e
|
||||||
|
e.c
|
||||||
endoh2
|
endoh2
|
||||||
|
pi
|
||||||
|
pi.c
|
||||||
+256
-120
@@ -1,96 +1,159 @@
|
|||||||
#!/usr/bin/env make
|
#!/usr/bin/env make
|
||||||
#
|
#
|
||||||
# 2012 makefile
|
# IOCCC 2012 winning entry - endoh2
|
||||||
|
|
||||||
|
################################################################################
|
||||||
#
|
#
|
||||||
# This work by Landon Curt Noll, Simon Cooper, and Leonid A. Broukhis
|
# Regarding individual entries:
|
||||||
# is licensed under:
|
#
|
||||||
|
# IOCCC winning entry code may not work on your system. Even with standards,
|
||||||
|
# conditions and build environments change, especially when it comes to more
|
||||||
|
# extreme code such you might find in an IOCCC winner. Moreover, what was
|
||||||
|
# allowed and liked in one IOCCC contest may no longer be liked/allowed in
|
||||||
|
# later IOCCC years.
|
||||||
|
#
|
||||||
|
# Corrections on winning author and fixing typos in remarks are VERY WELCOME.
|
||||||
|
#
|
||||||
|
# GitHub pull requests are welcome:
|
||||||
|
#
|
||||||
|
# If you have a patch that might make running an entry work in modern Unix-like
|
||||||
|
# environments, please create a GitHub pull request for the IOCCC judges to
|
||||||
|
# consider.
|
||||||
|
#
|
||||||
|
# Suggestions and corrections regarding Makefiles, winning author information,
|
||||||
|
# fixing typos in remarks, and code patches are welcome via opening a GitHub
|
||||||
|
# issue or better yet, by creating a GitHub pull request for the IOCCC judges
|
||||||
|
# to consider. To form a GitHub issue or GitHub pull, please visit:
|
||||||
|
#
|
||||||
|
# https://github.com/ioccc-src/winner
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
|
||||||
#
|
#
|
||||||
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
|
||||||
#
|
#
|
||||||
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
# See: http://creativecommons.org/licenses/by-sa/3.0/
|
||||||
|
|
||||||
|
|
||||||
################
|
#############################
|
||||||
# tool locations
|
# shell used by this Makefile
|
||||||
################
|
#############################
|
||||||
#
|
#
|
||||||
SHELL= bash
|
SHELL= bash
|
||||||
CP= cp
|
|
||||||
CPP= cpp
|
#######################
|
||||||
GUNZIP= gunzip
|
# common tool locations
|
||||||
LD= ld
|
#######################
|
||||||
MAKE= make
|
#
|
||||||
RM= rm
|
include ../../var.mk
|
||||||
SED= sed
|
|
||||||
TAR= tar
|
|
||||||
TRUE= true
|
|
||||||
|
|
||||||
# Set X11_LIBDIR to the directory where the X11 library resides
|
# Set X11_LIBDIR to the directory where the X11 library resides
|
||||||
#
|
#
|
||||||
X11_LIBDIR= /usr/X11R6/lib
|
#X11_LIBDIR= /usr/X11R6/lib
|
||||||
|
#X11_LIBDIR= /usr/X11/lib
|
||||||
|
X11_LIBDIR= /opt/X11/lib
|
||||||
|
|
||||||
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
# Set X11_INCLUDEDIR to the directory where the X11 include files reside
|
||||||
#
|
#
|
||||||
X11_INCDIR= /usr/X11R6/include
|
#X11_INCDIR= /usr/X11R6/include
|
||||||
|
#X11_INCDIR= /usr/X11/include
|
||||||
|
X11_INCDIR= /opt/X11/include
|
||||||
|
|
||||||
# Compiler warnings
|
# Common C compiler warnings to silence
|
||||||
#
|
#
|
||||||
#CWARN=
|
#CSILENCE=
|
||||||
#CWARN= -Wall -W
|
CSILENCE= -Wno-parentheses -Wno-empty-body
|
||||||
CWARN= -Wall -W -pedantic
|
|
||||||
|
|
||||||
# compiler standard
|
# Common C compiler warning flags
|
||||||
|
#
|
||||||
|
#CWARN= ${CSILENCE}
|
||||||
|
#CWARN= -Wall ${CSILENCE}
|
||||||
|
#CWARN= -Wall -Wextra ${CSILENCE}
|
||||||
|
CWARN= -Wall -Wextra -pedantic ${CSILENCE}
|
||||||
|
|
||||||
|
# Compiler standard
|
||||||
#
|
#
|
||||||
#CSTD=
|
#CSTD=
|
||||||
#CSTD= -ansi
|
#CSTD= -ansi
|
||||||
CSTD= -std=c99
|
CSTD= -std=gnu11
|
||||||
|
|
||||||
# compiler bit architecture
|
# Compiler bit architecture
|
||||||
#
|
#
|
||||||
# Some entries require 32-bitness:
|
# Some entries require 32-bitness:
|
||||||
# ARCH= -m32
|
# ARCH= -m32
|
||||||
#
|
#
|
||||||
# Some entries require 64-bitess:
|
# Some entries require 64-bitness:
|
||||||
# ARCH= -m64
|
# ARCH= -m64
|
||||||
#
|
#
|
||||||
# By default we assume nothing:
|
# By default we assume nothing:
|
||||||
#
|
#
|
||||||
ARCH=
|
ARCH=
|
||||||
|
|
||||||
# optimization
|
# Defines that are needed to compile
|
||||||
|
#
|
||||||
|
CDEFINE=
|
||||||
|
#CDEFINE= -DIOCCC
|
||||||
|
|
||||||
|
# Include files that are needed to compile
|
||||||
|
#
|
||||||
|
CINCLUDE=
|
||||||
|
#CINCLUDE= -include stdlib.h
|
||||||
|
#CINCLUDE= -include stdio.h
|
||||||
|
#CINCLUDE= -include stdlib.h -include stdio.h
|
||||||
|
#CINCLUDE= -I ${X11_INCDIR} -I ${X11_INCDIR}/X11
|
||||||
|
#CINCLUDE= `${SDL2_CONFIG} --cflags`
|
||||||
|
|
||||||
|
# Optimization
|
||||||
#
|
#
|
||||||
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
# Most compiles will safely use -O2. Some can use only -O1 or -O.
|
||||||
# A few compilers have broken optimizers or this entry make break
|
# A few compilers have broken optimizers or this entry make break
|
||||||
# under those buggy optimizers and thus you may not want anything.
|
# under those buggy optimizers and thus you may not want anything.
|
||||||
|
# Reasonable compilers will allow for -O3.
|
||||||
#
|
#
|
||||||
#OPT=
|
#OPT=
|
||||||
#OPT= -O
|
#OPT= -O
|
||||||
#OPT= -O1
|
#OPT= -O1
|
||||||
OPT= -O2
|
#OPT= -O2
|
||||||
#OPT= -O3
|
OPT= -O3
|
||||||
|
|
||||||
|
# Default flags for ANSI C compilation
|
||||||
|
#
|
||||||
|
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||||
|
|
||||||
# Libraries needed to build
|
# Libraries needed to build
|
||||||
#
|
#
|
||||||
LIBS=
|
LIBS=
|
||||||
|
#LIBS= -lm
|
||||||
|
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||||
|
#LIBS= `${SDL2_CONFIG} --libs`
|
||||||
|
|
||||||
# default flags for ANSI C compilation
|
# C compiler to use
|
||||||
#
|
|
||||||
CFLAGS= ${CWARN} ${CSTD} ${ARCH} ${OPT} ${LIBS}
|
|
||||||
|
|
||||||
# ANSI compiler
|
|
||||||
#
|
|
||||||
# Set CC to the name of your ANSI compiler.
|
|
||||||
#
|
|
||||||
# Some entries seem to need gcc. If you have gcc, set
|
|
||||||
# both CC and MAY_NEED_GCC to gcc.
|
|
||||||
#
|
|
||||||
# If you do not have gcc, set CC to the name of your ANSI compiler, and
|
|
||||||
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
|
|
||||||
# to disable such programs.
|
|
||||||
#
|
#
|
||||||
CC= cc
|
CC= cc
|
||||||
#CC=clang
|
#CC=clang
|
||||||
MAY_NEED_GCC= gcc
|
#CC=gcc
|
||||||
|
|
||||||
|
# Compiler add-ons or replacements for clang only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),clang)
|
||||||
|
#
|
||||||
|
CSILENCE+= -Wno-comma -Wno-format-nonliteral -Wno-missing-variable-declarations \
|
||||||
|
-Wno-poison-system-directories
|
||||||
|
#
|
||||||
|
CWARN+= -Weverything
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Specific add-ons or replacements for gcc only
|
||||||
|
#
|
||||||
|
ifeq ($(CC),gcc)
|
||||||
|
#
|
||||||
|
#CSILENCE+=
|
||||||
|
#
|
||||||
|
#CWARN+=
|
||||||
|
#
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
@@ -98,172 +161,193 @@ MAY_NEED_GCC= gcc
|
|||||||
##############################
|
##############################
|
||||||
#
|
#
|
||||||
ENTRY= endoh2
|
ENTRY= endoh2
|
||||||
DATA=
|
PROG= ${ENTRY}
|
||||||
|
#
|
||||||
|
OBJ= ${PROG}.o
|
||||||
|
DATA= find-font-table.rb
|
||||||
|
TARGET= ${PROG}
|
||||||
|
#
|
||||||
|
ALT_OBJ= pi.o 314.o 3141.o 31415.o 314159.o 3141592.o \
|
||||||
|
31415926.o 314159265.o 3141592653.o 31415926535.o \
|
||||||
|
e.o 271.o 2718.o 27182.o 271828.o 2718281.o \
|
||||||
|
27182818.o 271828182.o 2718281828.o 27182818284.o
|
||||||
|
ALT_TARGET= pi 314 3141 31415 314159 \
|
||||||
|
3141592 31415926 314159265 3141592653 31415926535 \
|
||||||
|
e 271 2718 27182 271828 \
|
||||||
|
2718281 27182818 271828182 2718281828 27182818284
|
||||||
|
|
||||||
ALT_C= pi.c 314.c 3141.c 31415.c 314159.c 3141592.c \
|
ALT_C= pi.c 314.c 3141.c 31415.c 314159.c 3141592.c \
|
||||||
31415926.c 314159265.c 3141592653.c 31415926535.c \
|
31415926.c 314159265.c 3141592653.c 31415926535.c \
|
||||||
e.c 271.c 2718.c 27182.c 271828.c 2718281.c \
|
e.c 271.c 2718.c 27182.c 271828.c 2718281.c \
|
||||||
27182818.c 271828182.c 2718281828.c 27182818284.c
|
27182818.c 271828182.c 2718281828.c 27182818284.c
|
||||||
|
|
||||||
ALT_ENTRY= pi 314 3141 31415 314159 \
|
|
||||||
3141592 31415926 314159265 3141592653 31415926535 \
|
|
||||||
e 271 2718 27182 271828 \
|
|
||||||
2718281 27182818 271828182 2718281828 27182818284
|
|
||||||
|
|
||||||
ALT_OBJ= pi.o 314.o 3141.o 31415.o 314159.o 3141592.o \
|
|
||||||
31415926.o 314159265.o 3141592653.o 31415926535.o \
|
|
||||||
e.o 271.o 2718.o 27182.o 271828.o 2718281.o \
|
|
||||||
27182818.o 271828182.o 2718281828.o 27182818284.o
|
|
||||||
|
|
||||||
ALT_ENTRY= pi 314 3141 31415 314159 3141592 \
|
|
||||||
31415926 314159265 3141592653 31415926535 \
|
|
||||||
e 271 2718 27182 271828 2718281 \
|
|
||||||
27182818 271828182 2718281828 27182818284
|
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# build the entry
|
# build the entry
|
||||||
#################
|
#################
|
||||||
#
|
#
|
||||||
all: ${ENTRY} ${DATA}
|
all: data ${TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
${ENTRY}: ${ENTRY}.c
|
.PHONY: all alt data everything clean clobber install \
|
||||||
${CC} ${CFLAGS} $< -o $@
|
love haste waste maker easter_egg sandwich \
|
||||||
|
supernova deep_magic magic charon pluto
|
||||||
|
|
||||||
pi.c: ${ENTRY}
|
${PROG}: ${PROG}.c
|
||||||
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
|
pi.c: ${PROG}
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
pi: pi.c
|
pi: pi.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
314.c: pi
|
314.c: pi
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
314: 314.c
|
314: 314.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
3141.c: 314
|
3141.c: 314
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
3141: 3141.c
|
3141: 3141.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
31415.c: 3141
|
31415.c: 3141
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
31415: 31415.c
|
31415: 31415.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
314159.c: 31415
|
314159.c: 31415
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
314159: 314159.c
|
314159: 314159.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
3141592.c: 314159
|
3141592.c: 314159
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
3141592: 3141592.c
|
3141592: 3141592.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
31415926.c: 3141592
|
31415926.c: 3141592
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
31415926: 31415926.c
|
31415926: 31415926.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
314159265.c: 31415926
|
314159265.c: 31415926
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
314159265: 314159265.c
|
314159265: 314159265.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
3141592653.c: 314159265
|
3141592653.c: 314159265
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
3141592653: 3141592653.c
|
3141592653: 3141592653.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
31415926535.c: 3141592653
|
31415926535.c: 3141592653
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
31415926535: 31415926535.c
|
31415926535: 31415926535.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# you get the transcendental idea ... :-)
|
# you get the transcendental idea ... :-)
|
||||||
|
|
||||||
e.c: ${ENTRY}
|
e.c: ${PROG}
|
||||||
|
${RM} -f $@
|
||||||
./$< e > $@
|
./$< e > $@
|
||||||
|
|
||||||
e: e.c
|
e: e.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
271.c: e
|
271.c: e
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
271: 271.c
|
271: 271.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
2718.c: 271
|
2718.c: 271
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
2718: 2718.c
|
2718: 2718.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
27182.c: 2718
|
27182.c: 2718
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
27182: 27182.c
|
27182: 27182.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
271828.c: 27182
|
271828.c: 27182
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
271828: 271828.c
|
271828: 271828.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
2718281.c: 271828
|
2718281.c: 271828
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
2718281: 2718281.c
|
2718281: 2718281.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
27182818.c: 2718281
|
27182818.c: 2718281
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
27182818: 27182818.c
|
27182818: 27182818.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
271828182.c: 27182818
|
271828182.c: 27182818
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
271828182: 271828182.c
|
271828182: 271828182.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
2718281828.c: 271828182
|
2718281828.c: 271828182
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
2718281828: 2718281828.c
|
2718281828: 2718281828.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
27182818284.c: 2718281828
|
27182818284.c: 2718281828
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
27182818284: 27182818284.c
|
27182818284: 27182818284.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
271828182845.c: 27182818284
|
271828182845.c: 27182818284
|
||||||
|
${RM} -f $@
|
||||||
./$< > $@
|
./$< > $@
|
||||||
|
|
||||||
271828182845: 271828182845.c
|
271828182845: 271828182845.c
|
||||||
${CC} ${CFLAGS} $< -o $@
|
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||||
|
|
||||||
# etc. ... :-)
|
|
||||||
|
|
||||||
# alternative executable
|
# alternative executable
|
||||||
#
|
#
|
||||||
alt: ${ALT_ENTRY}
|
alt: data ${ALT_TARGET}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
# data files
|
# data files
|
||||||
@@ -271,33 +355,52 @@ alt: ${ALT_ENTRY}
|
|||||||
data: ${DATA}
|
data: ${DATA}
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
# both all and alt
|
||||||
|
#
|
||||||
|
everything: all alt
|
||||||
|
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# utility rules
|
# utility rules
|
||||||
###############
|
###############
|
||||||
#
|
#
|
||||||
everything: all alt
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
${RM} -f ${ENTRY}.o ${ALT_OBJ}
|
${RM} -f ${OBJ} ${ALT_OBJ}
|
||||||
|
@-if [ -f indent.c ]; then \
|
||||||
|
echo ${RM} -f indent.c; \
|
||||||
|
${RM} -f indent.c; \
|
||||||
|
fi
|
||||||
|
|
||||||
clobber: clean
|
clobber: clean
|
||||||
${RM} -f ${ENTRY} ${ALT_ENTRY} ${ALT_C}
|
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||||
|
${RM} -f ${ALT_C}
|
||||||
nuke: clobber
|
@-if [ -e sandwich ]; then \
|
||||||
@${TRUE}
|
${RM} -f sandwich; \
|
||||||
|
echo 'ate sandwich'; \
|
||||||
dist_clean: nuke
|
fi
|
||||||
@${TRUE}
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
@echo "Surely you're joking Mr. Feynman!"
|
@echo "Dr. Spock says that is not logical!"
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
# backwards compatibility
|
# you may be able to misunderstand the source by reading indent.c
|
||||||
#
|
#
|
||||||
build: all
|
indent.c: ${PROG}.c
|
||||||
@${TRUE}
|
@if which "${GINDENT}" >/dev/null 2>&1; then \
|
||||||
|
echo ${RM} -f $@; \
|
||||||
|
${RM} -f $@; \
|
||||||
|
echo "${GINDENT} < $< > $@"; \
|
||||||
|
${GINDENT} < $< > $@; \
|
||||||
|
elif which "${INDENT}" >/dev/null 2>&1; then \
|
||||||
|
echo ${RM} -f $@; \
|
||||||
|
${RM} -f $@; \
|
||||||
|
echo "${INDENT} < $< > $@"; \
|
||||||
|
${INDENT} < $< > $@; \
|
||||||
|
else \
|
||||||
|
echo "no intent tool found, ident $< yourself, sorry"; \
|
||||||
|
echo "exit 1"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
##################
|
##################
|
||||||
@@ -313,39 +416,72 @@ haste:
|
|||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
waste:
|
waste:
|
||||||
@echo 'waste'
|
@echo 'haste'
|
||||||
|
@${TRUE}
|
||||||
|
|
||||||
|
maker:
|
||||||
|
@echo 'Participate in a maker faire'
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
easter_egg:
|
easter_egg:
|
||||||
@echo you expected to mis-understand this $${RANDOM} magic
|
@echo "you expected to often misunderstand this $${RANDOM} magic"
|
||||||
@echo chongo '<was here>' "/\\oo/\\"
|
@echo "chongo '<was here>' /\\oo/\\"
|
||||||
@echo Readers shall be disallowed from not being unable to partly misunderstand this partocular final echo.
|
@echo "Eggy"
|
||||||
|
|
||||||
# Understand the history of "I Am the Walrus" and
|
sandwich: easter_egg
|
||||||
# and in particular John Lennon's remarks on that
|
@if [ `id -u` -eq 0 ]; then \
|
||||||
# song and you might be confused about these next
|
echo 'Okay.'; \
|
||||||
# rules in a different way. :-)
|
echo "$${RANDOM}`date +%s`$${RANDOM}" > $@; \
|
||||||
#
|
|
||||||
supernova: nuke
|
|
||||||
@-if [ -r .code_anal ]; then \
|
|
||||||
${RM} -f .code_anal_v3; \
|
|
||||||
else \
|
else \
|
||||||
echo "You are not expected to understand this"; \
|
echo 'What? Make it yourself.'; \
|
||||||
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Understand the history of the Homebrew Computer Club
|
||||||
|
# as well as the West Coast Computer Faire and
|
||||||
|
# you might be confused different. :-)
|
||||||
|
#
|
||||||
|
supernova: sandwich
|
||||||
|
@-if [ -r .code_anal ]; then \
|
||||||
|
${RM} -f .code_anal_v6; \
|
||||||
|
else \
|
||||||
|
echo "planet deniers, like some members of the IAU, are so cute when they try to defend their logic"; \
|
||||||
|
fi
|
||||||
|
@echo "A $@ helps ${MAKE} the elements that help form planets"
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
deep_magic:
|
deep_magic: supernova
|
||||||
@-if [ -r .code_anal ]; then \
|
@-if [ -r .code_anal ]; then \
|
||||||
ccode_analysis --deep_magic 1c2c85c7a02c55d1add91967eca491d53c101dc1 --FNV1a_hash 256-bit "${ENTRY}"; \
|
ccode_analysis --deep_magic 7889066cdbdf09b0408021754586e895be641cc9be29e7eafd3ca65359541f17 \
|
||||||
|
--FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
|
||||||
else \
|
else \
|
||||||
echo "Understand different"; \
|
echo "Wrong! Do it again!"; \
|
||||||
|
sleep 2; \
|
||||||
|
echo "Wrong! Do it again!"; \
|
||||||
|
sleep 2; \
|
||||||
|
echo "Wrong! Do it again!"; \
|
||||||
fi
|
fi
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
magic: deep_magic
|
magic: deep_magic
|
||||||
@-if [ -r .code_anal ]; then \
|
@-if [ -r .code_anal ]; then \
|
||||||
ccode_analysis --mode 21701 --level 23209 --FNV1a_hash 256-bit "${ENTRY}"; \
|
ccode_analysis --level 20003 --mode 5717175 --FNV1a_hash_512_bit -v2 "${PROG}" "${PROG}.c"; \
|
||||||
else \
|
else \
|
||||||
echo "These aren't the droids you're looking for Mr. Spock!"; \
|
echo "If you don't eat yer meat, you can't have any pudding!"; \
|
||||||
|
echo "How can you have any pudding if you don't eat yer meat?!"; \
|
||||||
fi
|
fi
|
||||||
@${TRUE}
|
@${TRUE}
|
||||||
|
|
||||||
|
# The IOCCC resident astronomer states
|
||||||
|
#
|
||||||
|
charon: magic
|
||||||
|
@echo "$@ is a dwarf planet"
|
||||||
|
@echo "dwarf is a type of planet"
|
||||||
|
@echo "therefore IAU, $@ is a planet"
|
||||||
|
|
||||||
|
pluto: charon
|
||||||
|
${MAKE} charon
|
||||||
|
@echo "$@ is a dwarf planet"
|
||||||
|
@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"
|
||||||
+47
-43
@@ -1,48 +1,53 @@
|
|||||||
# PiE in the sky award
|
# PiE in the sky award
|
||||||
|
|
||||||
Yusuke Endoh
|
Yusuke Endoh
|
||||||
<mame@ruby-lang.org>
|
<mame@ruby-lang.org>
|
||||||
<https://github.com/mame/>
|
<https://github.com/mame/>
|
||||||
|
|
||||||
|
# To build:
|
||||||
|
|
||||||
## Judges' comments:
|
```sh
|
||||||
### To build:
|
make
|
||||||
|
```
|
||||||
make endoh2
|
|
||||||
|
|
||||||
### To run:
|
### To run:
|
||||||
|
|
||||||
./endoh2 > pi.c
|
```sh
|
||||||
gcc -o pi pi.c
|
./endoh2 > pi.c
|
||||||
./pi > 314.c
|
gcc -o pi pi.c
|
||||||
...
|
./pi > 314.c
|
||||||
|
```
|
||||||
|
|
||||||
./endoh2 e > e.c
|
and:
|
||||||
gcc -o e e.c
|
|
||||||
./e > 271.c
|
```sh
|
||||||
...
|
./endoh2 e > e.c
|
||||||
|
gcc -o e e.c
|
||||||
|
./e > 271.c
|
||||||
|
```
|
||||||
|
|
||||||
### Try:
|
### Try:
|
||||||
|
|
||||||
make pi
|
```sh
|
||||||
make e
|
make pi
|
||||||
make everything
|
make e
|
||||||
|
make everything
|
||||||
|
```
|
||||||
|
|
||||||
### Selected Judges Remarks:
|
## Judges' comments:
|
||||||
|
|
||||||
A pi/e printing quasi-quine in ASCII art with a compressed font in it;
|
A pi/e printing quasi-quine in ASCII art with a compressed font in it;
|
||||||
what else to wish for in this program? Virtual machine emulation?
|
what else to wish for in this program? Virtual machine emulation?
|
||||||
|
|
||||||
## Author's comments:
|
## Author's comments:
|
||||||
|
|
||||||
Yeah, "Again". Sorry. But I don't feel guilty or uncomfortable.
|
Yeah, "Again". Sorry. But I don't feel guilty or uncomfortable.
|
||||||
|
|
||||||
This entry is based on 'over-used themes' such as self reproducing
|
This entry is based on 'over-used themes' such as self reproducing
|
||||||
program and pi or e computation. I know you're tired of them.
|
program and pi or e computation. I know you're tired of them.
|
||||||
|
|
||||||
|
|
||||||
But have you ever seen **all-in-one**?
|
But have you ever seen **all-in-one**?
|
||||||
|
|
||||||
|
|
||||||
### What it is
|
### What it is
|
||||||
|
|
||||||
This program generates a new program in the shape of the Greek letter
|
This program generates a new program in the shape of the Greek letter
|
||||||
@@ -92,7 +97,6 @@ of ASCII-art with comment padded.
|
|||||||
These design requirements made my program well-obfuscated
|
These design requirements made my program well-obfuscated
|
||||||
willy-nilly.
|
willy-nilly.
|
||||||
|
|
||||||
|
|
||||||
### Portability
|
### Portability
|
||||||
|
|
||||||
I expect it to work in any major environment and C compiler.
|
I expect it to work in any major environment and C compiler.
|
||||||
@@ -107,41 +111,41 @@ function. In fact, recent compilers with "-std=c99 -Wall -W
|
|||||||
I've tested with gcc-4.6.3 and clang-3.0 on Linux (Ubuntu 12.04)
|
I've tested with gcc-4.6.3 and clang-3.0 on Linux (Ubuntu 12.04)
|
||||||
and gcc-4.5.3 and clang-3.1 on Cygwin.
|
and gcc-4.5.3 and clang-3.1 on Cygwin.
|
||||||
|
|
||||||
|
|
||||||
### Synopsis
|
### Synopsis
|
||||||
|
|
||||||
gcc endoh2.c -o endoh2
|
```sh
|
||||||
|
cc endoh2.c -o endoh2
|
||||||
|
|
||||||
./endoh2 > pi.c
|
./endoh2 > pi.c
|
||||||
cat pi.c
|
cat pi.c
|
||||||
|
|
||||||
gcc pi.c -o pi ; ./pi > 314.c ; cat 314.c
|
cc pi.c -o pi ; ./pi > 314.c ; cat 314.c
|
||||||
gcc 314.c -o 314 ; ./314 > 3141.c ; cat 3141.c
|
cc 314.c -o 314 ; ./314 > 3141.c ; cat 3141.c
|
||||||
gcc 3141.c -o 3141 ; ./3141 > 31415.c ; cat 31415.c
|
cc 3141.c -o 3141 ; ./3141 > 31415.c ; cat 31415.c
|
||||||
gcc 31415.c -o 31415 ; ./31415 > 314159.c ; cat 314159.c
|
cc 31415.c -o 31415 ; ./31415 > 314159.c ; cat 314159.c
|
||||||
gcc 314159.c -o 314159 ; ./314159 > 3141592.c ; cat 3141592.c
|
cc 314159.c -o 314159 ; ./314159 > 3141592.c ; cat 3141592.c
|
||||||
etc...
|
etc...
|
||||||
|
|
||||||
./endoh2 e > e.c
|
./endoh2 e > e.c
|
||||||
cat e.c
|
cat e.c
|
||||||
|
|
||||||
gcc e.c -o e ; ./e > 271.c ; cat 271.c
|
cc e.c -o e ; ./e > 271.c ; cat 271.c
|
||||||
gcc 271.c -o 271 ; ./271 > 2718.c ; cat 2718.c
|
cc 271.c -o 271 ; ./271 > 2718.c ; cat 2718.c
|
||||||
gcc 2718.c -o 2718 ; ./2718 > 27182.c ; cat 27182.c
|
cc 2718.c -o 2718 ; ./2718 > 27182.c ; cat 27182.c
|
||||||
gcc 27182.c -o 27182 ; ./27182 > 271828.c ; cat 271828.c
|
cc 27182.c -o 27182 ; ./27182 > 271828.c ; cat 271828.c
|
||||||
gcc 271828.c -o 271828 ; ./271828 > 2718281.c ; cat 2718281.c
|
cc 271828.c -o 271828 ; ./271828 > 2718281.c ; cat 2718281.c
|
||||||
etc...
|
etc...
|
||||||
|
```
|
||||||
|
|
||||||
You can do `make everything` for the process (with no `cat`).
|
You can do `make everything` for the process (with no `cat`).
|
||||||
|
|
||||||
Note: The executable may return a failure (non-zero) exit status
|
Note: The executable may return a failure (non-zero) exit status
|
||||||
unless -std=c99 option is given.
|
unless -std=c99 option is given.
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
## 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/
|
||||||
-->
|
|
||||||
Reference in new issue
Block a user