Update 1998-2004 top level Makefiles

This commit is contained in:
Landon Curt Noll committed 2022-09-19 00:39:54 -07:00
1 parent 29cbd71186
commit c7ce2a79cb
13 files changed
+3853 -1863

No files matched your search

+311 -80
View File
@@ -1,87 +1,318 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1988 makefile # 1988 Makefile
################################################################################
# #
# Copyright (c) 1988, Landon Curt Noll & Larry Bassel. # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from Landon Curt Noll and Larry Bassel.
SHELL=/bin/sh
CFLAGS=-O
CC=cc
CPP=/lib/cpp
# you may need a version of cpp that is faster and/or allows more symbols
# than the standard cpp. If so, adjust the BIG_CPP below.
# #
# If you have the GNU cpp, you should use it below as it is MUCH faster # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# than the standard cpp and does not have problems with memory usage. # year directory was reworked so that entries are in separate directories.
# However you should note that the non-ANSI nature of defining symbols # This also applies to any orig.ansi.mk and orig.common.mk files.
# that start with '#' prevents GNU cpp from doing the initial pass.
# Thus you should not use the GNU cpp for the ${CPP} symbol.
BIG_CPP=${CPP}
WINNERS=dale phillipps robison westley reddy isaak \
litmaath spinellis zsmall
all: ${WINNERS}
dale: dale.c
${CC} ${CFLAGS} $? -o $@
phillipps: phillipps.c
${CC} ${CFLAGS} $? -o $@
robison: robison.c
${CC} ${CFLAGS} $? -o $@
westley: westley.c
${CC} ${CFLAGS} $? -o $@
reddy: reddy.c
${CC} ${CFLAGS} $? -o $@
isaak: isaak.c
${CC} ${CFLAGS} -DI=B -DO=- -Dy $? -o $@
litmaath: litmaath.c
${CC} ${CFLAGS} $? -o $@
spinellis: spinellis.c spinellis.data
@echo This program can not be portably compiled with a makefile
@echo because it reads from /dev/tty.
@echo Compile this program with: cc spinellis.c -o spinellis
@echo and type the following text followed by an EOF '(^D)'.
@cat spinellis.data
@-if [ ! -f spinellis ]; then \
touch spinellis; \
fi
# not an official entry
# #
# The 'zsmall.c' program was obtained from 'applin.c' by reducing its recursion # Several Makefiles were modified / formed in 2022, and as such it may have
# and running it thru the initial /lib/cpp. That is, 'zsmall.c' is a small # elements that are not historically compatible with way entries were built.
# version of the 'z.c' file as produced by the 'applin' make rule below. # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
zsmall: zsmall.c #
@echo this reduced version of applin.c can take some time to compile... # Regarding individual entries:
${CC} ${CFLAGS} zsmall.c -o $@ #
# 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 judgess 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 entry took 75 minutes to compile on a Amdahl 5980-300E # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
# (a 55658 Dhyrstone/sec/cpu machine) using the System V cpp. #
# (The GNU cpp when defined as BIG_CPP took only 45 seconds) # Creative Commons Attribution-ShareAlike 3.0 Unported License.
# Your cpp may not be able to compile it due to a common bug #
# that results in ${CPP} running out of space. The routine # See: http://creativecommons.org/licenses/by-sa/3.0/
# 'zsmall' is a smaller version of the applin.c entry.
applin: applin.c
${CPP} '-DM=#include "z.c"' '-DR=#include' '-DF=#if' \
'-DI=#ifdef' '-DL=#else' '-DE=#endif' '-DN=#ifndef' \
'-DD=#define' '-DU=#undef' applin.c z.c
@echo this is going to take a very very long time to C-preprocess
@echo perhaps you should do: make zsmall instead
${BIG_CPP} z.c > large.c
@echo now for the real compile...
${CC} ${CFLAGS} large.c -o $@
################
# tool locations
################
#
SHELL= /bin/bash
MAKE= make
###############
# IOCCC winners
###############
#
WINNERS= applin dale isaak litmaath phillipps reddy robison spinellis westley
YEAR= 1988
###################
# build all entries
###################
#
all:
@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 $@ =-=-='
.PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# alternative executable
#
alt:
@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 $@ =-=-='
# 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
###############
#
clean: clean:
rm -f core *.o @echo '=-=-= ${YEAR} begin make $@ =-=-='
clobber: clean @echo
rm -f ${WINNERS} applin @for i in ${WINNERS} ; do \
nuke: clobber echo "=-= start ${YEAR}/$$i =-="; \
rm -f large.c z.c echo "(cd $$i && $(MAKE) $@)"; \
install: all (cd $$i && $(MAKE) $@); \
cat ${WINNERS} > /dev/null echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
clobber:
@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 $@ =-=-='
install:
@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 $@ =-=-='
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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+303 -75
View File
@@ -1,90 +1,318 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1989 makefile # 1988 Makefile
################################################################################
# #
# Copyright (c) 1989, Landon Curt Noll & Larry Bassel. # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit #
# use is granted provided this this copyright and notice are included in its # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# entirety and remains unaltered. All other uses must receive prior permission # year directory was reworked so that entries are in separate directories.
# from Landon Curt Noll and Larry Bassel. # This also applies to any orig.ansi.mk and orig.common.mk files.
#
# Several Makefiles were modified / formed in 2022, and as such it may have
# elements that are not historically compatible with way entries were built.
# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
#
# Regarding individual entries:
#
# 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 judgess 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.
#
# See: http://creativecommons.org/licenses/by-sa/3.0/
SHELL=/bin/sh ################
CFLAGS=-O # tool locations
CC=cc ################
#
SHELL= /bin/bash
MAKE= make
WINNERS=ovdluhe jar.1 jar.2 fubar westley paul robison roemer vanb tromp.bsd
ALTERNATE=jar.1.orig fubar.orig tromp.s5
all: ${WINNERS} ###############
# IOCCC winners
###############
#
WINNERS= fubar jar.1 jar.2 ovdluhe paul robison roemer tromp vanb westley
ovdluhe: ovdluhe.c YEAR= 1989
${CC} ${CFLAGS} $? -o $@
# NOTE: jar.1.c outputs its string in one section ###################
# this program may not print well on some terminals # build all entries
jar.1: jar.1.c jar.1.sh ###################
rm -f jar.1 #
cp jar.1.sh jar.1 all:
chmod +x jar.1 @echo '=-=-= ${YEAR} begin make $@ =-=-='
# NOTE: The jar.1.orig file is the original entry @echo
jar.1.orig: jar.1.orig.c jar.1.orig.sh @for i in ${WINNERS} ; do \
rm -f jar.1.orig echo "=-= start ${YEAR}/$$i =-="; \
cp jar.1.sh jar.1.orig echo "(cd $$i && $(MAKE) $@)"; \
chmod +x jar.1.orig (cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
jar.2: jar.2.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
# NOTE: fubar.c uses the /bin/sh shell # alternative executable
fubar: fubar.c fubar.sh #
rm -f fubar alt:
cp fubar.sh fubar @echo '=-=-= ${YEAR} begin make $@ =-=-='
chmod +x fubar @echo
# NOTE: The fubar.orig.c file is the original entry @for i in ${WINNERS} ; do \
fubar.orig: fubar.orig.c fubar.orig.sh echo "=-= start ${YEAR}/$$i =-="; \
rm -f fubar.orig echo "(cd $$i && $(MAKE) $@)"; \
cp fubar.orig.sh fubar.orig (cd $$i && $(MAKE) $@); \
chmod +x fubar.orig echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
westley: westley.c # data files
${CC} ${CFLAGS} -Dtrgpune=putchar $? -o $@ #
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 $@ =-=-='
paul: paul.c # both all and alt
${CC} ${CFLAGS} $? -o $@ #
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 $@ =-=-='
robison: robison.c
${CC} ${CFLAGS} $? -o $@
roemer: roemer.c
${CC} ${CFLAGS} $? -o $@
# NOTE: this version requires BSD style signals and setitimer
# this may not work well on low baud rate terminals
# the file tromp.bsd.c is the original version
tromp: tromp.bsd.c
${CC} ${CFLAGS} $? -o $@
touch HI
-chmod 0666 HI
# NOTE: sites without BSD style signals and setitimer (e.g. System V.3)
# should use this version
tromp.s5: tromp.s5.c
${CC} ${CFLAGS} $? -o $@
touch HI
-chmod 0666 HI
vanb: vanb.c
${CC} ${CFLAGS} $? -o $@
###############
# utility rules
###############
#
clean: clean:
rm -f ovdluhe.o jar.2.o fubar.o westley.o paul.o robison.o @echo '=-=-= ${YEAR} begin make $@ =-=-='
rm -f roemer.o tromp.o vanb.o @echo
rm -f x x1 ouroboros.c ouroboros.o fubar.orig.o tromp.bsd.o tromp.s5.o core @for i in ${WINNERS} ; do \
clobber: clean echo "=-= start ${YEAR}/$$i =-="; \
rm -f ${WINNERS} echo "(cd $$i && $(MAKE) $@)"; \
rm -f jar.1.o HI (cd $$i && $(MAKE) $@); \
rm -f ${ALTERNATE} echo "=-= end ${YEAR}/$$i =-="; \
nuke: clobber echo; \
@true done
install: all @echo '=-=-= ${YEAR} complete make $@ =-=-='
cat ${WINNERS} > /dev/null
clobber:
@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 $@ =-=-='
install:
@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 $@ =-=-='
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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+304 -59
View File
@@ -1,73 +1,318 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1990 makefile # 1990 Makefile
################################################################################
# #
# Copyright (c) 1990, Landon Curt Noll & Larry Bassel. # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from Landon Curt Noll and Larry Bassel.
SHELL=/bin/sh
MAKE=make
MAKEFLAGS=e
# uncomment the line to select the preferred type of compile
# #
# You should also check the ansi.mk or common.mk for the # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# proper compiler name and flags. # year directory was reworked so that entries are in separate directories.
# This also applies to any orig.ansi.mk and orig.common.mk files.
# #
# NOTE ==> USE=ansi compile with an ANSI compiler by default # Several Makefiles were modified / formed in 2022, and as such it may have
#USE=ansi # elements that are not historically compatible with way entries were built.
# NOTE ==> USE=common compile with a common K&R compiler by default # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
#USE=common #
# Regarding individual entries:
#
# 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 judgess 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
#
################################################################################
WINNERS=cmills pjr westley stig tbr db dds theorem baruch jaw scjones # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
#
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
#
# See: http://creativecommons.org/licenses/by-sa/3.0/
################
# tool locations
################
#
SHELL= /bin/bash
MAKE= make
###############
# IOCCC winners
###############
#
WINNERS= baruch cmills dds dg jaw pjr scjones stig tbr theorem westley
YEAR= 1990
###################
# build all entries
###################
#
all: all:
-@if [ "${USE}" = "common" ]; then \ @echo '=-=-= ${YEAR} begin make $@ =-=-='
echo ${MAKE} -k -f common.mk all; \ @echo
${MAKE} -k -f common.mk all; \ @for i in ${WINNERS} ; do \
elif [ "${USE}" = "ansi" ]; then \ echo "=-= start ${YEAR}/$$i =-="; \
echo ${MAKE} -k -f ansi.mk all; \ echo "(cd $$i && $(MAKE) $@)"; \
${MAKE} -k -f ansi.mk all; \ (cd $$i && $(MAKE) $@); \
else \ echo "=-= end ${YEAR}/$$i =-="; \
echo "set USE= in Makefile to be ansi or common as desired"; \ echo; \
echo "or type: make -f ansi.mk for ansi makes"; \ done
echo "or type: make -f common.mk for common K&R makes"; \ @echo '=-=-= ${YEAR} complete make $@ =-=-='
exit 1; \
fi
ansi: .PHONY: all alt data everything clean clobber install \
${MAKE} -f ansi.mk all love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
common: # alternative executable
${MAKE} -f common.mk all #
alt:
@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 $@ =-=-='
${WINNERS}: # data files
-@if [ "${USE}" = "common" ]; then \ #
echo ${MAKE} -k -f common.mk $@; \ data:
${MAKE} -k -f common.mk $@; \ @echo '=-=-= ${YEAR} begin make $@ =-=-='
elif [ "${USE}" = "ansi" ]; then \ @echo
echo ${MAKE} -k -f ansi.mk $@; \ @for i in ${WINNERS} ; do \
${MAKE} -k -f ansi.mk $@; \ echo "=-= start ${YEAR}/$$i =-="; \
else \ echo "(cd $$i && $(MAKE) $@)"; \
echo "set USE= in Makefile to be ansi or common as desired"; \ (cd $$i && $(MAKE) $@); \
echo "or type: make -f ansi.mk for ansi makes"; \ echo "=-= end ${YEAR}/$$i =-="; \
echo "or type: make -f common.mk for common K&R makes"; \ echo; \
exit 1;\ done
fi @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
###############
#
clean: clean:
${MAKE} -f ansi.mk clean @echo '=-=-= ${YEAR} begin make $@ =-=-='
${MAKE} -f common.mk clean @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 $@ =-=-='
clobber: clobber:
${MAKE} -f ansi.mk clobber @echo '=-=-= ${YEAR} begin make $@ =-=-='
${MAKE} -f common.mk clobber @echo
nuke: clobber @for i in ${WINNERS} ; do \
${MAKE} -f ansi.mk nuke echo "=-= start ${YEAR}/$$i =-="; \
${MAKE} -f common.mk nuke echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
install: install:
${MAKE} -f ansi.mk install @echo '=-=-= ${YEAR} begin make $@ =-=-='
${MAKE} -f common.mk install @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 $@ =-=-='
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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+300 -111
View File
@@ -1,129 +1,318 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1991 makefile # 1991 Makefile
################################################################################
# #
# Copyright (c) 1991, Landon Curt Noll & Larry Bassel. # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit #
# use is granted provided this this copyright and notice are included in its # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# entirety and remains unaltered. All other uses must receive prior permission # year directory was reworked so that entries are in separate directories.
# from Landon Curt Noll and Larry Bassel. # This also applies to any orig.ansi.mk and orig.common.mk files.
#
# Several Makefiles were modified / formed in 2022, and as such it may have
# elements that are not historically compatible with way entries were built.
# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
#
# Regarding individual entries:
#
# 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 judgess 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.
#
# See: http://creativecommons.org/licenses/by-sa/3.0/
SHELL=/bin/sh ################
MAKE=make # tool locations
MAKEFLAGS=e ################
# uncomment the line to select the preferred type of compile
# #
# You should also check the ansi.mk or common.mk for the SHELL= /bin/bash
# proper compiler name and flags. MAKE= make
#
# NOTE ==> USE=ansi compile with an ANSI compiler by default
#USE=ansi
# NOTE ==> USE=common compile with a common K&R compiler by default
#USE=common
###############
# IOCCC winners
###############
#
WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley WINNERS= ant brnstnd buzzard cdupont davidguy dds fine rince westley
YEAR= 1991
###################
# build all entries
###################
#
all: all:
-@if [ "${USE}" = "common" ]; then \ @echo '=-=-= ${YEAR} begin make $@ =-=-='
echo ${MAKE} -k -f common.mk all; \ @echo
${MAKE} -k -f common.mk all; \ @for i in ${WINNERS} ; do \
elif [ "${USE}" = "ansi" ]; then \ echo "=-= start ${YEAR}/$$i =-="; \
echo ${MAKE} -k -f ansi.mk all; \ echo "(cd $$i && $(MAKE) $@)"; \
${MAKE} -k -f ansi.mk all; \ (cd $$i && $(MAKE) $@); \
else \ echo "=-= end ${YEAR}/$$i =-="; \
echo "set USE= in Makefile to be ansi or common as desired"; \ echo; \
echo "or type: make -f ansi.mk for ansi makes"; \ done
echo "or type: make -f common.mk for common K&R makes"; \ @echo '=-=-= ${YEAR} complete make $@ =-=-='
exit 1; \
fi
ansi: .PHONY: all alt data everything clean clobber install \
${MAKE} -f ansi.mk all love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
common: # alternative executable
${MAKE} -f common.mk all #
alt:
@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 $@ =-=-='
${WINNERS} merlyn.c nextmove.c ttt_game.c: # data files
-@if [ "${USE}" = "common" ]; then \ #
echo ${MAKE} -f common.mk $@; \ data:
${MAKE} -f common.mk $@; \ @echo '=-=-= ${YEAR} begin make $@ =-=-='
elif [ "${USE}" = "ansi" ]; then \ @echo
echo ${MAKE} -f ansi.mk $@; \ @for i in ${WINNERS} ; do \
${MAKE} -f ansi.mk $@; \ echo "=-= start ${YEAR}/$$i =-="; \
else \ echo "(cd $$i && $(MAKE) $@)"; \
echo "set USE= in Makefile to be ansi or common as desired"; \ (cd $$i && $(MAKE) $@); \
echo "or type: make -f ansi.mk for ansi makes"; \ echo "=-= end ${YEAR}/$$i =-="; \
echo "or type: make -f common.mk for common K&R makes"; \ echo; \
exit 1;\ done
fi @echo '=-=-= ${YEAR} complete make $@ =-=-='
ttt: ttt.sh # both all and alt
-@if [ "${USE}" = "common" ]; then \ #
echo ${MAKE} -f common.mk $@; \ everything:
${MAKE} -f common.mk $@; \ @echo '=-=-= ${YEAR} begin make $@ =-=-='
elif [ "${USE}" = "ansi" ]; then \ @echo
echo ${MAKE} -f ansi.mk $@; \ @for i in ${WINNERS} ; do \
${MAKE} -f ansi.mk $@; \ echo "=-= start ${YEAR}/$$i =-="; \
else \ echo "(cd $$i && $(MAKE) $@)"; \
echo "set USE= in Makefile to be ansi or common as desired"; \ (cd $$i && $(MAKE) $@); \
echo "or type: make -f ansi.mk for ansi makes"; \ echo "=-= end ${YEAR}/$$i =-="; \
echo "or type: make -f common.mk for common K&R makes"; \ echo; \
exit 1;\ done
fi @echo '=-=-= ${YEAR} complete make $@ =-=-='
merlyn: merlyn.c
-@if [ "${USE}" = "common" ]; then \
echo ${MAKE} -f common.mk $@; \
${MAKE} -f common.mk $@; \
elif [ "${USE}" = "ansi" ]; then \
echo ${MAKE} -f ansi.mk $@; \
${MAKE} -f ansi.mk $@ \
else \
echo "set USE= in Makefile to be ansi or common as desired"; \
echo "or type: make -f ansi.mk for ansi makes"; \
echo "or type: make -f common.mk for common K&R makes"; \
exit 1;\
fi
ttt_game: ttt_game.c
-@if [ "${USE}" = "common" ]; then \
echo ${MAKE} -f common.mk $@; \
${MAKE} -f common.mk $@; \
elif [ "${USE}" = "ansi" ]; then \
echo ${MAKE} -f ansi.mk $@; \
${MAKE} -f ansi.mk $@; \
else \
echo "set USE= in Makefile to be ansi or common as desired"; \
echo "or type: make -f ansi.mk for ansi makes"; \
echo "or type: make -f common.mk for common K&R makes"; \
exit 1;\
fi
nextmove: nextmove.c
-@if [ "${USE}" = "common" ]; then \
echo ${MAKE} -f common.mk $@; \
${MAKE} -f common.mk $@; \
elif [ "${USE}" = "ansi" ]; then \
echo ${MAKE} -f ansi.mk $@; \
${MAKE} -f ansi.mk $@; \
else \
echo "set USE= in Makefile to be ansi or common as desired"; \
echo "or type: make -f ansi.mk for ansi makes"; \
echo "or type: make -f common.mk for common K&R makes"; \
exit 1;\
fi
###############
# utility rules
###############
#
clean: clean:
${MAKE} -f ansi.mk clean @echo '=-=-= ${YEAR} begin make $@ =-=-='
${MAKE} -f common.mk clean @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 $@ =-=-='
clobber: clobber:
${MAKE} -f ansi.mk clobber @echo '=-=-= ${YEAR} begin make $@ =-=-='
${MAKE} -f common.mk clobber @echo
nuke: clobber @for i in ${WINNERS} ; do \
${MAKE} -f ansi.mk nuke echo "=-= start ${YEAR}/$$i =-="; \
${MAKE} -f common.mk nuke echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
install: install:
${MAKE} -f ansi.mk install @echo '=-=-= ${YEAR} begin make $@ =-=-='
${MAKE} -f common.mk install @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 $@ =-=-='
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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+287 -212
View File
@@ -1,244 +1,319 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1992 makefile # 1992 Makefile
################################################################################
# #
# Copyright (c) 1992, Landon Curt Noll & Larry Bassel. # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from Landon Curt Noll and Larry Bassel.
SHELL=/bin/sh
CHMOD=chmod
CP=cp
RM=rm
SED=sed
LN=ln
UNIQ=uniq
CB=cb
GREP=grep
# set this to where your C Processor resides
# #
# On some systems: # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# CPP=/lib/cpp # year directory was reworked so that entries are in separate directories.
# This also applies to any orig.ansi.mk and orig.common.mk files.
# #
CPP=/usr/ccs/lib/acpp # Several Makefiles were modified / formed in 2022, and as such it may have
# elements that are not historically compatible with way entries were built.
# flags for ansi compiles # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
# #
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, # Regarding individual entries:
# others such as gcc may want -ansi, others may want nothing
# at all. Adjust the CFLAGS line as needed.
# #
# NOTE: Some compilers cannot optimize, or optimize some entries # IOCCC winning entry code may not work on your system. Even with standards,
# entries incorrectly. You might want need to turn on -O # conditions and build environments change, especially when it comes to more
# to see if your compiler can handle them. # 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.
# #
#CFLAGS=-O -Xa # Corrections on winning author and fixing typos in remarks are VERY WELCOME.
CFLAGS=-Xa
CC=cc
# misc shell babble
# #
NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/' # GitHub pull requests are welcome:
SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g'
CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*'
# winners that compile under ANSI C
# #
WINNERS= adrian albert ant buzzard.1 buzzard.2 gson kivinen imc \ # If you have a patch that might make running an entry work in modern Unix-like
lush marangon nathan vern westley # environments, please create a GitHub pull request for the IOCCC judgess to
ALT_NAMES= adgrep am babble first ag whereami # consider.
all: $(WINNERS) $(ALT_NAMES)
adrian: adrian.c
$(CC) $(CFLAGS) adrian.c -o adrian
$(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c
$(SED) '1s/\..*\./. wc ./' adrian.c > ad.temp
-./adrian ad.temp <ad.temp >adwc.c
$(CC) -o adwc adwc.c
$(SED) '1s/\..*\./. basename ./' adrian.c > ad.temp
-./adrian ad.temp <ad.temp >adbasename.c
$(CC) -o adbasename adbasename.c
$(SED) '1s/\..*\./. echo| ./' adrian.c > ad.temp
-./adrian ad.temp <ad.temp >adecho.c
$(CC) -o adecho adecho.c
$(SED) '1s/\..*\./. head; ./' adrian.c > ad.temp
-./adrian ad.temp <ad.temp >adhead.c
$(CC) -o adhead adhead.c
$(SED) '1s/\..*\./. sleep ./' adrian.c > ad.temp
-./adrian ad.temp <ad.temp >adsleep.c
$(CC) -o adsleep adsleep.c
$(RM) -f ad.temp
# NOTE: this is the original source that won
# #
adrian.orig: adrian.orig.c # Suggestions and corrections regarding Makefiles, winning author information,
$(CC) $(CFLAGS) adrian.orig.c -o adrian.orig # 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
albert: albert.c # to consider. To form a GitHub issue or GitHub pull, please visit:
$(CC) $(CFLAGS) albert.c -o albert
# NOTE: this is the original source that won
# #
albert.orig: albert.orig.c # https://github.com/ioccc-src/winner
$(CC) $(CFLAGS) albert.orig.c -o albert.orig
ant: ant.c
$(CC) $(CFLAGS) ant.c -o ant
buzzard.1: buzzard.1.c
$(CC) $(CFLAGS) buzzard.1.c -o buzzard.1
babble.cppcb: buzzard.1.c
$(NOINCLUDE) buzzard.1.c | \
$(CPP) $(CPPFLAGS) | \
$(CPPCLEAN) | \
$(CB) $(CBFLAGS) | \
$(UNIQ) | \
$(SPACECLEAN) > babble.cppcb 2>&1
buzzard.2: buzzard.2.c
$(CC) $(CFLAGS) buzzard.2.c -o buzzard.2
# NOTE: this is the original source that won
# #
buzzard.2.orig: buzzard.2.orig.c ################################################################################
$(CC) $(CFLAGS) buzzard.2.orig.c -o buzzard.2.orig
gson: gson.c # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
$(CC) $(CFLAGS) gson.c -o gson
# NOTE: some systems may only need:
# #
# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 # Creative Commons Attribution-ShareAlike 3.0 Unported License.
# #
kivinen: kivinen.c # See: http://creativecommons.org/licenses/by-sa/3.0/
$(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 -lsocket -lresolv -lnsl
# NOTE: this is the original program that won
################
# tool locations
################
# #
# NOTE: some systems may only need: SHELL= /bin/bash
MAKE= make
###############
# IOCCC winners
###############
# #
# $(CC) $(CFLAGS) kivinen.c -o kivinen -lX11 WINNERS= adrian albert ant buzzard1 buzzard2 gson imc kivinen lush marangon \
nathan vern westley
YEAR= 1992
###################
# build all entries
###################
# #
kivinen.orig: kivinen.orig.c all:
$(CC) $(CFLAGS) kivinen.orig.c -o kivinen.orig -lX11 \ @echo '=-=-= ${YEAR} begin make $@ =-=-='
-lsocket -lresolv -lnsl @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 $@ =-=-='
imc: imc.c .PHONY: all alt data everything clean clobber install \
$(CC) $(CFLAGS) imc.c -o imc love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# NOTE: this is the original program that won # alternative executable
# #
imc.orig: imc.orig.c alt:
$(CC) $(CFLAGS) imc.orig.c -o imc.orig @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 $@ =-=-='
lush: lush.c # data files
$(CC) $(CFLAGS) lush.c -o lush
lush.again: lush.c
$(CC) $(CFLAGS) lush.c -o lush.again
$(RM) -f lush.again
# NOTE: this is the original program that won
# #
lush.orig: lush.orig.c data:
$(CC) $(CFLAGS) lush.orig.c -o lush.orig @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 $@ =-=-='
# NOTE: some systems may need: # both all and alt
# #
# $(CC) $(CFLAGS) marangon.c -o marangon -lcurses -ltermcap 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
###############
# #
marangon: marangon.c
$(CC) $(CFLAGS) marangon.c -o marangon -lcurses
# NOTE: this is the original program that won
#
# NOTE: some systems may need:
#
# $(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses -ltermcap
#
marangon.orig: marangon.orig.c
$(CC) $(CFLAGS) marangon.orig.c -o marangon.orig -lcurses
nathan: nathan.c
$(CC) $(CFLAGS) nathan.c -o nathan
# NOTE: this is the original program that won
#
nathan.orig: nathan.orig.c
$(CC) $(CFLAGS) nathan.orig.c -o nathan.orig
vern: vern.tmp.c
$(CC) $(CFLAGS) vern.tmp.c -o vern
vern.tmp.c: vern.c
$(RM) -f vern.tmp.c
$(SED) <vern.c 's/{ /(/g;s/} /)/g;s/; /#define /' | \
$(SED) 's/} /=/g;s/{ /i/g' >vern.tmp.c
# NOTE: this is the original program that won
#
vern.orig: vern.orig.tmp.c
$(CC) $(CFLAGS) vern.orig.tmp.c -o vern.orig
vern.orig.tmp.c: vern.orig.c
$(RM) -f vern.orig.tmp.c
$(SED) <vern.orig.c 's/{ /(/g;s/} /)/g;s/; /#define /' | \
$(SED) 's/} /=/g;s/{ /i/g' >vern.orig.tmp.c
westley: westley.c
$(CC) $(CFLAGS) westley.c -o westley
# alternate names for selected entries
#
adgrep: adrian
$(RM) -f adgrep
$(LN) adrian adgrep
am: ant
$(RM) -f am
$(LN) ant am
babble: buzzard.1
$(RM) -f babble
$(LN) buzzard.1 babble
first: buzzard.2
$(RM) -f first
$(LN) buzzard.2 first
ag: gson
$(RM) -f ag
$(LN) gson ag
whereami: westley
$(RM) -f whereami
$(LN) westley whereami
clean: clean:
$(RM) -f *.o a.out core @echo '=-=-= ${YEAR} begin make $@ =-=-='
$(RM) -f vern.tmp.c lush.again babble.cppcb vern.orig.tmp.c @echo
$(RM) -f ad.temp adwc.c adbasename.c adecho.c adhead.c adsleep.c @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 $@ =-=-='
clobber: clean clobber:
$(RM) -f $(WINNERS) a.out @echo '=-=-= ${YEAR} begin make $@ =-=-='
$(RM) -f $(ALT_NAMES) @echo
$(RM) -f adwc adbasename adecho adhead adsleep @for i in ${WINNERS} ; do \
$(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig echo "=-= start ${YEAR}/$$i =-="; \
$(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
am_clobber: clean am install:
$(RM) -f am.safe @echo '=-=-= ${YEAR} begin make $@ =-=-='
$(CP) am am.safe @echo
$(RM) -f $(WINNERS) a.out @for i in ${WINNERS} ; do \
$(RM) -f $(ALT_NAMES) echo "=-= start ${YEAR}/$$i =-="; \
$(RM) -f adwc adbasename adecho adhead adsleep echo "(cd $$i && $(MAKE) $@)"; \
$(RM) -f adrian.orig lush.orig nathan.orig buzzard.2.orig (cd $$i && $(MAKE) $@); \
$(RM) -f kivinen.orig imc.orig albert.orig marangon.orig vern.orig echo "=-= end ${YEAR}/$$i =-="; \
$(CP) am.safe am echo; \
$(RM) -f am.safe done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
nuke: clobber indent.c:
@true @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 $@ =-=-='
install: all
cat $(WINNERS) > /dev/null ##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+296 -125
View File
@@ -1,147 +1,318 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1993 makefile # 1993 Makefile
################################################################################
# #
# Copyright (c) 1993, Landon Curt Noll & Larry Bassel. # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit #
# use is granted provided this this copyright and notice are included in its # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# entirety and remains unaltered. All other uses must receive prior permission # year directory was reworked so that entries are in separate directories.
# from Landon Curt Noll and Larry Bassel. # This also applies to any orig.ansi.mk and orig.common.mk files.
#
# Several Makefiles were modified / formed in 2022, and as such it may have
# elements that are not historically compatible with way entries were built.
# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
#
# Regarding individual entries:
#
# 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 judgess 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.
#
# See: http://creativecommons.org/licenses/by-sa/3.0/
SHELL=/bin/sh ################
CHMOD=chmod # tool locations
CP=cp ################
RM=rm #
SED=sed SHELL= /bin/bash
LN=ln MAKE= make
# flags for ANSI compiles
#
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode,
# others such as gcc may want -ansi, others may want nothing
# at all. Adjust the CFLAGS line as needed.
#
# NOTE: Some compilers cannot optimize, or optimize some entries
# entries incorrectly. You might want need to turn on -O
# to see if your compiler can handle them.
#
#CFLAGS=-O -Xa
#CFLAGS=-Xa
CFLAGS= -ansi
#CFLAGS=
# ANSI compiler ###############
# # IOCCC winners
# Set CC to the name of your ANSI compiler. ###############
#CC=cc
CC=gcc
# misc shell babble
#
NOINCLUDE=$(SED) -e 's/^.\([ ]*\)include/%include/'
SPACECLEAN=$(SED) -e 's/\([^ ]\)\([ ]\)[ ][ ]*/\1\2/g'
CPPCLEAN=$(GREP) -v '^. [0-9][0-9]*'
# winners that compile under ANSI C
# #
WINNERS= ant cmills dgibson ejb jonth leo lmfjyh plummer rince schnitzi vanb WINNERS= ant cmills dgibson ejb jonth leo lmfjyh plummer rince schnitzi vanb
ALT_NAMES= ag ag.txt chris mind jkb
all: $(WINNERS) $(ALT_NAMES) YEAR= 1993
ant: ant.c ###################
${CC} ${CFLAGS} ant.c -o ant # build all entries
###################
cmills: cmills.c
${CC} ${CFLAGS} cmills.c -o cmills -lX11
dgibson: dgibson.c dgibson.sh dgibson.data1
-@if [ ! -f life.d ] ; then \
echo "cp dgibson.data1 life.d"; \
cp dgibson.data1 life.d; \
echo "rm -f data.name"; \
rm -f data.name; \
echo "echo dgibson.data1 > data.name"; \
echo dgibson.data1 > data.name; \
fi
${CC} ${CFLAGS} dgibson.c -o dgibson
-${CHMOD} +x dgibson.sh
ejb: ejb.c
${CC} ${CFLAGS} ejb.c -o ejb
jonth: jonth.c
${RM} -f jonth.tmp.c
${SED} -e s/\^\ /#define/ -e 's/@/Window(D,/g' jonth.c > jonth.tmp.c
${CC} ${CFLAGS} \
-DXX1='H 19;}M(J,4)}N H 20;}M(T,4)}q(m,w,' \
-DXX='XKeycodeToKeysym(D,o[13],0);K 12:Y();}R;}d XX1' \
jonth.tmp.c -o jonth -lX11
leo: leo.c
${CC} ${CFLAGS} leo.c -o leo
lmfjyh: lmfjyh.c
${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c
${CP} lmfjyh.c \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c
${CC} ${CFLAGS} \
\"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c \
-o lmfjyh
plummer: plummer.c
${CC} ${CFLAGS} plummer.c -o plummer
rince: rince.c
${CC} ${CFLAGS} rince.c -lcurses -ltermcap -o rince
# NOTE: this is the original source that won
# #
rince.orig: rince.orig.c all:
$(CC) $(CFLAGS) rince.orig.c -lcurses -ltermcap -o rince.orig @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 $@ =-=-='
schnitzi: schnitzi.c .PHONY: all alt data everything clean clobber install \
${CC} ${CFLAGS} schnitzi.c -o schnitzi love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
vanb: vanb.c # alternative executable
${CC} ${CFLAGS} -DO5=main vanb.c -o vanb
# alternate names for selected entries
# #
ag: ant alt:
$(RM) -f ag @echo '=-=-= ${YEAR} begin make $@ =-=-='
$(LN) ant ag @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 $@ =-=-='
ag.txt: ant.txt # data files
$(RM) -f ag.txt #
$(LN) ant.txt ag.txt 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 $@ =-=-='
chris: cmills # both all and alt
$(RM) -f chris #
$(LN) cmills chris 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 $@ =-=-='
mind: leo
$(RM) -f mind
$(LN) leo mind
jkb: rince
$(RM) -f jkb
$(LN) rince jkb
tidy:
${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c
###############
# utility rules
###############
#
clean: clean:
$(RM) -f *.o a.out core @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 $@ =-=-='
clobber: clean tidy clobber:
$(RM) -f $(WINNERS) @echo '=-=-= ${YEAR} begin make $@ =-=-='
$(RM) -f $(ALT_NAMES) @echo
${RM} -f jonth.tmp.c life.d rince.orig data.name data.name2 @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 $@ =-=-='
nuke: clobber install:
@true @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 $@ =-=-='
install: all indent.c:
cat $(WINNERS) > /dev/null @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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+300 -140
View File
@@ -1,158 +1,318 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1994 makefile # 1994 Makefile
################################################################################
# #
# Copyright (c) 1994, Landon Curt Noll & Larry Bassel. # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from Landon Curt Noll and Larry Bassel.
SHELL=/bin/sh
CAT=cat
CHMOD=chmod
CP=cp
ECHO=echo
GUNZIP=gunzip
UUDECODE=uudecode
LN=ln
RM=rm
SED=sed
TRUE=true
# flags for ANSI compiles
# #
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# others such as gcc may want -ansi, others may want nothing # year directory was reworked so that entries are in separate directories.
# at all. Adjust the CFLAGS line as needed. # This also applies to any orig.ansi.mk and orig.common.mk files.
# #
# NOTE: Some compilers cannot optimize, or optimize some entries # Several Makefiles were modified / formed in 2022, and as such it may have
# entries incorrectly. You might want need to turn on -O # elements that are not historically compatible with way entries were built.
# to see if your compiler can handle them. # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
# #
#CFLAGS=-O -Xa # Regarding individual entries:
#CFLAGS=-Xa
#CFLAGS= -ansi
CFLAGS= -ansi -O
#CFLAGS=
# ANSI compiler
# #
# Set CC to the name of your ANSI compiler. # IOCCC winning entry code may not work on your system. Even with standards,
#CC=cc # conditions and build environments change, especially when it comes to more
CC=gcc # 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
# winners that compile under ANSI C # later IOCCC years.
# #
WINNERS= dodsond1 dodsond2 horton imc ldb schnitzi shapiro smr tvr weisberg \ # Corrections on winning author and fixing typos in remarks are VERY WELCOME.
westley
ALT_NAMES= dodsond2.orig shapiro.alt horton.alt gtface weisberg.alt tvr.alt
all: $(WINNERS) $(ALT_NAMES)
westley: westley.c
${CC} ${CFLAGS} westley.c -DO -o westley
weisberg: weisberg.c
${CC} ${CFLAGS} -Dc='n*n>x?p:((m=*(b+1)),N))' \
-De='(2<<6*sizeof(int))' \
-Do='(8<<5*sizeof(int))' \
-DN='((b=t+1),x+=2,x>e?exit():o' \
-Dp='(a-t<o?*(a++)=x:47),printf("%d ",x),N)' \
weisberg.c -o weisberg
# If you want weisberg to generate all values up to MAXINT
# and have the memory to malloc a 512M table, use the following.
# #
weisberg.alt: weisberg.c # GitHub pull requests are welcome:
${CC} ${CFLAGS} -Dc='n*n>x?p:((m=*(b+1)),N))' \
-De='~(1<<8*sizeof(int)-1)' \
-Do='(2<<7*sizeof(int))' \
-DN='((b=t+1),x+=2,x>e?exit():o' \
-Dp='(a-t<o?*(a++)=x:47),printf("%d ",x),N)' \
weisberg.c -o weisberg.alt
tvr: tvr.c
${CC} ${CFLAGS} tvr.c -o tvr -lX11
# The following is an alternate version of tvr. Modes 0-3 have been
# renumbered 1-4. Mode 0 is Mandelbrot / julian calculated correctly.
# #
tvr.alt: tvr.alt.c # If you have a patch that might make running an entry work in modern Unix-like
${CC} ${CFLAGS} tvr.alt.c -o tvr.alt -lX11 # environments, please create a GitHub pull request for the IOCCC judgess to
# consider.
smr: smr.c
@${RM} -rf smr
${CP} smr.c smr
${CHMOD} +x smr
shapiro: shapiro_t2.c
${CC} ${CFLAGS} shapiro_t2.c -o shapiro
shapiro_t2.c: shapiro_t1
@${RM} -f shapiro_t2.c
./shapiro_t1 > shapiro_t2.c
shapiro_t1: shapiro.c
${CC} ${CFLAGS} shapiro.c -o shapiro_t1
shapiro.alt: shapiro.alt.c
${CC} ${CFLAGS} shapiro.alt.c -o shapiro.alt
schnitzi: schnitzi.c
${CC} ${CFLAGS} schnitzi.c -o schnitzi
horton: horton.c
${CC} ${CFLAGS} horton.c -o horton
# Here are some programs related to the horton entry. See horton.hint
# for details.
# #
horton.alt: horton.alt.c # Suggestions and corrections regarding Makefiles, winning author information,
${CC} ${CFLAGS} horton.alt.c -o horton.alt # fixing typos in remarks, and code patches are welcome via opening a GitHub
gtface: gtface.c # issue or better yet, by creating a GitHub pull request for the IOCCC judges
${CC} ${CFLAGS} gtface.c -o gtface # to consider. To form a GitHub issue or GitHub pull, please visit:
ldb: ldb.c
${CC} ${CFLAGS} ldb.c -o ldb
imc: imc.c
${CC} ${CFLAGS} imc.c -o imc
dodsond2: dodsond2.c
${CC} ${CFLAGS} dodsond2.c -o dodsond2
# NOTE: this is the original (gziped) file that won
# #
dodsond2.orig: dodsond2.gz # https://github.com/ioccc-src/winner
@${RM} -f dodsond2.orig.c #
-${GUNZIP} < dodsond2.gz > dodsond2.orig.c ################################################################################
-@if [ -s dodsond2.orig.c ]; then \
${ECHO} "${CC} ${CFLAGS} dodsond2.orig.c -o dodsond2.orig"; \
${CC} ${CFLAGS} dodsond2.orig.c -o dodsond2.orig; \
else \
${RM} -f dodsond2.orig.c; \
${ECHO} "sorry, we could not gunzip dodsond2.gz"; \
fi
dodsond2.gz: dodsond2.gz.uu # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
@${RM} -f dodsond2.gz #
${UUDECODE} dodsond2.gz.uu # Creative Commons Attribution-ShareAlike 3.0 Unported License.
#
# See: http://creativecommons.org/licenses/by-sa/3.0/
dodsond1: dodsond1.c
${CC} ${CFLAGS} dodsond1.c -o dodsond1
################
# tool locations
################
#
SHELL= /bin/bash
MAKE= make
###############
# IOCCC winners
###############
#
WINNERS= dodsond1 dodsond2 horton imc ldb schnitzi shapiro smr tvr weisberg westley
YEAR= 1994
###################
# build all entries
###################
#
all:
@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 $@ =-=-='
.PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# alternative executable
#
alt:
@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 $@ =-=-='
# 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
###############
#
clean: clean:
$(RM) -f *.o a.out core @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 $@ =-=-='
clobber: clean clobber:
$(RM) -f $(WINNERS) @echo '=-=-= ${YEAR} begin make $@ =-=-='
$(RM) -f $(ALT_NAMES) @echo
${RM} -f dodsond2.orig.c dodsond2.gz shapiro_t2.c shapiro_t1 @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 $@ =-=-='
nuke: clobber install:
@${TRUE} @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 $@ =-=-='
install: all indent.c:
${CAT} $(WINNERS) $(ALT_NAMES) > /dev/null @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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+300 -100
View File
@@ -1,119 +1,319 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1995 makefile # 1995 Makefile
################################################################################
# #
# Copyright (c) 1996, Landon Curt Noll, Larry Bassel & Sriram Srinivasan # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from Landon Curt Noll, Larry Bassel and Sriram Srinivasan.
SHELL=/bin/sh
CAT=cat
CHMOD=chmod
CP=cp
ECHO=echo
GUNZIP=gunzip
UUDECODE=uudecode
LN=ln
RM=rm
SED=sed
TRUE=true
# flags for ANSI compiles
# #
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# others such as gcc may want -ansi, others may want nothing # year directory was reworked so that entries are in separate directories.
# at all. Adjust the CFLAGS line as needed. # This also applies to any orig.ansi.mk and orig.common.mk files.
# #
# NOTE: Some compilers cannot optimize, or optimize some entries # Several Makefiles were modified / formed in 2022, and as such it may have
# incorrectly. You might want to turn on -O to see if your # elements that are not historically compatible with way entries were built.
# compiler can handle them. # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
# #
#CFLAGS=-O -Xa # Regarding individual entries:
#CFLAGS=-Xa
#CFLAGS= -ansi
CFLAGS= -ansi -O
#CFLAGS=
# ANSI compiler
# #
# Set CC to the name of your ANSI compiler. # IOCCC winning entry code may not work on your system. Even with standards,
CC=cc # conditions and build environments change, especially when it comes to more
#CC=gcc # 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
# winners that compile under ANSI C # later IOCCC years.
# #
WINNERS= cdua dodsond1 dodsond2 esde garry heathbar leo makarios savastio \ # Corrections on winning author and fixing typos in remarks are VERY WELCOME.
schnitzi spinellis vanschnitz
ALT_NAMES= leo.orig garry.fmt garry.test
LEVEL=5
all: $(WINNERS)
cdua: cdua.c
${CC} ${CFLAGS} cdua.c -o cdua
dodsond1: dodsond1.c
${CC} ${CFLAGS} -DXXXXXX= -DXXXXXXX= dodsond1.c -o dodsond1
dodsond2: dodsond2.c
${CC} ${CFLAGS} dodsond2.c -o dodsond2 -lcurses -ltermcap
esde: esde.c esde.data esde.data2
${CC} ${CFLAGS} esde.c -o esde
garry: garry.c
${CC} ${CFLAGS} garry.c -o garry
heathbar: heathbar.c
${CC} ${CFLAGS} heathbar.c -o heathbar
# The following as a less obfuscated version of garry.
# #
garry.fmt: garry.fmt.c # GitHub pull requests are welcome:
${CC} ${CFLAGS} garry.fmt.c -o garry.fmt
# The following are test progs for garry
# #
garry.test: garry.test.sh garry garry.data # If you have a patch that might make running an entry work in modern Unix-like
rm -f garry.test # environments, please create a GitHub pull request for the IOCCC judgess to
cp garry.test.sh garry.test # consider.
chmod +x garry.test
leo: leo.c
${CC} ${CFLAGS} -DGa=608 -DAs=792 -DMo=int -DAr='unsigned long' \
-DS='struct Se' leo.c -o leo
# NOTE: this is the original program that was non-interactive
# #
leo.orig: leo.orig.c # Suggestions and corrections regarding Makefiles, winning author information,
${CC} ${CFLAGS} -DGa=608 -DAs=792 -DMo=int -DAr='unsigned long' \ # fixing typos in remarks, and code patches are welcome via opening a GitHub
-DS='struct S' leo.orig.c -o leo.orig # 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
#
################################################################################
makarios: makarios.c # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
${CC} ${CFLAGS} makarios.c -o makarios #
# Creative Commons Attribution-ShareAlike 3.0 Unported License.
#
# See: http://creativecommons.org/licenses/by-sa/3.0/
schnitzi: schnitzi.c
${CC} ${CFLAGS} schnitzi.c -o schnitzi
spinellis: spinellis.c ################
${CC} ${CFLAGS} spinellis.c -o spinellis # tool locations
################
#
SHELL= /bin/bash
MAKE= make
vanschnitz: vanschnitz.c
${CC} ${CFLAGS} -Dn=${LEVEL} vanschnitz.c -o vanschnitz
###############
# IOCCC winners
###############
#
WINNERS= cdua dodsond1 dodsond2 esde garry heathbar leo makarios savastio schnitzi \
spinellis vanschnitz
YEAR= 1995
###################
# build all entries
###################
#
all:
@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 $@ =-=-='
.PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# alternative executable
#
alt:
@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 $@ =-=-='
# 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
###############
#
clean: clean:
$(RM) -f *.o a.out core ${WINNERS} @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 $@ =-=-='
clobber: clean clobber:
$(RM) -f $(WINNERS) @echo '=-=-= ${YEAR} begin make $@ =-=-='
$(RM) -f $(ALT_NAMES) @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 $@ =-=-='
nuke: clobber install:
@${TRUE} @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 $@ =-=-='
install: all indent.c:
${CAT} $(WINNERS) $(ALT_NAMES) > /dev/null @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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+298 -136
View File
@@ -1,157 +1,319 @@
# %W% %G% %U% #!/usr/bin/env make
# #
# 1996 makefile # 1996 Makefile
################################################################################
# #
# Copyright (c) 1997, Landon Curt Noll & Sriram Srinivasan # An Historical Makefile NOTE:
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from Landon Curt Noll and Sriram Srinivasan.
SHELL=/bin/sh
CAT=cat
CHMOD=chmod
CP=cp
ECHO=echo
GUNZIP=gunzip
UUDECODE=uudecode
LN=ln
RM=rm
SED=sed
TRUE=true
# flags for ANSI compiles
# #
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# others such as gcc may want -ansi, others may want nothing # year directory was reworked so that entries are in separate directories.
# at all. Adjust the CFLAGS line as needed. # This also applies to any orig.ansi.mk and orig.common.mk files.
# #
# NOTE: Some compilers cannot optimize, or optimize some entries # Several Makefiles were modified / formed in 2022, and as such it may have
# incorrectly. You might want to turn on -O to see if your # elements that are not historically compatible with way entries were built.
# compiler can handle them. # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
# #
#CFLAGS=-O -Xa # Regarding individual entries:
#CFLAGS=-Xa
#CFLAGS= -ansi
CFLAGS= -ansi -O
#CFLAGS=
# ANSI compiler
# #
# Set CC to the name of your ANSI compiler. # IOCCC winning entry code may not work on your system. Even with standards,
CC=cc # conditions and build environments change, especially when it comes to more
#CC=gcc # 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
# winners that compile under ANSI C # later IOCCC years.
# #
WINNERS= august dalbec eldby gandalf huffman jonth rcm schweikh1 \ # Corrections on winning author and fixing typos in remarks are VERY WELCOME.
schweikh2 schweikh3 westley
ALT_NAMES= august.orig
LEVEL=5
all: $(WINNERS)
# NOTE: Some compilers will compile this code into infinite loop
# progs. We have found gcc to work on a number of platforms.
# If the following example does not execute in a very
# short time, try a better compiler:
# #
# cat august.c test.oc | ./august > test.oo # GitHub pull requests are welcome:
# #
august: august.c fac.oc parse.oc test.oc # If you have a patch that might make running an entry work in modern Unix-like
${CC} ${CFLAGS} -DZ=60000 -D'T=m[s]' -D'P=m[s++]' \ # environments, please create a GitHub pull request for the IOCCC judgess to
-D'L=m[p++]' -D'g=getchar()' -DE=else -DW=while -D'B=m[p++]' \ # consider.
-DI=if -DR='s=s+l/2;T=r;I(l%2)s++' -D'X=m[s-' \
-D'D=Q(13,-)Q(14,*)Q(15,/)Q(16,%)Q(6,==)Q(7,!=)Q(8,<)C(1,r=P;m[T]=r;T=r)C(9,r=P;m[T]=r;s++)' \
august.c -o august
${CHMOD} +r fac.oc parse.oc test.oc
# This forms a byte code execution engine written in OC
# #
august.oc: august.c # Suggestions and corrections regarding Makefiles, winning author information,
${RM} -f august.oc # fixing typos in remarks, and code patches are welcome via opening a GitHub
${CC} ${CFLAGS} -E -DZ=40000 -D'T=m[s]' -D'P=m[s++]' \ # issue or better yet, by creating a GitHub pull request for the IOCCC judges
-D'L=m[p++]' -D'g=getchar()' -DE=else -DW=while -D'B=m[p++]' \ # to consider. To form a GitHub issue or GitHub pull, please visit:
-DI=if -DR='s=s+l/2;T=r;I(l%2)s++' -D'X=m[s-' \
-D'D=Q(13,-)Q(14,*)Q(15,/)Q(16,%)Q(6,==)Q(7,!=)Q(8,<)C(1,r=P;m[T]=r;T=r)C(9,r=P;m[T]=r;s++)' \
august.c > august.oc
${CHMOD} +r august.oc
# NOTE: this is the original source that won
# #
august.orig: august.orig.c fac.oc parse.oc test.oc # https://github.com/ioccc-src/winner
${CC} ${CFLAGS} -DZ=60000 -DZ=60000 -D'T=m[s]' -D'P=m[s++]' \
-D'L=m[p++]' -D'g=getchar()' -DE=else -DW=while -D'B=m[p++]' \
-DI=if -DR='s=s+l/2;T=r;I(l%2)s++' -D'X=m[s-' \
-D'D=Q(13,-)Q(14,*)Q(15,/)Q(16,%)Q(6,==)Q(7,!=)Q(8,<)C(1,r=P;m[T]=r;T=r)C(9,r=P;m[T]=r;s++)' \
august.orig.c -o august.orig
${RM} -f august.oc
${CC} ${CFLAGS} -E -DZ=40000 -D'T=m[s]' -D'P=m[s++]' \
-D'L=m[p++]' -D'g=getchar()' -DE=else -DW=while -D'B=m[p++]' \
-DI=if -DR='s=s+l/2;T=r;I(l%2)s++' -D'X=m[s-' \
-D'D=Q(13,-)Q(14,*)Q(15,/)Q(16,%)Q(6,==)Q(7,!=)Q(8,<)C(1,r=P;m[T]=r;T=r)C(9,r=P;m[T]=r;s++)' \
august.orig.c > august.oc
${CHMOD} +r fac.oc parse.oc test.oc august.oc
dalbec: dalbec.c
${CC} ${CFLAGS} dalbec.c -o dalbec
eldby: eldby.c
${CC} ${CFLAGS} eldby.c -o eldby
gandalf: gandalf.c
${CC} ${CFLAGS} gandalf.c -o gandalf
${RM} -f hatcat cathat
${CP} gandalf hatcat
${CP} gandalf cathat
huffman: huffman.c
${CC} ${CFLAGS} huffman.c -o huffman
# Add -I${X}/include and -L${X}/lib if this doesn't build
# (X is the root of the X Window distribution)
# Solaris users add -lsocket
# #
jonth: jonth.c ################################################################################
${CC} ${CFLAGS} jonth.c -o jonth -lX11 -lm
rcm: rcm.c # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
${CC} ${CFLAGS} -DJ='if(' -Ds='else J O==' -DU='B(' \
-DX='for(' -DH='unsigned' -Dn='struct x' -DA='0,0,0,0,' \
-DT='<stdio.h>' -DY='<stdlib.h>' -DR='malloc(sizeof(n))' \
-DM='%=K' -DK=32768 -DD='getchar()' -DN=putchar rcm.c -o rcm
schweikh1: schweikh1.c errno.h
${CC} ${CFLAGS} -I. schweikh1.c -o schweikh1
schweikh2: schweikh2.c hunni.c hunni.pl
${CC} ${CFLAGS} -D_POSIX_SOURCE schweikh2.c -o schweikh2
# NOTE: On some systems such as SunOS, one may need to compile with:
# #
# ${CC} ${CFLAGS} \ # Creative Commons Attribution-ShareAlike 3.0 Unported License.
# -I. -D_POSIX_SOURCE '-Ddifftime(a,b)=(double)(b-a)' \
# schweikh3.c -o schweikh3
# #
schweikh3: schweikh3.c iso646.h # See: http://creativecommons.org/licenses/by-sa/3.0/
${CC} ${CFLAGS} -I. -D_POSIX_SOURCE schweikh3.c -o schweikh3
westley: westley.c clock1 clock2 clock3
${CC} ${CFLAGS} westley.c -o westley
${CHMOD} +x clock1 clock2 clock3
################
# tool locations
################
#
SHELL= /bin/bash
MAKE= make
###############
# IOCCC winners
###############
#
WINNERS= august dalbec eldby gandalf huffman jonth rcm schweikh1 schweikh2 schweikh3 \
westley
YEAR= 1996
###################
# build all entries
###################
#
all:
@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 $@ =-=-='
.PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# alternative executable
#
alt:
@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 $@ =-=-='
# 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
###############
#
clean: clean:
${RM} -f *.o a.out core ${WINNERS} @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 $@ =-=-='
clobber: clean clobber:
${RM} -f $(WINNERS) @echo '=-=-= ${YEAR} begin make $@ =-=-='
${RM} -f $(ALT_NAMES) @echo
${RM} -f fac.oo parse.oo test.oo hatcat cathat august.oc @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 $@ =-=-='
nuke: clobber install:
@${TRUE} @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 $@ =-=-='
install: all indent.c:
${CAT} $(WINNERS) $(ALT_NAMES) > /dev/null @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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+296 -152
View File
@@ -1,175 +1,319 @@
#!/bin/make #!/usr/bin/env make
# 1998 makefile
# #
# Copyright (c) Landon Curt Noll, Jeremy Horn, Peter Seebach # 1998 Makefile
# and Leonid A. Broukhis, 1999.
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from the contest judges.
SHELL=/bin/sh ################################################################################
CAT=cat
CHMOD=chmod
CP=cp
MV=mv
ECHO=echo
LN=ln
RM=rm
SED=sed
TRUE=true
# flags for ANSI compiles
# #
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, # An Historical Makefile NOTE:
# others such as gcc may want -ansi, others may want nothing
# at all. Adjust the CFLAGS line as needed.
# #
# NOTE: Some compilers cannot optimize, or optimize some entries # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# incorrectly. You might want to turn on -O to see if your # year directory was reworked so that entries are in separate directories.
# compiler can handle them. # This also applies to any orig.ansi.mk and orig.common.mk files.
# #
# NOTE: On some systems, the library path does not include the location # Several Makefiles were modified / formed in 2022, and as such it may have
# of the X11 libraries. You might need to use a -L/path/to/X11/lib/dir # elements that are not historically compatible with way entries were built.
# in order to compile with these libs. # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
# #
#CFLAGS=-O -Xa # Regarding individual entries:
#CFLAGS=-Xa
CFLAGS= -ansi
#CFLAGS= -ansi -O
#CFLAGS=
#CFLAGS= -ansi -L/usr/X11R6/lib
# ANSI compiler
# #
# Set CC to the name of your ANSI compiler. # 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.
# #
# Some entries seem to need gcc. If you have gcc, set # Corrections on winning author and fixing typos in remarks are VERY WELCOME.
# both CC and MAY_NEED_GCC to gcc.
# #
# If you do not have gcc, set CC to the name of your ANSI compiler, and # GitHub pull requests are welcome:
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
# to disable such programs.
# #
CC= cc # If you have a patch that might make running an entry work in modern Unix-like
MAY_NEED_GCC= gcc # environments, please create a GitHub pull request for the IOCCC judgess to
# consider.
# winners that compile under ANSI C
# #
WINNERS= schweikh1 df dloweneil banks dlowe bas2 fanf bas1 tomtorfs dorssel \ # Suggestions and corrections regarding Makefiles, winning author information,
schweikh2 schnitzi chaos schweikh3 # fixing typos in remarks, and code patches are welcome via opening a GitHub
ALT_NAMES= schweikh2.orig banks.orig dlowe.orig df.orig schweikh1.orig \ # issue or better yet, by creating a GitHub pull request for the IOCCC judges
chaos_nohalf # to consider. To form a GitHub issue or GitHub pull, please visit:
DATA_FILES= banks_files chaos_files fanf_files schweikh1_files schweikh3_files
all: ${WINNERS}
schweikh1: schweikh1.c
${MAY_NEED_GCC} ${CFLAGS} $? -o $@
schweikh1.orig: schweikh1.orig.c
${MAY_NEED_GCC} ${CFLAGS} $? -o $@
schweikh1_files: info
df: df.c
${CC} ${CFLAGS} $? -o $@
df.orig: prog.c
${CC} ${CFLAGS} $? -o $@
prog.c : df.c
${RM} -f prog.c
${CP} $? prog.c
dloweneil: dloweneil.c
${CC} ${CFLAGS} $? -lcurses -o $@
# See note about use of -L/path/to/X11/lib/dir above this rule fails to link
# #
banks: banks.c # https://github.com/ioccc-src/winner
${CC} ${CFLAGS} $? -DIT=XK_Page_Up -DDT=XK_Page_Down \
-DUP=XK_Up -DDN=XK_Down -DLT=XK_Left -DRT=XK_Right \
-DCS=XK_Return -Ddt=0.02 -lm -lX11 -o $@
# See note about use of -L/path/to/X11/lib/dir above this rule fails to link
# #
banks.orig: banks.orig.c ################################################################################
${MAY_NEED_GCC} ${CFLAGS} $? -DIT=XK_Page_Up -DDT=XK_Page_Down \
-DUP=XK_Up -DDN=XK_Down -DLT=XK_Left -DRT=XK_Right \
-DCS=XK_Return -Ddt=0.02 -lm -lX11 -o $@
banks_files: bb.sc horizon.sc mountains.sc pittsburgh.sc pyramids.sc river.sc # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
dlowe: dlowe.c
${CC} ${CFLAGS} $? -o $@
dlowe.orig: dlowe.orig.c
${CC} ${CFLAGS} $? -o $@
bas2: bas2.c
${CC} ${CFLAGS} $? -o $@
fanf: fanf.c
${RM} -f fanftmp1.c fanftmp2.c
${MAY_NEED_GCC} ${CFLAGS} -E $? > fanftmp1.c
${MAY_NEED_GCC} ${CFLAGS} -E fanftmp1.c > fanftmp2.c
${MAY_NEED_GCC} ${CFLAGS} fanftmp2.c ${LDFLAGS} -o $@
fanf_files: fanf.lambda
bas1: bas1.c
${CC} ${CFLAGS} $? -o $@
tomtorfs: tomtorfs.c
${CC} ${CFLAGS} $? -o $@
dorssel: dorssel.c
${CC} ${CFLAGS} $? -o $@
schweikh2: schweikh2.c
${MAY_NEED_GCC} ${CFLAGS} $? -o $@
schweikh2.orig: schweikh2.orig.c
${MAY_NEED_GCC} ${CFLAGS} $? -o $@
schweikh3: schweikh3.c
${MAY_NEED_GCC} ${CFLAGS} $? -DM0=sizeof -DM1=long -DM2=void \
-DM3=realloc -DM4=calloc -DM5=free -o $@
schweikh3_files: samefile.1
schnitzi: schnitzi.c
${CC} ${CFLAGS} $? -o $@
chaos: chaos.c
${CC} ${CFLAGS} $? -lcurses -o $@
# some libcurses do not have halfdelay(). This rule is for those systems
# #
chaos_nohalf: chaos_nohalf.c # Creative Commons Attribution-ShareAlike 3.0 Unported License.
${CC} ${CFLAGS} $? -lcurses -o $@ #
${CP} -f $@ chaos # See: http://creativecommons.org/licenses/by-sa/3.0/
chaos_nohalf.c: chaos.c
${RM} -f $@
${SED} -e 's/halfdelay([^)]*);//' < $? > $@
chaos_files: cube.data desk.data ioccc.data pyramid.data xwing.data ################
# tool locations
################
#
SHELL= /bin/bash
MAKE= make
everything: ${WINNERS} ${ALT_NAMES} ${DATA_FILES}
###############
# IOCCC winners
###############
#
WINNERS= banks bas1 bas2 chaos df dlowe dloweneil dorssel fanf schnitzi schweikh1 \
schweikh2 schweikh3 tomtorfs
YEAR= 1998
###################
# build all entries
###################
#
all:
@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 $@ =-=-='
.PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# alternative executable
#
alt:
@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 $@ =-=-='
# 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
###############
#
clean: clean:
${RM} -f *.o a.out core ${WINNERS} @echo '=-=-= ${YEAR} begin make $@ =-=-='
${RM} -f prog.c fanftmp1.c fanftmp2.c chaos_nohalf.c @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 $@ =-=-='
clobber: clean clobber:
${RM} -f ${WINNERS} @echo '=-=-= ${YEAR} begin make $@ =-=-='
${RM} -f ${ALT_NAMES} @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 $@ =-=-='
nuke: clobber install:
@${TRUE} @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 $@ =-=-='
install: all indent.c:
${CAT} ${WINNERS} ${ALT_NAMES} > /dev/null @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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+292 -187
View File
@@ -1,214 +1,319 @@
#!/bin/make #!/usr/bin/env make
# 2000 makefile
# #
# Copyright (C) Simon Cooper, Landon Curt Noll, Peter Seebach # 2000 Makefile
# and Leonid A. Broukhis, 2000.
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from the contest judges.
SHELL= /bin/sh ################################################################################
CAT= cat #
RM= rm # An Historical Makefile NOTE:
SED= sed #
TRUE= true # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# year directory was reworked so that entries are in separate directories.
# This also applies to any orig.ansi.mk and orig.common.mk files.
#
# Several Makefiles were modified / formed in 2022, and as such it may have
# elements that are not historically compatible with way entries were built.
# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
#
# Regarding individual entries:
#
# 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 judgess 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
#
################################################################################
# optimization # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
# #
# Most compiles will safely use -O2. Some can use only -O. # Creative Commons Attribution-ShareAlike 3.0 Unported License.
# A few compilers have broken optimizers and thus you may
# not want anything.
# #
#OPT= # See: http://creativecommons.org/licenses/by-sa/3.0/
#OPT= -O
OPT= -O2
# flags for ANSI compiles
#
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode,
# others such as gcc may want -ansi, others (Compaq Tru64 Unix)
# want -std1, and others may want nothing at all.
# Adjust the CFLAGS line as needed.
#
# NOTE: Some compilers cannot optimize, or optimize some entries
# incorrectly. You might want to turn on -O to see if your
# compiler can handle them.
#
#
#CFLAGS= -Xa ${OPT}
#CFLAGS= -std1 $(OPT)
CFLAGS= -ansi ${OPT}
NO_ANSI_CFLAGS=
#NO_ANSI_CFLAGS=
# NOTE: On some systems, the library path does not include the location
# of the X11 libraries. You might need to use a -L/path/to/X11/lib/dir
# in order to compile with these libs.
#
X11CCFLAGS= -I/usr/X11R6/include -I/usr/X11R6/include/X11 -I/usr/include/X11
#X11CCFLAGS=
X11LDFLAGS= -L/usr/X11R6/lib
#X11LDFLAGS=
# Perl
#
PERL= perl
#PERL= perl5
# 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
MAY_NEED_GCC= gcc
# winners that compile under ANSI C
#
WINNERS= anderson schneiderwent primenum bellard bmeyer briddlebane dhyang \
dmy2jd jarijyrki dlowe natori rince robison thadgavin tomx
ALT_NAMES= schneiderwent.orig briddlebane.orig thadgavin.orig
DATA_FILES= schneiderwent_files bmeyer_files jarijyrki_files
all: ${WINNERS} ################
# tool locations
# Best use of flags ################
# #
anderson: anderson.c SHELL= /bin/bash
${CC} ${CFLAGS} $? -o $@ MAKE= make
# Most Timely Output
#
schneiderwent: schneiderwent.c
${CC} ${CFLAGS} $? -o $@
schneiderwent_files: schneiderwent.data ###############
# IOCCC winners
###############
#
WINNERS= anderson bellard bmeyer briddlebane dhyang dlowe jarijyrki natori primenum \
rince robison schneiderwent thadgavin tomx
schneiderwent.orig: schneiderwent.orig.c YEAR= 2000
${CC} ${CFLAGS} $? -o $@
# Best Abuse of CPP ###################
# build all entries
###################
# #
primenum: primenum.c all:
${CC} ${CFLAGS} $? -o $@ @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 $@ =-=-='
# Most Specific Output .PHONY: all alt data everything clean clobber install \
# love haste waste maker easter_egg sandwich \
bellard: bellard.c supernova deep_magic magic charon pluto
${CC} ${CFLAGS} $? -o $@
# Best Utility # alternative executable
# #
# machines operating in 64 bit mode: alt:
# @echo '=-=-= ${YEAR} begin make $@ =-=-='
bmeyer: bmeyer.c @echo
${CC} -DY= -O6 $? -o $@ -lm @for i in ${WINNERS} ; do \
# echo "=-= start ${YEAR}/$$i =-="; \
# linux/x86, glibc 2.0, libc4/5: echo "(cd $$i && $(MAKE) $@)"; \
# (cd $$i && $(MAKE) $@); \
# bmeyer: bmeyer.c echo "=-= end ${YEAR}/$$i =-="; \
# ${CC} -DY="__setfpucw(0x127f)" -O6 $? -o $@ -lm echo; \
# done
# linux/x86, glibc 2.1: @echo '=-=-= ${YEAR} complete make $@ =-=-='
#
# bmeyer: bmeyer.c
# ${MAY_NEED_GCC} -DY='int x=0x127f; __asm__ ("fldcw %0" : : "m" (*&x))' \
# -O6 $? -o $@ -lm
bmeyer_files: lavabus.pgm lenna.glic michael.pgm # data files
# Best Abuse of User
# #
briddlebane: briddlebane.c data:
${CC} ${CFLAGS} $? -o $@ -lm @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 $@ =-=-='
briddlebane.orig: briddlebane.orig.c # both all and alt
${CC} ${CFLAGS} $? -o $@ -lm
# Best Layout
# #
dhyang: dhyang.c everything:
${CC} ${CFLAGS} $? -o $@ @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 $@ =-=-='
dmy2jd: dmy2jd.c
${CC} ${CFLAGS} $? -o $@
# Best of Show ###############
# utility rules
###############
# #
jarijyrki: jarijyrki.c
${CC} ${X11CCFLAGS} ${CFLAGS} -DNeedFunctionPrototypes \
-DU=40 -DT=98 '-Dz=(T+1)*U*U' -DQ=80 -DS=20 -DN=10 -DB=5 -DG=23 \
-Dp=7 '-DM=((p+1)*Q)+S' '-DH=(G*S)+S+S' -DC=XK_Up -DL=XK_Down \
-DO=XK_Left -DV=XK_Right -DR=XK_Escape -D_=XK_BackSpace \
$? -o $@ ${X11LDFLAGS} -lX11
jarijyrki_files: sheet1.info
# Worst Abuse of the Rules
#
# NOTE: You will need to adjust this path to the place where Perl has been
# installed on your system. Running "perl -V" may help you locate
# this place.
#
# The following bit of perl may help determining the values you need:
#
# perl -MConfig -e 'print "$Config{archlibexp}/CORE\n"'
#
#
dlowe: dlowe.c
${CC} ${NO_ANSI_CFLAGS} -DPERL_POLLUTE \
`${PERL} -MExtUtils::Embed -e ccopts` $? -o $@ \
`${PERL} -MExtUtils::Embed -e ldopts`
# Best Small Program
#
natori: natori.c
${CC} ${CFLAGS} $? -o $@ -lm
# Astronomically Obfuscated
#
rince: rince.c
${CC} ${X11CCFLAGS} ${CFLAGS} -DM_PI=3.14159265358979323846 \
$? -o $@ -lm ${X11LDFLAGS} -lX11
# Best game
#
robison: robison.c
${CC} ${CFLAGS} $? -o $@
# Most Portable Output
#
thadgavin: thadgavin.c
${CC} ${CFLAGS} $? -o $@ -lcurses -lm
thadgavin.orig: thadgavin.orig.c
${CC} ${CFLAGS} $? -o $@ -lncurses -lm
# Most Complete Program
#
tomx: tomx.c
${CC} ${CFLAGS} $? -o $@
everything: ${WINNERS} ${ALT_NAMES} ${DATA_FILES}
clean: clean:
${RM} -f *.o a.out core ${WINNERS} @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 $@ =-=-='
clobber: clean clobber:
${RM} -f ${WINNERS} @echo '=-=-= ${YEAR} begin make $@ =-=-='
${RM} -f ${ALT_NAMES} @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 $@ =-=-='
nuke: clobber install:
@${TRUE} @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 $@ =-=-='
install: all indent.c:
${CAT} ${WINNERS} ${ALT_NAMES} > /dev/null @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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@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:
@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:
@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:
@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 $@ =-=-='
sandwich:
@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
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+276 -154
View File
@@ -1,197 +1,319 @@
#!/bin/make #!/usr/bin/env make
# 2001 makefile
# #
# Copyright (C) Simon Cooper, Landon Curt Noll, Peter Seebach, 2001. # 2001 Makefile
# All Rights Reserved. Permission for personal, educational or non-profit
# use is granted provided this this copyright and notice are included in its
# entirety and remains unaltered. All other uses must receive prior permission
# from the contest judges.
SHELL= /bin/sh ################################################################################
CAT= cat
RM= rm
SED= sed
TRUE= true
# optimization
# #
# Most compiles will safely use -O2. Some can use only -O. # An Historical Makefile NOTE:
# A few compilers have broken optimizers and thus you may
# not want anything.
# #
#OPT= # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
#OPT= -O # year directory was reworked so that entries are in separate directories.
OPT= -O2 # This also applies to any orig.ansi.mk and orig.common.mk files.
# flags for ANSI compiles
# #
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, # Several Makefiles were modified / formed in 2022, and as such it may have
# others such as gcc may want -ansi, others (Compaq Tru64 Unix) # elements that are not historically compatible with way entries were built.
# want -std1, and others may want nothing at all. # The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
# Adjust the CFLAGS line as needed.
# #
# NOTE: Some compilers cannot optimize, or optimize some entries # Regarding individual entries:
# incorrectly. You might want to turn on -O to see if your
# compiler can handle them.
# #
# 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.
# #
#CFLAGS= -Xa ${OPT} # Corrections on winning author and fixing typos in remarks are VERY WELCOME.
#CFLAGS= -std1 $(OPT)
CFLAGS= -ansi ${OPT}
# NOTE: On some systems, the library path does not include the location
# of the X11 libraries. You might need to use a -L/path/to/X11/lib/dir
# in order to compile with these libs.
# #
X11CCFLAGS= -I/usr/X11R6/include -I/usr/X11R6/include/X11 -I/usr/include/X11 # GitHub pull requests are welcome:
#X11CCFLAGS=
X11LDFLAGS= -L/usr/X11R6/lib -Wl,-R/usr/X11R6/lib
#X11LDFLAGS=
# ANSI compiler
# #
# Set CC to the name of your ANSI compiler. # 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 judgess to
# consider.
# #
# Some entries seem to need gcc. If you have gcc, set # Suggestions and corrections regarding Makefiles, winning author information,
# both CC and MAY_NEED_GCC to gcc. # 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:
# #
# If you do not have gcc, set CC to the name of your ANSI compiler, and # https://github.com/ioccc-src/winner
# set MAY_NEED_GCC to either ${CC} (and hope for the best) or to just :
# to disable such programs.
# #
CC= cc ################################################################################
MAY_NEED_GCC= gcc
# winners that compile under ANSI C # This work by Landon Curt Noll and Leonid A. Broukhis is licensed under:
# #
WINNERS= anonymous bellard bellard.otccex cheong coupard \ # Creative Commons Attribution-ShareAlike 3.0 Unported License.
ctk dgbeards herrmann1 herrmann2 jason kev ollinger rosten \
schweikh westley williams
ALT_NAMES= westley.orig
DATA_FILES= anonymous_files bellard_files herrmann1_files herrmann2_files
all: ${WINNERS}
# Most likely to amaze
# #
anonymous: anonymous.c # See: http://creativecommons.org/licenses/by-sa/3.0/
magic='${MAY_NEED_GCC} -O1'; \
X='-DA(X)=#X'; \
warning='-pedantic -Dprocessor'; \
$$magic $$warning -Dmagic= $$X "-DX=A($$magic \"$$X\")" \
-o anonymous anonymous.c
anonymous_files: anonymous.ten.c
# Best abuse of the rules ################
# tool locations
################
# #
bellard: bellard.c SHELL= /bin/bash
${CC} -rdynamic ${CFLAGS} bellard.c -o bellard -ldl MAKE= make
bellard_files: bellard.otccex.c
# Best short program ###############
# IOCCC winners
###############
# #
cheong: cheong.c WINNERS= anonymous bellard cheong coupard ctk dgbeards herrmann1 herrmann2 jason \
${CC} ${CFLAGS} cheong.c -o cheong kev ollinger rosten schweikh westley williams
# Most obfuscated sound YEAR= 2001
###################
# build all entries
###################
# #
coupard: coupard.c all:
${CC} ${CFLAGS} -o coupard coupard.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 $@ =-=-='
# Worst Driver .PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# alternative executable
# #
ctk: ctk.c alt:
${CC} ${CFLAGS} -o ctk ctk.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 $@ =-=-='
# Worst AI # data files
# #
dgbeards: dgbeards.c data:
${CC} ${CFLAGS} -DE=break -DF=char -DK=case -DP=int -DR=return \ @echo '=-=-= ${YEAR} begin make $@ =-=-='
-DI=0xFFFF dgbeards.c -o dgbeards @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 $@ =-=-='
# Best abuse of the C preprocessor # both all and alt
# #
herrmann1: herrmann1.c herrmann1.sh everything:
@echo "NOTE: $@ must be built/run using the script $@.sh" @echo '=-=-= ${YEAR} begin make $@ =-=-='
${SHELL} ./herrmann1.sh @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 $@ =-=-='
herrmann1_files: herrmann1.gcd herrmann1.sh herrmann1.times2
# Most eye-crossing ###############
# utility rules
###############
# #
# This entry requires the GCC -include feature. clean:
@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 $@ =-=-='
clobber:
@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 $@ =-=-='
install:
@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 $@ =-=-='
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 $@ =-=-='
##################
# 133t hacker rulz
##################
# #
herrmann2: herrmann2.c
${MAY_NEED_GCC} ${CFLAGS} herrmann2.c -o herrmann2 \
-include /usr/include/stdlib.h -include /usr/include/stdio.h \
-include /usr/include/time.h -include /usr/include/unistd.h
herrmann2_files: herrmann2.cup herrmann2.ioccc
# Best Of Show
#
jason: jason.c
${CC} ${CFLAGS} -o jason jason.c
# Best Curses Game
#
kev: kev.c
${CC} ${CFLAGS} -DPORT=5455 -DSPEED=50 -o kev kev.c \
-lcurses -ltermcap \
-Dl_="socket(il.sin_family=AF_INET,SOCK_STREAM,0)"
# Best primal ASCII graphics
#
ollinger: ollinger.c
${CC} ${CFLAGS} ollinger.c -o ollinger
# Best abuse of the user
#
rosten: rosten.c
${CC} ${CFLAGS} rosten.c ${X11CCFLAGS} ${X11LDFLAGS} -pedantic -lX11 \
-o rosten
# Best one-liner
#
schweikh: schweikh.c
${CC} ${CFLAGS} schweikh.c -o schweikh
# Best position-independant code
#
westley: westley.c
${CC} ${CFLAGS} westley.c -o westley
westley.orig: westley.orig.c
${CC} ${CFLAGS} westley.orig.c -o westley.orig
# Best position-independant code
#
williams: williams.c
${CC} williams.c ${X11CCFLAGS} ${X11LDFLAGS} -lX11 -o williams
everything: ${WINNERS} ${ALT_NAMES} ${DATA_FILES}
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 $@ =-=-='
clean: maker:
${RM} -f *.o a.out core ${WINNERS} @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 $@ =-=-='
clobber: clean easter_egg:
${RM} -f ${WINNERS} @echo '=-=-= ${YEAR} begin make $@ =-=-='
${RM} -f ${ALT_NAMES} @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 $@ =-=-='
nuke: clobber sandwich:
@${TRUE} @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 $@ =-=-='
install: all
${CAT} ${WINNERS} ${ALT_NAMES} > /dev/null # The IOCCC resident astronomer states
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='
+290 -332
View File
@@ -1,361 +1,319 @@
#!/bin/make #!/usr/bin/env make
# #
# 2004 makefile # 2004 Makefile
################################################################################
# #
# Copyright (C) 2004, Landon Curt Noll, Simon Cooper, Peter Seebach # An Historical Makefile NOTE:
# and Leonid A. Broukhis. All Rights Reserved. Permission for personal, #
# educational or non-profit use is granted provided this copyright and # The orig.Makefile, if it exits, is the original Makefile before this IOCCC
# notice are included in its entirety and remains unaltered. All other # year directory was reworked so that entries are in separate directories.
# uses must receive prior permission from the contest judges. # This also applies to any orig.ansi.mk and orig.common.mk files.
#
# Several Makefiles were modified / formed in 2022, and as such it may have
# elements that are not historically compatible with way entries were built.
# The orig.Makefile, if it exits, is a copy of the pre-modified Makefile.
#
# Regarding individual entries:
#
# 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 judgess 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.
#
# See: http://creativecommons.org/licenses/by-sa/3.0/
################
# tool locations # tool locations
################
# #
SHELL= /bin/sh SHELL= /bin/bash
CP= cp
CPP= cpp
GUNZIP= gunzip
LD= ld
MAKE= make MAKE= make
RM= rm
SED= sed
TAR= tar
TRUE= true
# Special flags for the gavin entry ###############
# IOCCC winners
###############
# #
# FYI: Older versions of GCC have a bug in -O2 optimization, hence -O1 WINNERS= anonymous arachnid burley gavare gavin hibachi hoyle jdalbec kopczynski \
newbern omoikane schnitzi sds vik1 vik2
YEAR= 2004
###################
# build all entries
###################
# #
GAVIN_OPT= -O1 all:
GAVIN_FLAGS=\ @echo '=-=-= ${YEAR} begin make $@ =-=-='
'-DY(m)=*((int*)(m))'\ @echo
'-DE(f,a,b,c)=((G((*)))(f))(a,b,c)'\ @for i in ${WINNERS} ; do \
'-DM=for(D=0;D<786432;D++)'\ echo "=-= start ${YEAR}/$$i =-="; \
'-DZ=int i=0,j=0,h,n,p=393728,s=26739,C,D'\ echo "(cd $$i && $(MAKE) $@)"; \
'-DV=0x90200'\ (cd $$i && $(MAKE) $@); \
'-DK=0'\ echo "=-= end ${YEAR}/$$i =-="; \
'-DR=while((C=E(V-8,100,0,0))&3&&(D=E(V-8,96,0,0))|3){'\ echo; \
'-DL(c,d)=E(V+8,100,c,0);R}E(V+8,96,d,0);R}' 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
# Set X11_LIBDIR to the directory where the X11 library resides # alternative executable
# #
X11_LIBDIR= /usr/X11R6/lib alt:
@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 $@ =-=-='
# data files
# optimization
# #
# Most compiles will safely use -O2. Some can use only -O1 or -O. data:
# A few compilers have broken optimizers and thus you may @echo '=-=-= ${YEAR} begin make $@ =-=-='
# not want anything. @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
# #
#OPT= everything:
#OPT= -O @echo '=-=-= ${YEAR} begin make $@ =-=-='
#OPT= -O1 @echo
OPT= -O2 @for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
# flags for ANSI compiles (cd $$i && $(MAKE) $@); \
# echo "=-= end ${YEAR}/$$i =-="; \
# NOTE: Some ANSI compilers make use of -Xa to turn on ANSI mode, echo; \
# others such as gcc may want -ansi, others (Compaq Tru64 Unix) done
# want -std1, and others may want nothing at all. @echo '=-=-= ${YEAR} complete make $@ =-=-='
# Adjust the CFLAGS line as needed.
#
# NOTE: Some compilers cannot optimize, or optimize some entries ###############
# incorrectly. You might want to turn on -O to see if your
# compiler can handle them.
#
#
#CFLAGS= -Xa ${OPT}
#CFLAGS= -std1 $(OPT)
CFLAGS= -ansi ${OPT}
# 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
MAY_NEED_GCC= gcc
# 2004 winners
#
WINNERS= anonymous arachnid burley gavare gavin hibachi hoyle jdalbec \
kopczynski newbern omoikane schnitzi sds vik1 vik2
CLEAN= anonymous_clean arachnid_clean burley_clean gavare_clean gavin_clean \
hibachi_clean hoyle_clean jdalbec_clean kopczynski_clean \
newbern_clean omoikane_clean schnitzi_clean sds_clean vik1_clean \
vik2_clean
CLOBBER= anonymous_clobber arachnid_clobber burley_clobber gavare_clobber \
gavin_clobber hibachi_clobber hoyle_clobber jdalbec_clobber \
kopczynski_clobber newbern_clobber omoikane_clobber schnitzi_clobber \
sds_clobber vik1_clobber vik2_clobber
ALT_NAMES= hoyle.orig kopczynski.orig
DATA_FILES= arachnid_files gavin_files hibachi_files kopczynski_files \
newbern_files omoikane_files schnitzi_files
# default build
#
all: ${WINNERS}
# Best use of "Precious" Lines
#
anonymous: anonymous.c
${CC} anonymous.c -o anonymous
anonymous_clean:
${RM} -f anonymous.o
anonymous_clobber: anonymous_clean
${RM} -f anonymous
# Best use of Vision
#
arachnid: arachnid.c
${CC} -o arachnid -DL=LINES -DS=COLS \
-DW=mvwaddch\(w,v,u,acs_map\[l\[m\[u arachnid.c -lncurses
arachnid_clean:
${RM} -f arachnid.o
arachnid_clobber: arachnid_clean
${RM} -f arachnid
arachnid_files: arachnid.info
# Best Calculated Risk
#
burley: burley.c
${CC} -ansi burley.c -o burley
burley_clean:
${RM} -f burley.o
burley_clobber: burley_clean
${RM} -f burley
# Best Use of Light and Spheres
#
gavare: gavare.c
${CC} -O3 gavare.c -o gavare
gavare_clean:
${RM} -f gavare.o
gavare_clobber: gavare_clean
${RM} -f gavare
# Best of Show
#
gavin: gavin.c
${CC} ${GAVIN_OPT} -o gavin ${GAVIN_FLAGS} gavin.c
${RM} -f kernel
./gavin > kernel
${CC} ${GAVIN_OPT} -c ${GAVIN_FLAGS} -DB=_start '-Dputchar(a)=' gavin.c
${RM} -f sh
${LD} -s -o sh gavin.o
${RM} -f vi
${CP} sh vi
${RM} -f fs.tar
${TAR} -cvf fs.tar sh vi gavin.c gavin.hint prim
gavin_clean:
${RM} -f sh vi kernel gavin.o
gavin_clobber: gavin_clean
${RM} -f gavin fs.tar
gavin_files: boot.b lilo.conf prim gavin_install.txt
# Best Abuse of the Guidelines
#
hibachi: hibachi.tar.gz
${RM} -f hibachi.tar
${GUNZIP} < hibachi.tar.gz > hibachi.tar
${TAR} -xvf hibachi.tar
${RM} -f hibachi.tar
(cd hibachi && ${SHELL} ./configure)
([ -f hibachi/makefile ] && cd hibachi && $(MAKE) -f makefile || true)
hibachi_clean:
${RM} -f hibachi/hibachi.o hibachi.tar
hibachi_clobber: hibachi_clean
${RM} -rf hibachi
hibachi_files: hibachi.tar.gz
# Most Functional Output
#
hoyle: hoyle.c
${CC} hoyle.c -o hoyle -lm
hoyle.orig: hoyle.orig.c
${CC} hoyle.orig.c -o hoyle.orig -lm
hoyle_clean:
${RM} -f hoyle.o hoyle.orig.o
hoyle_clobber: hoyle_clean
${RM} -f hoyle hoyle.orig
# Best Abuse of the Periodic Table
#
jdalbec: jdalbec.c
@${RM} -f jdalbec2.c
-${CC} -E jdalbec.c > jdalbec2.c
@${RM} -f jdalbec3.c
${SED} -e 's/ (/(/g' < jdalbec2.c > jdalbec3.c
${CC} -ansi jdalbec3.c -o jdalbec
jdalbec_clean:
${RM} -f jdalbec2.c jdalbec3.c jdalbec.o
jdalbec_clobber: jdalbec_clean
${RM} -f jdalbec
# Best one-liner
#
kopczynski: kopczynski.c
${CC} -Dif=while kopczynski.c -o kopczynski
kopczynski.orig: kopczynski.orig.c
${CC} -Dif=while kopczynski.orig.c -o kopczynski.orig
kopczynski_clean:
${RM} -f kopczynski.o kopczynski.orig.o
kopczynski_clobber: kopczynski_clean
${RM} -f kopczynski kopczynski.orig
kopczynski_files: kopczynski-10 kopczynski-11 kopczynski-8a kopczynski-8b \
kopczynski-8c kopczynski-9
# Best Font Engine
#
newbern: newbern.c
${CC} newbern.c -o newbern
newbern_clean:
${RM} -f newbern.o
newbern_clobber: newbern_clean
${RM} -f newbern
newbern_files: newbern.dat
# Best Utility
#
omoikane: omoikane.c
${CC} -O omoikane.c -o omoikane
omoikane_clean:
${RM} -f omoikane.o
omoikane_clobber: omoikane_clean
${RM} -f omoikane
omoikane_files: omoikane.info
# Best Non-Use of Curses
#
schnitzi: schnitzi.c
${CC} schnitzi.c -o schnitzi
schnitzi_clean:
${RM} -f schnitzi.o
schnitzi_clobber: schnitzi_clean
${RM} -f schnitzi
schnitzi_files: schnitzi.inp0 schnitzi.inp1
# Best Abuse of Indentation
#
sds: sds.c
${CC} -o sds sds.c
sds_clean:
${RM} -f sds_encoder.c sds_encoder.o sds.o
sds_clobber: sds_clean
${RM} -f sds sds_encoder
# Best X11 Game
#
vik1: vik1.c
${CC} -ansi -O2 -o vik1 vik1.c -L${X11_LIBDIR} -lX11
vik1_clean:
${RM} -f vik1.o
vik1_clobber: vik1_clean
${RM} -f vik1
# Best Abuse of CPP
#
vik2: vik2.c
@${RM} -f vik2_1.c
${CC} -E '-DSTOP=_5' '-DFNAME="vik2_1.c"' vik2.c > vik2_1.c
@${RM} -f vik2_2.c
${CC} -E vik2_1.c > vik2_2.c
${CC} -O vik2_2.c -o vik2
vik2_clean:
${RM} -f vik2_1.c vik2_2.c vik2.o
vik2_clobber: vik2_clean
${RM} -f vik2
# utility rules # utility rules
###############
# #
everything: ${WINNERS} ${ALT_NAMES} ${DATA_FILES} clean:
@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 $@ =-=-='
clobber:
@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 $@ =-=-='
install:
@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 $@ =-=-='
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 $@ =-=-='
##################
# 133t hacker rulz
##################
#
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 $@ =-=-='
clean: ${CLEAN} maker:
${RM} -f a.out core @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 $@ =-=-='
clobber: ${CLOBBER} easter_egg:
${RM} -f ${WINNERS} @echo '=-=-= ${YEAR} begin make $@ =-=-='
${RM} -f ${ALT_NAMES} @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 $@ =-=-='
nuke: clobber sandwich:
@${TRUE} @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 $@ =-=-='
install: all
${CAT} ${WINNERS} ${ALT_NAMES} > /dev/null # The IOCCC resident astronomer states
#
supernova:
@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 $@ =-=-='
deep_magic:
@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 $@ =-=-='
magic:
@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 $@ =-=-='
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 $@ =-=-='