use include 1337.mk to hold 1337 hacker rulz

Updated 1337 hacker rulz to version 7.

Added `1337.mk` to contain the updated 1337 hacker rulz (v7).

We use an optional include of `1337.mk` (or `../1337.mk`,
or `../../1337.mk`) to include the 1337 hacker rulz.

Changed `make deep_magic` to `make more_magic`.

Changed `bin/tar-entry.sh` VERSION from "1.3.7 2024-07-22"
to "1.3.8 2024-07-23".

Changed `bin/tar-year.sh` VERSION from "1.2.5 2024-07-22"
to "1.2.6 2024-07-23".

Add `make new_entry` to `YYYY/Makefile` and `template/Makefile.year`.

Change `make new_year` to use `sort -n -u`.

Made minor debug message fixes to `bin/new-year.sh`.

Changed `bin/new-year.sh` VERSION from "1.3 2024-07-23"
to "1.3.1 2024-07-23".

Improved `bin/add-dir.sh` to update `YYYY/Makefile` with
the new entry directory name.

Changed `bin/add-dir.sh` VERSION from "1.0 2024-07-21"
to "1.1 2024-07-23".

Performed `make www` to accomplish the above and to test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-07-23 22:45:16 -07:00
1 parent 16c33c5f2f
commit dbf6921b3a
355 files changed
+2153 -24306

No files matched your search

+215
View File
@@ -0,0 +1,215 @@
#!/usr/bin/env make
#
# prog - an example Makefile <<=== change "an example Makefile" to a suitable title for entry
#
# Please copy this file into your entry directory under the name: Makefile
# Modify the resulting Makefile as needed.
#############################
# shell used by this Makefile
#############################
#
SHELL= bash
#######################
# common tool locations
#######################
#
CC= cc
GINDENT= gindent
MV= mv
RM= rm
TRUE= true
# Common C compiler warnings to silence
#
# Example: CSILENCE= -Wno-some-thing -Wno-another-thing
#
# NOTE: If you add -Wno-stuff to CSILENCE, please update
# CUNKNOWN in the next comment block.
#
# NOTE: Please don't add -Wno-unknown-warning-option to CSILENCE.
#
#
CSILENCE=
# Attempt to silence unknown warnings
#
# If you add -Wno-stuff to CSILENCE, then please change CUNKNOWN to read:
#
# CUNKNOWN= -Wno-unknown-warning-option
#
CUNKNOWN=
# Common C compiler warning flags
#
CWARN= -Wall -Wextra -pedantic ${CSILENCE} ${CUNKNOWN}
# The standard to compile against
#
# Your IOCCC submission is free to require older C standards, or
# even not specify a C standard at all. We suggest trying
# for -std=gnu17, but that is not a requirement and you won't
# be penalized if you name CSTD empty or use another
# well known and reasonably widely implemented C standard.
#
CSTD= -std=gnu17
# Compiler bit architecture
#
# Example for 32-bitness: ARCH= -m32
# Example for 64-bitness: ARCH= -m64
#
# NOTE: Normally one should not specify a specific architecture.
#
ARCH=
# Defines that are needed to compile
#
# Example: -Dfoo -Dbar=baz
#
CDEFINE=
# Include files that are needed to compile
#
# Example: CINCLUDE= -include stdio.h
#
CINCLUDE=
# Other flags to pass to the C compiler
#
# Example: COTHER= -fno-math-errno
#
COTHER=
# Optimization
#
OPT= -O3 -g3
# Default flags for ANSI C compilation
#
CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${COTHER} ${OPT}
# Libraries needed to build
#
LDFLAGS=
# C compiler to use
#
CC= cc
# Compiler add-ons or replacements for clang only
#
ifeq "$(findstring $(CLANG),${CC})" "$(CLANG)"
#
CSILENCE+=
#
CWARN+= -Weverything
#
endif
# Specific add-ons or replacements for gcc only
#
ifeq "$(findstring $(GCC),${CC})" "$(GCC)"
#
CSILENCE+=
#
CWARN+=
#
endif
###########################################
# Special Makefile variables for this entry
###########################################
# what to build
#
PROG= prog
OBJ= ${PROG}.o
TARGET= ${PROG}
# list any data files supplied with the submission
#
DATA=
#################
# build the entry
#################
#
all: data ${TARGET}
@${TRUE}
.PHONY: all data try clean clobber install
# how to compile
#
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
# data files
#
data: ${DATA}
@${TRUE}
# one suggested way to run the program
#
try: ${PROG} ${DATA}
@# remove these comments
@# notice how we do not assume that . is a component of the $PATH environment variable
@# change this next line as needed
./${PROG} some arguments
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ}
@-if [[ -f indent.c ]]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET}
@-if [[ -e sandwich ]]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
# Do not install prog, please!
#
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
# optional include of 1337 hacker rulz
######################################
-include 1337.mk ../1337.mk ../../1337.mk