Make puzzles first class categories

This commit is contained in:
Neale Pickett 2010-10-21 22:15:18 -06:00
parent 7fba5155b1
commit 637545aa9a
530 changed files with 194 additions and 191 deletions

View File

@ -1,21 +1,6 @@
PACKAGES = BUILD = build
BIN = bin
all: packages all: packages
define COPYTREE include packages/packages.mk
mkdir -p $(2)
(cd $(1) && find . -not -name "*~" | cpio -o) | (cd $(2) && cpio -i)
endef
include */*.mk
packages: $(addsuffix .pkg, $(PACKAGES))
install: $(addsuffix -install, $(PACKAGES))
clean: $(addsuffix -clean, $(PACKAGES))
rm -rf build *.pkg *-install *-build
%.pkg: %-install
mksquashfs build/$* $*.pkg -all-root -noappend

View File

@ -1,21 +0,0 @@
LOGGER_PKGDIR = build/logger
LOGGER_PACKAGE = logger.pkg
logger-install: logger-build
mkdir -p $(LOGGER_PKGDIR)
mkdir -p $(LOGGER_PKGDIR)/bin/
$(MAKE) -C logger/src install DESTDIR=$(CURDIR)/$(LOGGER_PKGDIR)
$(call COPYTREE, logger/tokens, $(LOGGER_PKGDIR)/tokens)
$(call COPYTREE, logger/service, $(LOGGER_PKGDIR)/service)
logger-clean:
rm -rf $(LOGGER_PKGDIR) $(LOGGER_PACKAGE)
$(MAKE) -C logger/src clean
logger-build:
$(MAKE) -C logger/src build
PACKAGES += logger

View File

@ -1 +0,0 @@
../../common/token.c

View File

@ -1 +0,0 @@
../../common/token.h

View File

@ -1,33 +0,0 @@
MCP_PKGDIR = build/mcp
MCP_PACKAGE = mcp.pkg
mcp-install: mcp-build
mkdir -p $(MCP_PKGDIR)
$(call COPYTREE, mcp/bin, $(MCP_PKGDIR)/bin)
cp mcp/src/in.tokend $(MCP_PKGDIR)/bin/
cp mcp/src/tokencli $(MCP_PKGDIR)/bin/
cp mcp/src/tokencli $(MCP_PKGDIR)/bin/
cp mcp/src/puzzles.cgi $(MCP_PKGDIR)/bin/
$(call COPYTREE, mcp/service, $(MCP_PKGDIR)/service)
$(call COPYTREE, mcp/tokend.keys, $(MCP_PKGDIR)/tokend.keys)
$(call COPYTREE, mcp/www, $(MCP_PKGDIR)/www)
cp mcp/src/puzzler.cgi $(MCP_PKGDIR)/www/
cp mcp/src/claim.cgi $(MCP_PKGDIR)/www/
touch $@
mcp-test: mcp-build
mcp/test.sh
mcp-clean:
rm -rf $(MCP_PKGDIR) $(MCP_PACKAGE) mcp-install
$(MAKE) -C mcp/src clean
mcp-build:
$(MAKE) -C mcp/src build
PACKAGES += mcp

View File

@ -1 +0,0 @@
../../common/arc4.c

View File

@ -1 +0,0 @@
../../common/arc4.h

View File

@ -1,20 +0,0 @@
OCTOPUS_PKGDIR = build/octopus
OCTOPUS_PACKAGE = octopus.pkg
octopus-install: octopus-build
mkdir -p $(OCTOPUS_PKGDIR)/bin/
$(call COPYTREE, octopus/service, $(OCTOPUS_PKGDIR)/service)
$(call COPYTREE, octopus/tokens, $(OCTOPUS_PKGDIR)/tokens)
cp octopus/src/octopus $(OCTOPUS_PKGDIR)/bin/
octopus-clean:
rm -rf $(OCTOPUS_PKGDIR) $(OCTOPUS_PACKAGE)
$(MAKE) -C octopus/src clean
octopus-build:
$(MAKE) -C octopus/src build
PACKAGES += octopus

View File

@ -1 +0,0 @@
../../common/token.c

View File

@ -1 +0,0 @@
../../common/token.h

View File

@ -0,0 +1 @@
$(eval $(call STANDARD_PUZZLE, basemath))

View File

Before

Width:  |  Height:  |  Size: 87 B

After

Width:  |  Height:  |  Size: 87 B

View File

@ -0,0 +1 @@
$(eval $(call STANDARD_PUZZLE, bletchley))

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -0,0 +1 @@
$(eval $(call STANDARD_PUZZLE, codebreaking))

View File

@ -0,0 +1 @@
$(eval $(call STANDARD_PUZZLE, compaq))

Some files were not shown because too many files have changed in this diff Show More