mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 05:05:20 -05:00
puzzles: refactor and resync with upstream
This brings puzzles up-to-date with upstream revision 2d333750272c3967cfd5cd3677572cddeaad5932, though certain changes made by me, including cursor-only Untangle and some compilation fixes remain. Upstream code has been moved to its separate subdirectory and future syncs can be done by simply copying over the new sources. Change-Id: Ia6506ca5f78c3627165ea6791d38db414ace0804
This commit is contained in:
parent
03dd4b92be
commit
881746789a
329 changed files with 27350 additions and 1043 deletions
194
apps/plugins/puzzles/src/Buildscr
Normal file
194
apps/plugins/puzzles/src/Buildscr
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
# -*- sh -*-
|
||||
# Build script to build Puzzles.
|
||||
|
||||
module puzzles
|
||||
|
||||
set Version $(!builddate).$(vcsid)
|
||||
|
||||
# Start by substituting the right version number in configure.ac.
|
||||
in puzzles do perl -i~ -pe 's/6.66/$(Version)/' configure.ac
|
||||
in puzzles do rm configure.ac~
|
||||
|
||||
# And put it into the documentation as a versionid.
|
||||
# use perl to avoid inconsistent behaviour of echo '\v'
|
||||
in puzzles do perl -e 'print "\n\\versionid Simon Tatham'\''s Portable Puzzle Collection, version $$ARGV[0]\n"' $(Version) >> puzzles.but
|
||||
in puzzles do perl -e 'print "\n\\versionid Simon Tatham'\''s Portable Puzzle Collection, version $$ARGV[0]\n"' $(Version) >> devel.but
|
||||
|
||||
# Write out a version.h that contains the real version number.
|
||||
in puzzles do echo '/* Generated by automated build script */' > version.h
|
||||
in puzzles do echo '$#define VER "Version $(Version)"' >> version.h
|
||||
|
||||
# And do the same substitution in the OS X metadata. (This is a bit
|
||||
# icky in principle because it presumes that my version numbers don't
|
||||
# need XML escaping, but frankly, if they ever do then I should fix
|
||||
# them!)
|
||||
in puzzles do perl -i -pe 's/Unidentified build/$(Version)/' osx-info.plist
|
||||
|
||||
# First build some local binaries, to run the icon build.
|
||||
in puzzles do perl mkfiles.pl -U
|
||||
in puzzles do make
|
||||
|
||||
# Now build the screenshots and icons.
|
||||
in puzzles/icons do xvfb-run -s "-screen 0 1024x768x24" make web winicons gtkicons
|
||||
|
||||
# Destroy the local binaries and autoconf detritus, mostly to avoid
|
||||
# wasting network bandwidth by transferring them to the delegate
|
||||
# servers.
|
||||
in puzzles do make distclean
|
||||
|
||||
# Re-run mkfiles.pl now that it knows the icons are there.
|
||||
in puzzles do perl mkfiles.pl
|
||||
|
||||
# Rebuild the configure script.
|
||||
in puzzles do ./mkauto.sh
|
||||
|
||||
# Build the OS X .dmg archive.
|
||||
delegate osx
|
||||
in puzzles do make -f Makefile.osx clean
|
||||
in puzzles do make -f Makefile.osx release VER=-DVER=$(Version)
|
||||
return puzzles/Puzzles.dmg
|
||||
enddelegate
|
||||
|
||||
# Build the Windows binaries and installer, and the CHM file.
|
||||
in puzzles do make -f Makefile.doc clean
|
||||
in puzzles do make -f Makefile.doc chm
|
||||
in puzzles do make -f Makefile.doc # build help file for installer
|
||||
in puzzles do mason.pl --args '{"version":"$(Version)","descfile":"gamedesc.txt"}' winwix.mc > puzzles.wxs
|
||||
in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss
|
||||
delegate windows
|
||||
# Ignore the poorly controlled return value from HHC, and instead
|
||||
# just test that the output file was generated.
|
||||
in puzzles with htmlhelp do/win hhc puzzles.hhp & type puzzles.chm >nul
|
||||
# FIXME: Cygwin alternative?
|
||||
in puzzles with visualstudio do/win nmake -f Makefile.vc clean
|
||||
in puzzles with visualstudio do/win nmake -f Makefile.vc VER=-DVER=$(Version)
|
||||
# Code-sign the binaries, if the local bob config provides a script
|
||||
# to do so. We assume here that the script accepts an -i option to
|
||||
# provide a 'more info' URL, and an optional -n option to provide a
|
||||
# program name, and that it can take multiple .exe filename
|
||||
# arguments and sign them all in place.
|
||||
ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ *.exe
|
||||
# Build installers.
|
||||
in puzzles with wix do/win candle puzzles.wxs && light -ext WixUIExtension -sval puzzles.wixobj
|
||||
in puzzles with innosetup do/win iscc puzzles.iss
|
||||
ifneq "$(winsigncode)" "" in puzzles do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/puzzles/ -n "Simon Tatham's Portable Puzzle Collection Installer" puzzles.msi Output/installer.exe
|
||||
return puzzles/puzzles.chm
|
||||
return puzzles/*.exe
|
||||
return puzzles/Output/installer.exe
|
||||
return puzzles/puzzles.msi
|
||||
enddelegate
|
||||
in puzzles do chmod +x *.exe
|
||||
|
||||
# Build the Pocket PC binaries and CAB.
|
||||
#
|
||||
# NOTE: This part of the build script requires the Windows delegate
|
||||
# server to have the cabwiz program on its PATH. This will
|
||||
# typically be at
|
||||
#
|
||||
# C:\Program Files\Windows CE Tools\WCE420\POCKET PC 2003\Tools
|
||||
#
|
||||
# but it might not be if you've installed it somewhere else, or
|
||||
# have a different version.
|
||||
#
|
||||
# NOTE ALSO: This part of the build is commented out, for the
|
||||
# moment, because cabwiz does unhelpful things when run from within
|
||||
# a bob delegate process (or, more generally, when run from any
|
||||
# terminal-based remote login to a Windows machine, including
|
||||
# Cygwin opensshd and Windows Telnet). The symptom is that cabwiz
|
||||
# just beeps and sits there. Until I figure out how to build the
|
||||
# .cab from an automated process (and I'm willing to consider silly
|
||||
# approaches such as a third-party CAB generator), I don't think I
|
||||
# can sensibly enable this build.
|
||||
|
||||
#in puzzles do perl wceinf.pl gamedesc.txt > puzzles.inf
|
||||
#delegate windows
|
||||
# in puzzles do cmd /c 'wcearmv4 & nmake -f Makefile.wce clean'
|
||||
# in puzzles do cmd /c 'wcearmv4 & nmake -f Makefile.wce VER=-DVER=$(Version)'
|
||||
# # Nasty piece of sh here which saves the return code from cabwiz,
|
||||
# # outputs its errors and/or warnings, and then propagates the
|
||||
# # return code back to bob. If only cabwiz could output to
|
||||
# # standard error LIKE EVERY OTHER COMMAND-LINE UTILITY IN THE
|
||||
# # WORLD, I wouldn't have to do this.
|
||||
# in puzzles do cat puzzles.inf
|
||||
# in puzzles do cmd /c 'wcearmv4 & bash -c cabwiz puzzles.inf /err cabwiz.err /cpu ARMV4'; a=$$?; cat cabwiz.err; exit $$a
|
||||
# return puzzles/puzzles.armv4.cab
|
||||
#enddelegate
|
||||
|
||||
# Build the help file and the HTML docs.
|
||||
in puzzles do make -f Makefile.doc clean # remove CHM-target HTML
|
||||
in puzzles do make -f Makefile.doc # and rebuild help file...
|
||||
in puzzles do mkdir doc
|
||||
in puzzles do mkdir devel
|
||||
in puzzles/doc do halibut --html -Chtml-contents-filename:index.html -Chtml-index-filename:indexpage.html -Chtml-template-filename:%k.html -Chtml-template-fragment:%k ../puzzles.but
|
||||
in puzzles/devel do halibut --html -Chtml-contents-filename:index.html -Chtml-index-filename:indexpage.html -Chtml-template-filename:%k.html -Chtml-template-fragment:%k ../devel.but
|
||||
|
||||
# Move the deliver-worthy Windows binaries (those specified in
|
||||
# gamedesc.txt, which is generated by mkfiles.pl and helpfully
|
||||
# excludes the command-line auxiliary utilities such as solosolver,
|
||||
# and nullgame.exe) into a subdirectory for easy access.
|
||||
in puzzles do mkdir winbin
|
||||
in puzzles do mv `cut -f2 -d: gamedesc.txt` winbin
|
||||
|
||||
# Make a zip file of the Windows binaries and help files.
|
||||
in puzzles do zip -j puzzles.zip winbin/*.exe puzzles.chm puzzles.hlp puzzles.cnt
|
||||
|
||||
# Create the source archive. (That writes the archive into the
|
||||
# _parent_ directory, so be careful when we deliver it.)
|
||||
in puzzles do ./makedist.sh $(Version)
|
||||
|
||||
# Build the autogenerated pieces of the main web page.
|
||||
in puzzles do perl webpage.pl
|
||||
|
||||
ifneq "$(JAVA_UNFINISHED)" "" in puzzles do perl -i~ -pe 'print "!srcdir unfinished/\n" if /!srcdir icons/' Recipe
|
||||
ifneq "$(JAVA_UNFINISHED)" "" in puzzles do ln -s unfinished/group.R .
|
||||
ifneq "$(JAVA_UNFINISHED)" "" in puzzles do perl mkfiles.pl
|
||||
|
||||
# Build the Java applets.
|
||||
delegate nestedvm
|
||||
in puzzles do make -f Makefile.nestedvm NESTEDVM="$$NESTEDVM" VER=-DVER=$(Version)
|
||||
return puzzles/*.jar
|
||||
enddelegate
|
||||
|
||||
# Build the Javascript applets. Since my master build machine doesn't
|
||||
# have the right dependencies installed for Emscripten, I do this by a
|
||||
# delegation.
|
||||
in puzzles do mkdir js # so we can tell output .js files from emcc*.js
|
||||
delegate emscripten
|
||||
in puzzles do make -f Makefile.emcc OUTPREFIX=js/ clean
|
||||
in puzzles do make -f Makefile.emcc OUTPREFIX=js/
|
||||
return puzzles/js/*.js
|
||||
enddelegate
|
||||
|
||||
# Set up .htaccess containing a redirect for the archive filename.
|
||||
in puzzles do echo "AddType application/octet-stream .chm" > .htaccess
|
||||
in puzzles do echo "AddType application/octet-stream .hlp" >> .htaccess
|
||||
in puzzles do echo "AddType application/octet-stream .cnt" >> .htaccess
|
||||
in . do set -- puzzles*.tar.gz; echo RedirectMatch temp '(.*/)'puzzles.tar.gz '$$1'"$$1" >> puzzles/.htaccess
|
||||
in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.msi '$$1'puzzles-$(Version)-installer.msi >> .htaccess
|
||||
in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.exe '$$1'puzzles-$(Version)-installer.exe >> .htaccess
|
||||
|
||||
# Phew, we're done. Deliver everything!
|
||||
deliver puzzles/icons/*-web.png $@
|
||||
deliver puzzles/winbin/*.exe $@
|
||||
deliver puzzles/.htaccess $@
|
||||
deliver puzzles/doc/*.html doc/$@
|
||||
deliver puzzles/devel/*.html devel/$@
|
||||
deliver puzzles/Puzzles.dmg $@
|
||||
deliver puzzles/puzzles.chm $@
|
||||
deliver puzzles/puzzles.hlp $@
|
||||
deliver puzzles/puzzles.cnt $@
|
||||
deliver puzzles/puzzles.zip $@
|
||||
deliver puzzles/puzzles.msi puzzles-$(Version)-installer.msi
|
||||
deliver puzzles/Output/installer.exe puzzles-$(Version)-installer.exe
|
||||
deliver puzzles/*.jar java/$@
|
||||
deliver puzzles/js/*.js js/$@
|
||||
deliver puzzles/html/*.html html/$@
|
||||
deliver puzzles/html/*.pl html/$@
|
||||
deliver puzzles/wwwspans.html $@
|
||||
deliver puzzles/wwwlinks.html $@
|
||||
|
||||
# deliver puzzles/puzzles.armv4.cab $@ # (not built at the moment)
|
||||
|
||||
# This one isn't in the puzzles subdir, because makedist.sh left it
|
||||
# one level up.
|
||||
deliver puzzles*.tar.gz $@
|
||||
70
apps/plugins/puzzles/src/CHECKLST.txt
Normal file
70
apps/plugins/puzzles/src/CHECKLST.txt
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
Useful checklists
|
||||
=================
|
||||
|
||||
Things to remember when adding a new puzzle
|
||||
-------------------------------------------
|
||||
|
||||
Write the source file for the new puzzle (duhh).
|
||||
|
||||
Create a .R file for it which:
|
||||
- defines a <puzzle>_EXTRA symbol for it if it requires auxiliary
|
||||
object files (make sure that symbol doesn't contain the icon)
|
||||
- adds it to the `ALL' definition, to ensure it is compiled into
|
||||
the OS X binary
|
||||
- adds it as a GTK build target, with the optional GTK icon
|
||||
- adds it as a Windows build target, with the optional resource
|
||||
file
|
||||
- adds auxiliary solver binaries if any
|
||||
- adds it to $(GAMES) in both the automake and GTK makefiles, for
|
||||
`make install'
|
||||
- adds it to list.c for the OS X binary
|
||||
- adds it to gamedesc.txt, with its Windows executable name, display
|
||||
name, and slightly longer description.
|
||||
|
||||
If the puzzle is by a new author, modify the copyright notice in
|
||||
LICENCE and in puzzles.but. (Also in index.html, but that's listed
|
||||
below under website changes.)
|
||||
|
||||
Double-check that the game structure name in the source file has
|
||||
been renamed from `nullgame', so that it'll work on OS X. Actually
|
||||
compiling it on OS X would be a good way to check this, if
|
||||
convenient.
|
||||
|
||||
Add a documentation section in puzzles.but.
|
||||
|
||||
Make sure there's a Windows help topic name defined in puzzles.but,
|
||||
and that it's referenced by the help topic field in the game
|
||||
structure in the source file.
|
||||
|
||||
Check that REQUIRE_RBUTTON and/or REQUIRE_NUMPAD are set as
|
||||
appropriate.
|
||||
|
||||
Add the new Unix binary name, and the names of any auxiliary solver
|
||||
binaries, to .gitignore.
|
||||
|
||||
Write an instructions fragment for the webified puzzle pages, as
|
||||
html/<puzzlename>.html .
|
||||
|
||||
Make a screenshot:
|
||||
- create an appropriate save file in `icons'
|
||||
- add the puzzle name to icons/Makefile
|
||||
- set up a REDO property in icons/Makefile if the screenshot wants
|
||||
to display a move halfway through an animation
|
||||
- set up a CROP property in icons/Makefile if the icon wants to be
|
||||
a sub-rectangle of the whole screenshot
|
||||
|
||||
Don't forget to `git add' the new source file, the new .R file and the
|
||||
save file in `icons', the new .html file, and any other new files that
|
||||
might have been involved.
|
||||
|
||||
Check in!
|
||||
|
||||
Put the puzzle on the web:
|
||||
- run puzzlesnap.sh
|
||||
- adjust the copyright in index-mid.html if the puzzle is by a new
|
||||
author
|
||||
- check that the new puzzle has appeared on the staging web page
|
||||
- test both Windows binary links, the docs link, the Javascript
|
||||
version and the Java version
|
||||
- run webupdate
|
||||
- test all those things once more on the live website
|
||||
25
apps/plugins/puzzles/src/LICENCE
Normal file
25
apps/plugins/puzzles/src/LICENCE
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
This software is copyright (c) 2004-2014 Simon Tatham.
|
||||
|
||||
Portions copyright Richard Boulton, James Harvey, Mike Pinna, Jonas
|
||||
Kölker, Dariusz Olszewski, Michael Schierl, Lambros Lambrou, Bernd
|
||||
Schmidt, Steffen Bauer, Lennard Sprong and Rogier Goossens.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation files
|
||||
(the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge,
|
||||
publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
||||
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
||||
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
727
apps/plugins/puzzles/src/Makefile
Normal file
727
apps/plugins/puzzles/src/Makefile
Normal file
|
|
@ -0,0 +1,727 @@
|
|||
# Makefile for puzzles under X/GTK and Unix.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
|
||||
# You can define this path to point at your tools if you need to
|
||||
# TOOLPATH = /opt/gcc/bin
|
||||
CC := $(TOOLPATH)$(CC)
|
||||
# You can manually set this to `gtk-config' or `pkg-config gtk+-1.2'
|
||||
# (depending on what works on your system) if you want to enforce
|
||||
# building with GTK 1.2, or you can set it to `pkg-config gtk+-2.0'
|
||||
# if you want to enforce 2.0. The default is to try 2.0 and fall back
|
||||
# to 1.2 if it isn't found.
|
||||
GTK_CONFIG = sh -c 'pkg-config gtk+-2.0 $$0 2>/dev/null || gtk-config $$0'
|
||||
|
||||
CFLAGS := -O2 -Wall -ansi -pedantic -g -I./ -Iicons/ `$(GTK_CONFIG) \
|
||||
--cflags` $(CFLAGS)
|
||||
XLIBS = `$(GTK_CONFIG) --libs` -lm
|
||||
ULIBS = -lm#
|
||||
INSTALL=install
|
||||
INSTALL_PROGRAM=$(INSTALL)
|
||||
INSTALL_DATA=$(INSTALL)
|
||||
prefix=/usr/local
|
||||
exec_prefix=$(prefix)
|
||||
bindir=$(exec_prefix)/bin
|
||||
gamesdir=$(exec_prefix)/games
|
||||
mandir=$(prefix)/man
|
||||
man1dir=$(mandir)/man1
|
||||
|
||||
all: $(BINPREFIX)blackbox $(BINPREFIX)bridges $(BINPREFIX)cube \
|
||||
$(BINPREFIX)dominosa $(BINPREFIX)fifteen \
|
||||
$(BINPREFIX)fifteensolver $(BINPREFIX)filling \
|
||||
$(BINPREFIX)fillingsolver $(BINPREFIX)flip $(BINPREFIX)flood \
|
||||
$(BINPREFIX)galaxies $(BINPREFIX)galaxiespicture \
|
||||
$(BINPREFIX)galaxiessolver $(BINPREFIX)guess \
|
||||
$(BINPREFIX)inertia $(BINPREFIX)keen $(BINPREFIX)keensolver \
|
||||
$(BINPREFIX)latincheck $(BINPREFIX)lightup \
|
||||
$(BINPREFIX)lightupsolver $(BINPREFIX)loopy \
|
||||
$(BINPREFIX)loopysolver $(BINPREFIX)magnets \
|
||||
$(BINPREFIX)magnetssolver $(BINPREFIX)map \
|
||||
$(BINPREFIX)mapsolver $(BINPREFIX)mineobfusc \
|
||||
$(BINPREFIX)mines $(BINPREFIX)net $(BINPREFIX)netslide \
|
||||
$(BINPREFIX)nullgame $(BINPREFIX)obfusc $(BINPREFIX)palisade \
|
||||
$(BINPREFIX)pattern $(BINPREFIX)patternpicture \
|
||||
$(BINPREFIX)patternsolver $(BINPREFIX)pearl \
|
||||
$(BINPREFIX)pearlbench $(BINPREFIX)pegs $(BINPREFIX)range \
|
||||
$(BINPREFIX)rect $(BINPREFIX)samegame $(BINPREFIX)signpost \
|
||||
$(BINPREFIX)signpostsolver $(BINPREFIX)singles \
|
||||
$(BINPREFIX)singlessolver $(BINPREFIX)sixteen \
|
||||
$(BINPREFIX)slant $(BINPREFIX)slantsolver $(BINPREFIX)solo \
|
||||
$(BINPREFIX)solosolver $(BINPREFIX)tents \
|
||||
$(BINPREFIX)tentssolver $(BINPREFIX)towers \
|
||||
$(BINPREFIX)towerssolver $(BINPREFIX)tracks \
|
||||
$(BINPREFIX)twiddle $(BINPREFIX)undead $(BINPREFIX)unequal \
|
||||
$(BINPREFIX)unequalsolver $(BINPREFIX)unruly \
|
||||
$(BINPREFIX)unrulysolver $(BINPREFIX)untangle
|
||||
|
||||
$(BINPREFIX)blackbox: blackbox.o drawing.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ blackbox.o drawing.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)bridges: bridges.o drawing.o dsf.o findloop.o gtk.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ bridges.o drawing.o dsf.o findloop.o gtk.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)cube: cube.o drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ cube.o drawing.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)dominosa: dominosa.o drawing.o gtk.o laydomino.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ dominosa.o drawing.o gtk.o laydomino.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)fifteen: drawing.o fifteen.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o fifteen.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)fifteensolver: fifteen2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) -o $@ fifteen2.o malloc.o misc.o nullfe.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)filling: drawing.o dsf.o filling.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o filling.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)fillingsolver: dsf.o filling2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ dsf.o filling2.o malloc.o misc.o nullfe.o random.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)flip: drawing.o flip.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o flip.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)flood: drawing.o flood.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o flood.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)galaxies: drawing.o dsf.o galaxies.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o galaxies.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)galaxiespicture: dsf.o galaxie4.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ dsf.o galaxie4.o malloc.o misc.o nullfe.o random.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)galaxiessolver: dsf.o galaxie2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ dsf.o galaxie2.o malloc.o misc.o nullfe.o random.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)guess: drawing.o gtk.o guess.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o guess.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)inertia: drawing.o gtk.o inertia.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o inertia.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)keen: drawing.o dsf.o gtk.o keen.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o keen.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)keensolver: dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o \
|
||||
nullfe.o random.o tree234.o
|
||||
$(CC) -o $@ dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o \
|
||||
nullfe.o random.o tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)latincheck: latin8.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o
|
||||
$(CC) -o $@ latin8.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)lightup: combi.o drawing.o gtk.o lightup.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ combi.o drawing.o gtk.o lightup.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)lightupsolver: combi.o lightup2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ combi.o lightup2.o malloc.o misc.o nullfe.o random.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)loopy: drawing.o dsf.o grid.o gtk.o loopgen.o loopy.o malloc.o \
|
||||
midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o \
|
||||
tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o grid.o gtk.o loopgen.o loopy.o malloc.o \
|
||||
midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o \
|
||||
tree234.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)loopysolver: dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o \
|
||||
nullfe.o penrose.o random.o tree234.o
|
||||
$(CC) -o $@ dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o nullfe.o \
|
||||
penrose.o random.o tree234.o -lm $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)magnets: drawing.o gtk.o laydomino.o magnets.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o laydomino.o magnets.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)magnetssolver: laydomino.o magnets2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ laydomino.o magnets2.o malloc.o misc.o nullfe.o random.o \
|
||||
-lm $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)map: drawing.o dsf.o gtk.o malloc.o map.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o map.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)mapsolver: dsf.o malloc.o map2.o misc.o nullfe.o random.o
|
||||
$(CC) -o $@ dsf.o malloc.o map2.o misc.o nullfe.o random.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)mineobfusc: malloc.o mines2.o misc.o nullfe.o random.o tree234.o
|
||||
$(CC) -o $@ malloc.o mines2.o misc.o nullfe.o random.o tree234.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)mines: drawing.o gtk.o malloc.o midend.o mines.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o mines.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)net: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o misc.o \
|
||||
net.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o net.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)netslide: drawing.o gtk.o malloc.o midend.o misc.o netslide.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o netslide.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)nullgame: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
nullgame.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
nullgame.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)obfusc: malloc.o misc.o nullfe.o obfusc.o random.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o obfusc.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)palisade: divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o palisade.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o palisade.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)pattern: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
pattern.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
pattern.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)patternpicture: malloc.o misc.o nullfe.o pattern4.o random.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o pattern4.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)patternsolver: malloc.o misc.o nullfe.o pattern2.o random.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o pattern2.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)pearl: drawing.o dsf.o grid.o gtk.o loopgen.o malloc.o midend.o \
|
||||
misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o \
|
||||
tdq.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o grid.o gtk.o loopgen.o malloc.o midend.o \
|
||||
misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o \
|
||||
tdq.o tree234.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)pearlbench: dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o \
|
||||
pearl2.o penrose.o random.o tdq.o tree234.o
|
||||
$(CC) -o $@ dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o pearl2.o \
|
||||
penrose.o random.o tdq.o tree234.o -lm $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)pegs: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o pegs.o \
|
||||
printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
pegs.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)range: drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o range.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o range.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)rect: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o rect.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o rect.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)samegame: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o samegame.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o samegame.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)signpost: drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o signpost.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o signpost.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)signpostsolver: dsf.o malloc.o misc.o nullfe.o random.o \
|
||||
signpos2.o
|
||||
$(CC) -o $@ dsf.o malloc.o misc.o nullfe.o random.o signpos2.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)singles: drawing.o dsf.o gtk.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o singles.o \
|
||||
tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o singles.o \
|
||||
tree234.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)singlessolver: dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o singles3.o tree234.o
|
||||
$(CC) -o $@ dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o singles3.o tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)sixteen: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o sixteen.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o sixteen.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)slant: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o slant.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o slant.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)slantsolver: dsf.o findloop.o malloc.o misc.o nullfe.o random.o \
|
||||
slant2.o
|
||||
$(CC) -o $@ dsf.o findloop.o malloc.o misc.o nullfe.o random.o \
|
||||
slant2.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)solo: divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o solo.o version.o
|
||||
$(CC) -o $@ divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o solo.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)solosolver: divvy.o dsf.o malloc.o misc.o nullfe.o random.o \
|
||||
solo2.o
|
||||
$(CC) -o $@ divvy.o dsf.o malloc.o misc.o nullfe.o random.o solo2.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)tents: drawing.o dsf.o gtk.o malloc.o maxflow.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tents.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o maxflow.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tents.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)tentssolver: dsf.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tents3.o
|
||||
$(CC) -o $@ dsf.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tents3.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)towers: drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o \
|
||||
version.o
|
||||
$(CC) -o $@ drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o \
|
||||
version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)towerssolver: latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o towers2.o tree234.o
|
||||
$(CC) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
towers2.o tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)tracks: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tracks.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tracks.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)twiddle: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o twiddle.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o twiddle.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)undead: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o undead.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o undead.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)unequal: drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
unequal.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
unequal.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)unequalsolver: latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o tree234.o unequal2.o
|
||||
$(CC) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o unequal2.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)unruly: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o unruly.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o unruly.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)unrulysolver: malloc.o misc.o nullfe.o random.o unruly2.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o random.o unruly2.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)untangle: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o untangle.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o untangle.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
blackbox.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
blackbo3.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
bridges.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
bridges3.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
combi.o: ./combi.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube3.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
divvy.o: ./divvy.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominosa.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominos3.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
drawing.o: ./drawing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dsf.o: ./dsf.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen5.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
fifteen2.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
filling.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
filling5.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
filling2.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
findloop.o: ./findloop.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip3.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
flood.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flood3.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxies.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
galaxie7.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxie4.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
galaxie2.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
grid.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
gtk.o: ./gtk.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess3.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
inertia.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
inertia3.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
keen5.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen2.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
latin.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
latin8.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@
|
||||
latin6.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
laydomino.o: ./laydomino.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup5.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
lightup2.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
list.o: ./list.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopgen.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy5.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
loopy2.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
magnets.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
magnets5.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
magnets2.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
malloc.o: ./malloc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map5.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
map2.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
maxflow.o: ./maxflow.c ./maxflow.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
midend.o: ./midend.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines5.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
mines2.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@
|
||||
misc.o: ./misc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net3.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
netslide.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
netslid3.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
no-icon.o: ./no-icon.c
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullfe.o: ./nullfe.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullgame.o: ./nullgame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
obfusc.o: ./obfusc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
osx.o: ./osx.m ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisade.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisad3.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pattern7.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern4.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
pattern2.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pearl.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pearl5.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pearl2.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pegs.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pegs3.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
penrose.o: ./penrose.c ./puzzles.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
printing.o: ./printing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
ps.o: ./ps.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
random.o: ./random.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range3.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
rect.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
rect3.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
samegame.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
samegam3.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpost.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
signpos5.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpos2.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
singles.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
singles5.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
singles3.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
sixteen.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
sixteen3.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
slant5.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant2.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
solo.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
solo5.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
solo2.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tdq.o: ./tdq.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents5.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tents3.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
towers.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
towers5.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
towers2.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tracks.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tracks3.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tree234.o: ./tree234.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle3.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
undead.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
undead3.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unequal5.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal2.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
unruly.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unruly5.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unruly2.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
untangle.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
untangl3.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
version.o: ./version.c ./version.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows1.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
|
||||
GAMES += blackbox
|
||||
GAMES += bridges
|
||||
GAMES += cube
|
||||
GAMES += dominosa
|
||||
GAMES += fifteen
|
||||
GAMES += filling
|
||||
GAMES += flip
|
||||
GAMES += flood
|
||||
GAMES += galaxies
|
||||
GAMES += guess
|
||||
GAMES += inertia
|
||||
GAMES += keen
|
||||
GAMES += lightup
|
||||
GAMES += loopy
|
||||
GAMES += magnets
|
||||
GAMES += map
|
||||
GAMES += mines
|
||||
GAMES += net
|
||||
GAMES += netslide
|
||||
GAMES += palisade
|
||||
GAMES += pattern
|
||||
GAMES += pearl
|
||||
GAMES += pegs
|
||||
GAMES += range
|
||||
GAMES += rect
|
||||
GAMES += samegame
|
||||
GAMES += signpost
|
||||
GAMES += singles
|
||||
GAMES += sixteen
|
||||
GAMES += slant
|
||||
GAMES += solo
|
||||
GAMES += tents
|
||||
GAMES += towers
|
||||
GAMES += tracks
|
||||
GAMES += twiddle
|
||||
GAMES += undead
|
||||
GAMES += unequal
|
||||
GAMES += unruly
|
||||
GAMES += untangle
|
||||
install:
|
||||
for i in $(GAMES); do \
|
||||
$(INSTALL_PROGRAM) -m 755 $(BINPREFIX)$$i $(DESTDIR)$(gamesdir)/$(BINPREFIX)$$i \
|
||||
|| exit 1; \
|
||||
done
|
||||
test: benchmark.html benchmark.txt
|
||||
|
||||
benchmark.html: benchmark.txt benchmark.pl
|
||||
./benchmark.pl benchmark.txt > $@
|
||||
|
||||
benchmark.txt: benchmark.sh $(GAMES)
|
||||
./benchmark.sh > $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o $(BINPREFIX)blackbox $(BINPREFIX)bridges $(BINPREFIX)cube $(BINPREFIX)dominosa $(BINPREFIX)fifteen $(BINPREFIX)fifteensolver $(BINPREFIX)filling $(BINPREFIX)fillingsolver $(BINPREFIX)flip $(BINPREFIX)flood $(BINPREFIX)galaxies $(BINPREFIX)galaxiespicture $(BINPREFIX)galaxiessolver $(BINPREFIX)guess $(BINPREFIX)inertia $(BINPREFIX)keen $(BINPREFIX)keensolver $(BINPREFIX)latincheck $(BINPREFIX)lightup $(BINPREFIX)lightupsolver $(BINPREFIX)loopy $(BINPREFIX)loopysolver $(BINPREFIX)magnets $(BINPREFIX)magnetssolver $(BINPREFIX)map $(BINPREFIX)mapsolver $(BINPREFIX)mineobfusc $(BINPREFIX)mines $(BINPREFIX)net $(BINPREFIX)netslide $(BINPREFIX)nullgame $(BINPREFIX)obfusc $(BINPREFIX)palisade $(BINPREFIX)pattern $(BINPREFIX)patternpicture $(BINPREFIX)patternsolver $(BINPREFIX)pearl $(BINPREFIX)pearlbench $(BINPREFIX)pegs $(BINPREFIX)range $(BINPREFIX)rect $(BINPREFIX)samegame $(BINPREFIX)signpost $(BINPREFIX)signpostsolver $(BINPREFIX)singles $(BINPREFIX)singlessolver $(BINPREFIX)sixteen $(BINPREFIX)slant $(BINPREFIX)slantsolver $(BINPREFIX)solo $(BINPREFIX)solosolver $(BINPREFIX)tents $(BINPREFIX)tentssolver $(BINPREFIX)towers $(BINPREFIX)towerssolver $(BINPREFIX)tracks $(BINPREFIX)twiddle $(BINPREFIX)undead $(BINPREFIX)unequal $(BINPREFIX)unequalsolver $(BINPREFIX)unruly $(BINPREFIX)unrulysolver $(BINPREFIX)untangle
|
||||
446
apps/plugins/puzzles/src/Makefile.am
Normal file
446
apps/plugins/puzzles/src/Makefile.am
Normal file
|
|
@ -0,0 +1,446 @@
|
|||
# Makefile.am for puzzles under Unix with Autoconf/Automake.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
|
||||
GAMES =
|
||||
noinst_PROGRAMS = blackbox bridges cube dominosa fifteen fifteensolver \
|
||||
filling fillingsolver flip flood galaxies galaxiespicture \
|
||||
galaxiessolver guess inertia keen keensolver latincheck \
|
||||
lightup lightupsolver loopy loopysolver magnets \
|
||||
magnetssolver map mapsolver mineobfusc mines net netslide \
|
||||
nullgame obfusc palisade pattern patternpicture \
|
||||
patternsolver pearl pearlbench pegs range rect samegame \
|
||||
signpost signpostsolver singles singlessolver sixteen slant \
|
||||
slantsolver solo solosolver tents tentssolver towers \
|
||||
towerssolver tracks twiddle undead unequal unequalsolver \
|
||||
unruly unrulysolver untangle
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
|
||||
allsources = ./blackbox.c ./bridges.c ./combi.c ./cube.c ./divvy.c \
|
||||
./dominosa.c ./drawing.c ./dsf.c ./fifteen.c ./filling.c \
|
||||
./findloop.c ./flip.c ./flood.c ./galaxies.c ./grid.c \
|
||||
./grid.h ./gtk.c ./guess.c ./inertia.c ./keen.c ./latin.c \
|
||||
./latin.h ./laydomino.c ./lightup.c ./list.c ./loopgen.c \
|
||||
./loopgen.h ./loopy.c ./magnets.c ./malloc.c ./map.c \
|
||||
./maxflow.c ./maxflow.h ./midend.c ./mines.c ./misc.c \
|
||||
./net.c ./netslide.c ./no-icon.c ./nullfe.c ./nullgame.c \
|
||||
./obfusc.c ./osx.m ./palisade.c ./pattern.c ./pearl.c \
|
||||
./pegs.c ./penrose.c ./penrose.h ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./range.c ./rect.c ./resource.h \
|
||||
./samegame.c ./signpost.c ./singles.c ./sixteen.c ./slant.c \
|
||||
./solo.c ./tdq.c ./tents.c ./towers.c ./tracks.c ./tree234.c \
|
||||
./tree234.h ./twiddle.c ./undead.c ./unequal.c ./unruly.c \
|
||||
./untangle.c ./version.c ./version.h ./windows.c
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/./ -I$(srcdir)/icons/
|
||||
AM_CFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS)
|
||||
blackbox_SOURCES = ./blackbox.c ./drawing.c ./gtk.c ./malloc.c ./midend.c \
|
||||
./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./version.c ./version.h
|
||||
blackbox_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
bridges_SOURCES = ./bridges.c ./drawing.c ./dsf.c ./findloop.c ./gtk.c \
|
||||
./malloc.c ./midend.c ./misc.c ./no-icon.c ./printing.c \
|
||||
./ps.c ./puzzles.h ./random.c ./version.c ./version.h
|
||||
bridges_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
cube_SOURCES = ./cube.c ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./version.c ./version.h
|
||||
cube_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
dominosa_SOURCES = ./dominosa.c ./drawing.c ./gtk.c ./laydomino.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./version.c ./version.h
|
||||
dominosa_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
fifteen_SOURCES = ./drawing.c ./fifteen.c ./gtk.c ./malloc.c ./midend.c \
|
||||
./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./version.c ./version.h
|
||||
fifteen_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
fifteensolver_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
fifteensolver_LDADD = libfifteen2_a-fifteen.$(OBJEXT) -lm
|
||||
|
||||
filling_SOURCES = ./drawing.c ./dsf.c ./filling.c ./gtk.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./version.c ./version.h
|
||||
filling_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
fillingsolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
fillingsolver_LDADD = libfilling2_a-filling.$(OBJEXT) -lm
|
||||
|
||||
flip_SOURCES = ./drawing.c ./flip.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./tree234.c ./tree234.h ./version.c ./version.h
|
||||
flip_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
flood_SOURCES = ./drawing.c ./flood.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./version.c ./version.h
|
||||
flood_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
galaxies_SOURCES = ./drawing.c ./dsf.c ./galaxies.c ./gtk.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./version.c ./version.h
|
||||
galaxies_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
galaxiespicture_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
galaxiespicture_LDADD = libgalaxie4_a-galaxies.$(OBJEXT) -lm
|
||||
|
||||
galaxiessolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
galaxiessolver_LDADD = libgalaxie2_a-galaxies.$(OBJEXT) -lm
|
||||
|
||||
guess_SOURCES = ./drawing.c ./gtk.c ./guess.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./version.c ./version.h
|
||||
guess_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
inertia_SOURCES = ./drawing.c ./gtk.c ./inertia.c ./malloc.c ./midend.c \
|
||||
./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./version.c ./version.h
|
||||
inertia_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
keen_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./keen.c ./latin.c ./latin.h \
|
||||
./malloc.c ./maxflow.c ./maxflow.h ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./tree234.c ./tree234.h ./version.c ./version.h
|
||||
keen_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
keensolver_SOURCES = ./dsf.c ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \
|
||||
./nullfe.c ./puzzles.h ./random.c ./tree234.c ./tree234.h
|
||||
keensolver_LDADD = libkeen2_a-keen.$(OBJEXT) liblatin6_a-latin.$(OBJEXT) -lm
|
||||
|
||||
latincheck_SOURCES = ./malloc.c ./maxflow.c ./maxflow.h ./misc.c ./nullfe.c \
|
||||
./puzzles.h ./random.c ./tree234.c ./tree234.h
|
||||
latincheck_LDADD = liblatin8_a-latin.$(OBJEXT) -lm
|
||||
|
||||
lightup_SOURCES = ./combi.c ./drawing.c ./gtk.c ./lightup.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./version.c ./version.h
|
||||
lightup_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
lightupsolver_SOURCES = ./combi.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
lightupsolver_LDADD = liblightup2_a-lightup.$(OBJEXT) -lm
|
||||
|
||||
loopy_SOURCES = ./drawing.c ./dsf.c ./grid.c ./grid.h ./gtk.c ./loopgen.c \
|
||||
./loopgen.h ./loopy.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./penrose.c ./penrose.h ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./tree234.c ./tree234.h ./version.c \
|
||||
./version.h
|
||||
loopy_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
loopysolver_SOURCES = ./dsf.c ./grid.c ./grid.h ./loopgen.c ./loopgen.h \
|
||||
./malloc.c ./misc.c ./nullfe.c ./penrose.c ./penrose.h \
|
||||
./puzzles.h ./random.c ./tree234.c ./tree234.h
|
||||
loopysolver_LDADD = libloopy2_a-loopy.$(OBJEXT) -lm
|
||||
|
||||
magnets_SOURCES = ./drawing.c ./gtk.c ./laydomino.c ./magnets.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./version.c ./version.h
|
||||
magnets_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
magnetssolver_SOURCES = ./laydomino.c ./malloc.c ./misc.c ./nullfe.c \
|
||||
./puzzles.h ./random.c
|
||||
magnetssolver_LDADD = libmagnets2_a-magnets.$(OBJEXT) -lm
|
||||
|
||||
map_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./map.c ./midend.c \
|
||||
./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./version.c ./version.h
|
||||
map_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
mapsolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
mapsolver_LDADD = libmap2_a-map.$(OBJEXT) -lm
|
||||
|
||||
mineobfusc_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h ./random.c \
|
||||
./tree234.c ./tree234.h
|
||||
mineobfusc_LDADD = libmines2_a-mines.$(OBJEXT) -lm
|
||||
|
||||
mines_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./mines.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./tree234.c ./tree234.h ./version.c ./version.h
|
||||
mines_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
net_SOURCES = ./drawing.c ./dsf.c ./findloop.c ./gtk.c ./malloc.c ./midend.c \
|
||||
./misc.c ./net.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./tree234.c ./tree234.h ./version.c ./version.h
|
||||
net_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
netslide_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./netslide.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./tree234.c ./tree234.h ./version.c ./version.h
|
||||
netslide_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
nullgame_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./nullgame.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./version.c ./version.h
|
||||
nullgame_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
obfusc_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./obfusc.c ./puzzles.h \
|
||||
./random.c
|
||||
obfusc_LDADD = -lm
|
||||
|
||||
palisade_SOURCES = ./divvy.c ./drawing.c ./dsf.c ./gtk.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./palisade.c ./printing.c \
|
||||
./ps.c ./puzzles.h ./random.c ./version.c ./version.h
|
||||
palisade_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
pattern_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./pattern.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./version.c ./version.h
|
||||
pattern_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
patternpicture_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
patternpicture_LDADD = libpattern4_a-pattern.$(OBJEXT) -lm
|
||||
|
||||
patternsolver_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
patternsolver_LDADD = libpattern2_a-pattern.$(OBJEXT) -lm
|
||||
|
||||
pearl_SOURCES = ./drawing.c ./dsf.c ./grid.c ./grid.h ./gtk.c ./loopgen.c \
|
||||
./loopgen.h ./malloc.c ./midend.c ./misc.c ./no-icon.c \
|
||||
./pearl.c ./penrose.c ./penrose.h ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./tdq.c ./tree234.c ./tree234.h \
|
||||
./version.c ./version.h
|
||||
pearl_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
pearlbench_SOURCES = ./dsf.c ./grid.c ./grid.h ./loopgen.c ./loopgen.h \
|
||||
./malloc.c ./misc.c ./nullfe.c ./penrose.c ./penrose.h \
|
||||
./puzzles.h ./random.c ./tdq.c ./tree234.c ./tree234.h
|
||||
pearlbench_LDADD = libpearl2_a-pearl.$(OBJEXT) -lm
|
||||
|
||||
pegs_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./pegs.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./tree234.c ./tree234.h ./version.c ./version.h
|
||||
pegs_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
range_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./range.c ./version.c ./version.h
|
||||
range_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
rect_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./rect.c ./version.c ./version.h
|
||||
rect_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
samegame_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./samegame.c ./version.c ./version.h
|
||||
samegame_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
signpost_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./midend.c \
|
||||
./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./signpost.c ./version.c ./version.h
|
||||
signpost_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
signpostsolver_SOURCES = ./dsf.c ./malloc.c ./misc.c ./nullfe.c ./puzzles.h \
|
||||
./random.c
|
||||
signpostsolver_LDADD = libsignpos2_a-signpost.$(OBJEXT) -lm
|
||||
|
||||
singles_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./latin.c ./latin.h ./malloc.c \
|
||||
./maxflow.c ./maxflow.h ./midend.c ./misc.c ./no-icon.c \
|
||||
./printing.c ./ps.c ./puzzles.h ./random.c ./singles.c \
|
||||
./tree234.c ./tree234.h ./version.c ./version.h
|
||||
singles_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
singlessolver_SOURCES = ./dsf.c ./latin.c ./latin.h ./malloc.c ./maxflow.c \
|
||||
./maxflow.h ./misc.c ./nullfe.c ./puzzles.h ./random.c \
|
||||
./tree234.c ./tree234.h
|
||||
singlessolver_LDADD = libsingles3_a-singles.$(OBJEXT) -lm
|
||||
|
||||
sixteen_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./sixteen.c ./version.c ./version.h
|
||||
sixteen_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
slant_SOURCES = ./drawing.c ./dsf.c ./findloop.c ./gtk.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./slant.c ./version.c ./version.h
|
||||
slant_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
slantsolver_SOURCES = ./dsf.c ./findloop.c ./malloc.c ./misc.c ./nullfe.c \
|
||||
./puzzles.h ./random.c
|
||||
slantsolver_LDADD = libslant2_a-slant.$(OBJEXT) -lm
|
||||
|
||||
solo_SOURCES = ./divvy.c ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./midend.c \
|
||||
./misc.c ./no-icon.c ./printing.c ./ps.c ./puzzles.h \
|
||||
./random.c ./solo.c ./version.c ./version.h
|
||||
solo_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
solosolver_SOURCES = ./divvy.c ./dsf.c ./malloc.c ./misc.c ./nullfe.c \
|
||||
./puzzles.h ./random.c
|
||||
solosolver_LDADD = libsolo2_a-solo.$(OBJEXT) -lm
|
||||
|
||||
tents_SOURCES = ./drawing.c ./dsf.c ./gtk.c ./malloc.c ./maxflow.c \
|
||||
./maxflow.h ./midend.c ./misc.c ./no-icon.c ./printing.c \
|
||||
./ps.c ./puzzles.h ./random.c ./tents.c ./version.c \
|
||||
./version.h
|
||||
tents_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
tentssolver_SOURCES = ./dsf.c ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \
|
||||
./nullfe.c ./puzzles.h ./random.c
|
||||
tentssolver_LDADD = libtents3_a-tents.$(OBJEXT) -lm
|
||||
|
||||
towers_SOURCES = ./drawing.c ./gtk.c ./latin.c ./latin.h ./malloc.c \
|
||||
./maxflow.c ./maxflow.h ./midend.c ./misc.c ./no-icon.c \
|
||||
./printing.c ./ps.c ./puzzles.h ./random.c ./towers.c \
|
||||
./tree234.c ./tree234.h ./version.c ./version.h
|
||||
towers_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
towerssolver_SOURCES = ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \
|
||||
./nullfe.c ./puzzles.h ./random.c ./tree234.c ./tree234.h
|
||||
towerssolver_LDADD = liblatin6_a-latin.$(OBJEXT) \
|
||||
libtowers2_a-towers.$(OBJEXT) -lm
|
||||
|
||||
tracks_SOURCES = ./drawing.c ./dsf.c ./findloop.c ./gtk.c ./malloc.c \
|
||||
./midend.c ./misc.c ./no-icon.c ./printing.c ./ps.c \
|
||||
./puzzles.h ./random.c ./tracks.c ./version.c ./version.h
|
||||
tracks_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
twiddle_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./twiddle.c ./version.c ./version.h
|
||||
twiddle_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
undead_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./undead.c ./version.c ./version.h
|
||||
undead_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
unequal_SOURCES = ./drawing.c ./gtk.c ./latin.c ./latin.h ./malloc.c \
|
||||
./maxflow.c ./maxflow.h ./midend.c ./misc.c ./no-icon.c \
|
||||
./printing.c ./ps.c ./puzzles.h ./random.c ./tree234.c \
|
||||
./tree234.h ./unequal.c ./version.c ./version.h
|
||||
unequal_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
unequalsolver_SOURCES = ./malloc.c ./maxflow.c ./maxflow.h ./misc.c \
|
||||
./nullfe.c ./puzzles.h ./random.c ./tree234.c ./tree234.h
|
||||
unequalsolver_LDADD = liblatin6_a-latin.$(OBJEXT) \
|
||||
libunequal2_a-unequal.$(OBJEXT) -lm
|
||||
|
||||
unruly_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./unruly.c ./version.c ./version.h
|
||||
unruly_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
unrulysolver_SOURCES = ./malloc.c ./misc.c ./nullfe.c ./puzzles.h ./random.c
|
||||
unrulysolver_LDADD = libunruly2_a-unruly.$(OBJEXT) -lm
|
||||
|
||||
untangle_SOURCES = ./drawing.c ./gtk.c ./malloc.c ./midend.c ./misc.c \
|
||||
./no-icon.c ./printing.c ./ps.c ./puzzles.h ./random.c \
|
||||
./tree234.c ./tree234.h ./untangle.c ./version.c ./version.h
|
||||
untangle_LDADD = $(GTK_LIBS) -lm
|
||||
|
||||
libfifteen2_a_SOURCES = ./fifteen.c ./puzzles.h
|
||||
libfifteen2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libfilling2_a_SOURCES = ./filling.c ./puzzles.h
|
||||
libfilling2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libgalaxie2_a_SOURCES = ./galaxies.c ./puzzles.h
|
||||
libgalaxie2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libgalaxie4_a_SOURCES = ./galaxies.c ./puzzles.h
|
||||
libgalaxie4_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) \
|
||||
-DSTANDALONE_PICTURE_GENERATOR
|
||||
libkeen2_a_SOURCES = ./keen.c ./puzzles.h ./latin.h
|
||||
libkeen2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
liblatin6_a_SOURCES = ./latin.c ./puzzles.h ./tree234.h ./maxflow.h \
|
||||
./latin.h
|
||||
liblatin6_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
liblatin8_a_SOURCES = ./latin.c ./puzzles.h ./tree234.h ./maxflow.h \
|
||||
./latin.h
|
||||
liblatin8_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_LATIN_TEST
|
||||
liblightup2_a_SOURCES = ./lightup.c ./puzzles.h
|
||||
liblightup2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libloopy2_a_SOURCES = ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
libloopy2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libmagnets2_a_SOURCES = ./magnets.c ./puzzles.h
|
||||
libmagnets2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libmap2_a_SOURCES = ./map.c ./puzzles.h
|
||||
libmap2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libmines2_a_SOURCES = ./mines.c ./tree234.h ./puzzles.h
|
||||
libmines2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_OBFUSCATOR
|
||||
libpattern2_a_SOURCES = ./pattern.c ./puzzles.h
|
||||
libpattern2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libpattern4_a_SOURCES = ./pattern.c ./puzzles.h
|
||||
libpattern4_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) \
|
||||
-DSTANDALONE_PICTURE_GENERATOR
|
||||
libpearl2_a_SOURCES = ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
libpearl2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libsignpos2_a_SOURCES = ./signpost.c ./puzzles.h
|
||||
libsignpos2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libsingles3_a_SOURCES = ./singles.c ./puzzles.h ./latin.h
|
||||
libsingles3_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libslant2_a_SOURCES = ./slant.c ./puzzles.h
|
||||
libslant2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libsolo2_a_SOURCES = ./solo.c ./puzzles.h
|
||||
libsolo2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libtents3_a_SOURCES = ./tents.c ./puzzles.h ./maxflow.h
|
||||
libtents3_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libtowers2_a_SOURCES = ./towers.c ./puzzles.h ./latin.h
|
||||
libtowers2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libunequal2_a_SOURCES = ./unequal.c ./puzzles.h ./latin.h
|
||||
libunequal2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
libunruly2_a_SOURCES = ./unruly.c ./puzzles.h
|
||||
libunruly2_a_CPPFLAGS = $(GTK_CFLAGS) $(WARNINGOPTS) -DSTANDALONE_SOLVER
|
||||
noinst_LIBRARIES = libfifteen2.a libfilling2.a libgalaxie2.a libgalaxie4.a \
|
||||
libkeen2.a liblatin6.a liblatin8.a liblightup2.a libloopy2.a \
|
||||
libmagnets2.a libmap2.a libmines2.a libpattern2.a \
|
||||
libpattern4.a libpearl2.a libsignpos2.a libsingles3.a \
|
||||
libslant2.a libsolo2.a libtents3.a libtowers2.a \
|
||||
libunequal2.a libunruly2.a
|
||||
|
||||
GAMES += blackbox
|
||||
GAMES += bridges
|
||||
GAMES += cube
|
||||
GAMES += dominosa
|
||||
GAMES += fifteen
|
||||
GAMES += filling
|
||||
GAMES += flip
|
||||
GAMES += flood
|
||||
GAMES += galaxies
|
||||
GAMES += guess
|
||||
GAMES += inertia
|
||||
GAMES += keen
|
||||
GAMES += lightup
|
||||
GAMES += loopy
|
||||
GAMES += magnets
|
||||
GAMES += map
|
||||
GAMES += mines
|
||||
GAMES += net
|
||||
GAMES += netslide
|
||||
GAMES += palisade
|
||||
GAMES += pattern
|
||||
GAMES += pearl
|
||||
GAMES += pegs
|
||||
GAMES += range
|
||||
GAMES += rect
|
||||
GAMES += samegame
|
||||
GAMES += signpost
|
||||
GAMES += singles
|
||||
GAMES += sixteen
|
||||
GAMES += slant
|
||||
GAMES += solo
|
||||
GAMES += tents
|
||||
GAMES += towers
|
||||
GAMES += tracks
|
||||
GAMES += twiddle
|
||||
GAMES += undead
|
||||
GAMES += unequal
|
||||
GAMES += unruly
|
||||
GAMES += untangle
|
||||
bin_PROGRAMS = $(GAMES)
|
||||
test: benchmark.html benchmark.txt
|
||||
|
||||
benchmark.html: benchmark.txt benchmark.pl
|
||||
./benchmark.pl benchmark.txt > $@
|
||||
|
||||
benchmark.txt: benchmark.sh $(GAMES)
|
||||
./benchmark.sh > $@
|
||||
718
apps/plugins/puzzles/src/Makefile.cyg
Normal file
718
apps/plugins/puzzles/src/Makefile.cyg
Normal file
|
|
@ -0,0 +1,718 @@
|
|||
# Makefile for puzzles under cygwin.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
|
||||
# You can define this path to point at your tools if you need to
|
||||
# TOOLPATH = c:\cygwin\bin\ # or similar, if you're running Windows
|
||||
# TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/
|
||||
CC = $(TOOLPATH)gcc
|
||||
RC = $(TOOLPATH)windres
|
||||
# Uncomment the following two lines to compile under Winelib
|
||||
# CC = winegcc
|
||||
# RC = wrc
|
||||
# You may also need to tell windres where to find include files:
|
||||
# RCINC = --include-dir c:\cygwin\include\
|
||||
|
||||
CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT \
|
||||
-D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -I./ -Iicons/
|
||||
LDFLAGS = -mno-cygwin -s
|
||||
RCFLAGS = $(RCINC) --define WIN32=1 --define _WIN32=1 --define WINVER=0x0400 \
|
||||
--define MINGW32_FIX=1 --include ./ --include icons/
|
||||
|
||||
all: blackbox.exe bridges.exe cube.exe dominosa.exe fifteen.exe \
|
||||
fifteensolver.exe filling.exe fillingsolver.exe flip.exe \
|
||||
flood.exe galaxies.exe galaxiespicture.exe \
|
||||
galaxiessolver.exe guess.exe inertia.exe keen.exe \
|
||||
keensolver.exe latincheck.exe lightup.exe lightupsolver.exe \
|
||||
loopy.exe loopysolver.exe magnets.exe magnetssolver.exe \
|
||||
map.exe mapsolver.exe mineobfusc.exe mines.exe netgame.exe \
|
||||
netslide.exe nullgame.exe palisade.exe pattern.exe \
|
||||
patternpicture.exe patternsolver.exe pearl.exe \
|
||||
pearlbench.exe pegs.exe puzzles.exe range.exe rect.exe \
|
||||
samegame.exe signpost.exe signpostsolver.exe singles.exe \
|
||||
singlessolver.exe sixteen.exe slant.exe slantsolver.exe \
|
||||
solo.exe solosolver.exe tents.exe tentssolver.exe towers.exe \
|
||||
towerssolver.exe tracks.exe twiddle.exe undead.exe \
|
||||
unequal.exe unequalsolver.exe unruly.exe unrulysolver.exe \
|
||||
untangle.exe
|
||||
|
||||
blackbox.exe: blackbox.o drawing.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,blackbox.map blackbox.o \
|
||||
drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
bridges.exe: bridges.o drawing.o dsf.o findloop.o malloc.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,bridges.map bridges.o \
|
||||
drawing.o dsf.o findloop.o malloc.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o version.o windows.o \
|
||||
-lcomctl32 -lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
cube.exe: cube.o drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,cube.map cube.o drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 -luser32 \
|
||||
-lwinspool
|
||||
|
||||
dominosa.exe: dominosa.o drawing.o laydomino.o malloc.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,dominosa.map dominosa.o \
|
||||
drawing.o laydomino.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
fifteen.exe: drawing.o fifteen.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,fifteen.map drawing.o \
|
||||
fifteen.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
fifteensolver.exe: fifteen2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,fifteensolver.map fifteen2.o \
|
||||
malloc.o misc.o nullfe.o random.o
|
||||
|
||||
filling.exe: drawing.o dsf.o filling.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,filling.map drawing.o \
|
||||
dsf.o filling.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
fillingsolver.exe: dsf.o filling2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,fillingsolver.map dsf.o filling2.o \
|
||||
malloc.o misc.o nullfe.o random.o
|
||||
|
||||
flip.exe: drawing.o flip.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o tree234.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,flip.map drawing.o flip.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
tree234.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
flood.exe: drawing.o flood.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,flood.map drawing.o \
|
||||
flood.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
galaxies.exe: drawing.o dsf.o galaxies.o malloc.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,galaxies.map drawing.o \
|
||||
dsf.o galaxies.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
galaxiespicture.exe: dsf.o galaxie4.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,galaxiespicture.map dsf.o galaxie4.o \
|
||||
malloc.o misc.o nullfe.o random.o
|
||||
|
||||
galaxiessolver.exe: dsf.o galaxie2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,galaxiessolver.map dsf.o galaxie2.o \
|
||||
malloc.o misc.o nullfe.o random.o
|
||||
|
||||
guess.exe: drawing.o guess.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,guess.map drawing.o \
|
||||
guess.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
inertia.exe: drawing.o inertia.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,inertia.map drawing.o \
|
||||
inertia.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
keen.exe: drawing.o dsf.o keen.o latin.o malloc.o maxflow.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o tree234.o version.o \
|
||||
windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,keen.map drawing.o dsf.o \
|
||||
keen.o latin.o malloc.o maxflow.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o tree234.o version.o \
|
||||
windows.o -lcomctl32 -lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
keensolver.exe: dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o tree234.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,keensolver.map dsf.o keen2.o \
|
||||
latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o
|
||||
|
||||
latincheck.exe: latin8.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,latincheck.map latin8.o malloc.o \
|
||||
maxflow.o misc.o nullfe.o random.o tree234.o
|
||||
|
||||
lightup.exe: combi.o drawing.o lightup.o malloc.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,lightup.map combi.o \
|
||||
drawing.o lightup.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
lightupsolver.exe: combi.o lightup2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,lightupsolver.map combi.o lightup2.o \
|
||||
malloc.o misc.o nullfe.o random.o
|
||||
|
||||
loopy.exe: drawing.o dsf.o grid.o loopgen.o loopy.o malloc.o midend.o misc.o \
|
||||
noicon.res.o penrose.o printing.o random.o tree234.o \
|
||||
version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,loopy.map drawing.o dsf.o \
|
||||
grid.o loopgen.o loopy.o malloc.o midend.o misc.o \
|
||||
noicon.res.o penrose.o printing.o random.o tree234.o \
|
||||
version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 -luser32 \
|
||||
-lwinspool
|
||||
|
||||
loopysolver.exe: dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o nullfe.o \
|
||||
penrose.o random.o tree234.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,loopysolver.map dsf.o grid.o \
|
||||
loopgen.o loopy2.o malloc.o misc.o nullfe.o penrose.o \
|
||||
random.o tree234.o
|
||||
|
||||
magnets.exe: drawing.o laydomino.o magnets.o malloc.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,magnets.map drawing.o \
|
||||
laydomino.o magnets.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
magnetssolver.exe: laydomino.o magnets2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,magnetssolver.map laydomino.o \
|
||||
magnets2.o malloc.o misc.o nullfe.o random.o
|
||||
|
||||
map.exe: drawing.o dsf.o malloc.o map.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,map.map drawing.o dsf.o \
|
||||
malloc.o map.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
mapsolver.exe: dsf.o malloc.o map2.o misc.o nullfe.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,mapsolver.map dsf.o malloc.o map2.o \
|
||||
misc.o nullfe.o random.o
|
||||
|
||||
mineobfusc.exe: malloc.o mines2.o misc.o nullfe.o random.o tree234.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,mineobfusc.map malloc.o mines2.o \
|
||||
misc.o nullfe.o random.o tree234.o
|
||||
|
||||
mines.exe: drawing.o malloc.o midend.o mines.o misc.o noicon.res.o \
|
||||
printing.o random.o tree234.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,mines.map drawing.o \
|
||||
malloc.o midend.o mines.o misc.o noicon.res.o printing.o \
|
||||
random.o tree234.o version.o windows.o -lcomctl32 -lcomdlg32 \
|
||||
-lgdi32 -luser32 -lwinspool
|
||||
|
||||
netgame.exe: drawing.o dsf.o findloop.o malloc.o midend.o misc.o net.o \
|
||||
noicon.res.o printing.o random.o tree234.o version.o \
|
||||
windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,netgame.map drawing.o \
|
||||
dsf.o findloop.o malloc.o midend.o misc.o net.o noicon.res.o \
|
||||
printing.o random.o tree234.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
netslide.exe: drawing.o malloc.o midend.o misc.o netslide.o noicon.res.o \
|
||||
printing.o random.o tree234.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,netslide.map drawing.o \
|
||||
malloc.o midend.o misc.o netslide.o noicon.res.o printing.o \
|
||||
random.o tree234.o version.o windows.o -lcomctl32 -lcomdlg32 \
|
||||
-lgdi32 -luser32 -lwinspool
|
||||
|
||||
nullgame.exe: drawing.o malloc.o midend.o misc.o noicon.res.o nullgame.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,nullgame.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o nullgame.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
palisade.exe: divvy.o drawing.o dsf.o malloc.o midend.o misc.o noicon.res.o \
|
||||
palisade.o printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,palisade.map divvy.o \
|
||||
drawing.o dsf.o malloc.o midend.o misc.o noicon.res.o \
|
||||
palisade.o printing.o random.o version.o windows.o \
|
||||
-lcomctl32 -lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
pattern.exe: drawing.o malloc.o midend.o misc.o noicon.res.o pattern.o \
|
||||
printing.o random.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,pattern.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o pattern.o printing.o \
|
||||
random.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
patternpicture.exe: malloc.o misc.o nullfe.o pattern4.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,patternpicture.map malloc.o misc.o \
|
||||
nullfe.o pattern4.o random.o
|
||||
|
||||
patternsolver.exe: malloc.o misc.o nullfe.o pattern2.o random.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,patternsolver.map malloc.o misc.o \
|
||||
nullfe.o pattern2.o random.o
|
||||
|
||||
pearl.exe: drawing.o dsf.o grid.o loopgen.o malloc.o midend.o misc.o pearl.o \
|
||||
penrose.o printing.o random.o tdq.o tree234.o version.o \
|
||||
windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,pearl.map drawing.o dsf.o \
|
||||
grid.o loopgen.o malloc.o midend.o misc.o pearl.o penrose.o \
|
||||
printing.o random.o tdq.o tree234.o version.o windows.o \
|
||||
-lcomctl32 -lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
pearlbench.exe: dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o pearl2.o \
|
||||
penrose.o random.o tdq.o tree234.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,pearlbench.map dsf.o grid.o \
|
||||
loopgen.o malloc.o misc.o nullfe.o pearl2.o penrose.o \
|
||||
random.o tdq.o tree234.o
|
||||
|
||||
pegs.exe: drawing.o malloc.o midend.o misc.o noicon.res.o pegs.o printing.o \
|
||||
random.o tree234.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,pegs.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o pegs.o printing.o \
|
||||
random.o tree234.o version.o windows.o -lcomctl32 -lcomdlg32 \
|
||||
-lgdi32 -luser32 -lwinspool
|
||||
|
||||
puzzles.exe: blackbo3.o bridges3.o combi.o cube3.o divvy.o dominos3.o \
|
||||
drawing.o dsf.o fifteen5.o filling5.o findloop.o flip3.o \
|
||||
flood3.o galaxie7.o grid.o guess3.o inertia3.o keen5.o \
|
||||
latin.o laydomino.o lightup5.o list.o loopgen.o loopy5.o \
|
||||
magnets5.o malloc.o map5.o maxflow.o midend.o mines5.o \
|
||||
misc.o net3.o netslid3.o noicon.res.o palisad3.o pattern7.o \
|
||||
pearl5.o pegs3.o penrose.o printing.o random.o range3.o \
|
||||
rect3.o samegam3.o signpos5.o singles5.o sixteen3.o slant5.o \
|
||||
solo5.o tdq.o tents5.o towers5.o tracks3.o tree234.o \
|
||||
twiddle3.o undead3.o unequal5.o unruly5.o untangl3.o \
|
||||
version.o windows1.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,puzzles.map blackbo3.o \
|
||||
bridges3.o combi.o cube3.o divvy.o dominos3.o drawing.o \
|
||||
dsf.o fifteen5.o filling5.o findloop.o flip3.o flood3.o \
|
||||
galaxie7.o grid.o guess3.o inertia3.o keen5.o latin.o \
|
||||
laydomino.o lightup5.o list.o loopgen.o loopy5.o magnets5.o \
|
||||
malloc.o map5.o maxflow.o midend.o mines5.o misc.o net3.o \
|
||||
netslid3.o noicon.res.o palisad3.o pattern7.o pearl5.o \
|
||||
pegs3.o penrose.o printing.o random.o range3.o rect3.o \
|
||||
samegam3.o signpos5.o singles5.o sixteen3.o slant5.o solo5.o \
|
||||
tdq.o tents5.o towers5.o tracks3.o tree234.o twiddle3.o \
|
||||
undead3.o unequal5.o unruly5.o untangl3.o version.o \
|
||||
windows1.o -lcomctl32 -lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
range.exe: drawing.o dsf.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o range.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,range.map drawing.o dsf.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
range.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
rect.exe: drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o rect.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,rect.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
rect.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
samegame.exe: drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o samegame.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,samegame.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
samegame.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
signpost.exe: drawing.o dsf.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o signpost.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,signpost.map drawing.o \
|
||||
dsf.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o signpost.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
signpostsolver.exe: dsf.o malloc.o misc.o nullfe.o random.o signpos2.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,signpostsolver.map dsf.o malloc.o \
|
||||
misc.o nullfe.o random.o signpos2.o
|
||||
|
||||
singles.exe: drawing.o dsf.o latin.o malloc.o maxflow.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o singles.o tree234.o \
|
||||
version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,singles.map drawing.o \
|
||||
dsf.o latin.o malloc.o maxflow.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o singles.o tree234.o \
|
||||
version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 -luser32 \
|
||||
-lwinspool
|
||||
|
||||
singlessolver.exe: dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
singles3.o tree234.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,singlessolver.map dsf.o latin.o \
|
||||
malloc.o maxflow.o misc.o nullfe.o random.o singles3.o \
|
||||
tree234.o
|
||||
|
||||
sixteen.exe: drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o sixteen.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,sixteen.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
sixteen.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
slant.exe: drawing.o dsf.o findloop.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o slant.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,slant.map drawing.o dsf.o \
|
||||
findloop.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o slant.o version.o windows.o -lcomctl32 -lcomdlg32 \
|
||||
-lgdi32 -luser32 -lwinspool
|
||||
|
||||
slantsolver.exe: dsf.o findloop.o malloc.o misc.o nullfe.o random.o slant2.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,slantsolver.map dsf.o findloop.o \
|
||||
malloc.o misc.o nullfe.o random.o slant2.o
|
||||
|
||||
solo.exe: divvy.o drawing.o dsf.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o solo.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,solo.map divvy.o drawing.o \
|
||||
dsf.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o solo.o version.o windows.o -lcomctl32 -lcomdlg32 \
|
||||
-lgdi32 -luser32 -lwinspool
|
||||
|
||||
solosolver.exe: divvy.o dsf.o malloc.o misc.o nullfe.o random.o solo2.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,solosolver.map divvy.o dsf.o \
|
||||
malloc.o misc.o nullfe.o random.o solo2.o
|
||||
|
||||
tents.exe: drawing.o dsf.o malloc.o maxflow.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o tents.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,tents.map drawing.o dsf.o \
|
||||
malloc.o maxflow.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o tents.o version.o windows.o -lcomctl32 -lcomdlg32 \
|
||||
-lgdi32 -luser32 -lwinspool
|
||||
|
||||
tentssolver.exe: dsf.o malloc.o maxflow.o misc.o nullfe.o random.o tents3.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,tentssolver.map dsf.o malloc.o \
|
||||
maxflow.o misc.o nullfe.o random.o tents3.o
|
||||
|
||||
towers.exe: drawing.o latin.o malloc.o maxflow.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o towers.o tree234.o \
|
||||
version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,towers.map drawing.o \
|
||||
latin.o malloc.o maxflow.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o towers.o tree234.o version.o windows.o \
|
||||
-lcomctl32 -lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
towerssolver.exe: latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
towers2.o tree234.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,towerssolver.map latin6.o malloc.o \
|
||||
maxflow.o misc.o nullfe.o random.o towers2.o tree234.o
|
||||
|
||||
tracks.exe: drawing.o dsf.o findloop.o malloc.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o tracks.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,tracks.map drawing.o dsf.o \
|
||||
findloop.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o tracks.o version.o windows.o -lcomctl32 -lcomdlg32 \
|
||||
-lgdi32 -luser32 -lwinspool
|
||||
|
||||
twiddle.exe: drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o twiddle.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,twiddle.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
twiddle.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
undead.exe: drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o undead.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,undead.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
undead.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
unequal.exe: drawing.o latin.o malloc.o maxflow.o midend.o misc.o \
|
||||
noicon.res.o printing.o random.o tree234.o unequal.o \
|
||||
version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,unequal.map drawing.o \
|
||||
latin.o malloc.o maxflow.o midend.o misc.o noicon.res.o \
|
||||
printing.o random.o tree234.o unequal.o version.o windows.o \
|
||||
-lcomctl32 -lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
unequalsolver.exe: latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o unequal2.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,unequalsolver.map latin6.o malloc.o \
|
||||
maxflow.o misc.o nullfe.o random.o tree234.o unequal2.o
|
||||
|
||||
unruly.exe: drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o unruly.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,unruly.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
unruly.o version.o windows.o -lcomctl32 -lcomdlg32 -lgdi32 \
|
||||
-luser32 -lwinspool
|
||||
|
||||
unrulysolver.exe: malloc.o misc.o nullfe.o random.o unruly2.o
|
||||
$(CC) $(LDFLAGS) -o $@ -Wl,-Map,unrulysolver.map malloc.o misc.o \
|
||||
nullfe.o random.o unruly2.o
|
||||
|
||||
untangle.exe: drawing.o malloc.o midend.o misc.o noicon.res.o printing.o \
|
||||
random.o tree234.o untangle.o version.o windows.o
|
||||
$(CC) -mwindows $(LDFLAGS) -o $@ -Wl,-Map,untangle.map drawing.o \
|
||||
malloc.o midend.o misc.o noicon.res.o printing.o random.o \
|
||||
tree234.o untangle.o version.o windows.o -lcomctl32 \
|
||||
-lcomdlg32 -lgdi32 -luser32 -lwinspool
|
||||
|
||||
blackbox.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
blackbo3.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
bridges.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
bridges3.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
combi.o: ./combi.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube3.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
divvy.o: ./divvy.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominosa.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominos3.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
drawing.o: ./drawing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dsf.o: ./dsf.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen5.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
fifteen2.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
filling.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
filling5.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
filling2.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
findloop.o: ./findloop.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip3.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
flood.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flood3.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxies.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
galaxie7.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxie4.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
galaxie2.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
grid.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
gtk.o: ./gtk.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess3.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
inertia.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
inertia3.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
keen5.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen2.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
latin.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
latin8.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@
|
||||
latin6.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
laydomino.o: ./laydomino.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup5.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
lightup2.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
list.o: ./list.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopgen.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy5.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
loopy2.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
magnets.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
magnets5.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
magnets2.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
malloc.o: ./malloc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map5.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
map2.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
maxflow.o: ./maxflow.c ./maxflow.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
midend.o: ./midend.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines5.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
mines2.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@
|
||||
misc.o: ./misc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net3.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
netslide.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
netslid3.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
no-icon.o: ./no-icon.c
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
noicon.res.o: ./noicon.rc ./puzzles.rc2 ./resource.h
|
||||
$(RC) $(FWHACK) $(RCFL) $(RCFLAGS) $< $@
|
||||
nullfe.o: ./nullfe.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullgame.o: ./nullgame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
obfusc.o: ./obfusc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
osx.o: ./osx.m ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisade.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisad3.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pattern7.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern4.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
pattern2.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pearl.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pearl5.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pearl2.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pegs.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pegs3.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
penrose.o: ./penrose.c ./puzzles.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
printing.o: ./printing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
ps.o: ./ps.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
random.o: ./random.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range3.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
rect.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
rect3.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
samegame.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
samegam3.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpost.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
signpos5.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpos2.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
singles.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
singles5.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
singles3.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
sixteen.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
sixteen3.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
slant5.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant2.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
solo.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
solo5.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
solo2.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tdq.o: ./tdq.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents5.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tents3.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
towers.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
towers5.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
towers2.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tracks.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tracks3.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tree234.o: ./tree234.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle3.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
undead.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
undead3.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unequal5.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal2.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
unruly.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unruly5.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unruly2.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
untangle.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
untangl3.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
version.o: ./version.c ./version.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows1.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o *.exe *.res.o *.map
|
||||
|
||||
17
apps/plugins/puzzles/src/Makefile.doc
Normal file
17
apps/plugins/puzzles/src/Makefile.doc
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
all: puzzles.hlp puzzles.txt HACKING
|
||||
|
||||
preprocessed.but: puzzles.but
|
||||
sed 's/PREFIX-/$(BINPREFIX)/g' puzzles.but > preprocessed.but
|
||||
|
||||
puzzles.hlp puzzles.txt: preprocessed.but
|
||||
halibut --winhelp=puzzles.hlp --text=puzzles.txt preprocessed.but
|
||||
|
||||
HACKING: devel.but
|
||||
halibut --text=HACKING devel.but
|
||||
|
||||
chm: puzzles.hhp
|
||||
puzzles.hhp: puzzles.but chm.but
|
||||
halibut --html puzzles.but chm.but
|
||||
|
||||
clean:
|
||||
rm -f puzzles.hlp puzzles.txt preprocessed.but HACKING *.html *.hh[pck]
|
||||
497
apps/plugins/puzzles/src/Makefile.emcc
Normal file
497
apps/plugins/puzzles/src/Makefile.emcc
Normal file
|
|
@ -0,0 +1,497 @@
|
|||
# Makefile for puzzles using Emscripten. Requires GNU make.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
|
||||
# This can be set on the command line to point at the emcc command,
|
||||
# if it is not on your PATH.
|
||||
EMCC = emcc
|
||||
|
||||
CFLAGS = -DSLOW_SYSTEM -I./ -Iicons/
|
||||
|
||||
all: $(OUTPREFIX)blackbox.js $(OUTPREFIX)bridges.js $(OUTPREFIX)cube.js \
|
||||
$(OUTPREFIX)dominosa.js $(OUTPREFIX)fifteen.js \
|
||||
$(OUTPREFIX)filling.js $(OUTPREFIX)flip.js \
|
||||
$(OUTPREFIX)flood.js $(OUTPREFIX)galaxies.js \
|
||||
$(OUTPREFIX)guess.js $(OUTPREFIX)inertia.js \
|
||||
$(OUTPREFIX)keen.js $(OUTPREFIX)lightup.js \
|
||||
$(OUTPREFIX)loopy.js $(OUTPREFIX)magnets.js \
|
||||
$(OUTPREFIX)map.js $(OUTPREFIX)mines.js $(OUTPREFIX)net.js \
|
||||
$(OUTPREFIX)netslide.js $(OUTPREFIX)nullgame.js \
|
||||
$(OUTPREFIX)palisade.js $(OUTPREFIX)pattern.js \
|
||||
$(OUTPREFIX)pearl.js $(OUTPREFIX)pegs.js \
|
||||
$(OUTPREFIX)range.js $(OUTPREFIX)rect.js \
|
||||
$(OUTPREFIX)samegame.js $(OUTPREFIX)signpost.js \
|
||||
$(OUTPREFIX)singles.js $(OUTPREFIX)sixteen.js \
|
||||
$(OUTPREFIX)slant.js $(OUTPREFIX)solo.js \
|
||||
$(OUTPREFIX)tents.js $(OUTPREFIX)towers.js \
|
||||
$(OUTPREFIX)tracks.js $(OUTPREFIX)twiddle.js \
|
||||
$(OUTPREFIX)undead.js $(OUTPREFIX)unequal.js \
|
||||
$(OUTPREFIX)unruly.js $(OUTPREFIX)untangle.js
|
||||
|
||||
$(OUTPREFIX)blackbox.js: blackbox.o drawing.o emcc.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)blackbox.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" blackbox.o drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)bridges.js: bridges.o drawing.o dsf.o findloop.o emcc.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)bridges.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" bridges.o drawing.o dsf.o findloop.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)cube.js: cube.o drawing.o emcc.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)cube.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" cube.o drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)dominosa.js: dominosa.o drawing.o emcc.o laydomino.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)dominosa.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" dominosa.o drawing.o emcc.o laydomino.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)fifteen.js: drawing.o fifteen.o emcc.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)fifteen.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o fifteen.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)filling.js: drawing.o dsf.o filling.o emcc.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)filling.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o filling.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)flip.js: drawing.o flip.o emcc.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)flip.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o flip.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)flood.js: drawing.o flood.o emcc.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)flood.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o flood.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)galaxies.js: drawing.o dsf.o galaxies.o emcc.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)galaxies.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o galaxies.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)guess.js: drawing.o emcc.o guess.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)guess.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o guess.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)inertia.js: drawing.o emcc.o inertia.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)inertia.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o inertia.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)keen.js: drawing.o dsf.o emcc.o keen.o latin.o malloc.o \
|
||||
maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
tree234.o version.o emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)keen.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o emcc.o keen.o latin.o malloc.o maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)lightup.js: combi.o drawing.o emcc.o lightup.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)lightup.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" combi.o drawing.o emcc.o lightup.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)loopy.js: drawing.o dsf.o grid.o emcc.o loopgen.o loopy.o \
|
||||
malloc.o midend.o misc.o no-icon.o penrose.o printing.o ps.o \
|
||||
random.o tree234.o version.o emccpre.js emcclib.js \
|
||||
emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)loopy.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o grid.o emcc.o loopgen.o loopy.o malloc.o midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)magnets.js: drawing.o emcc.o laydomino.o magnets.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)magnets.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o laydomino.o magnets.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)map.js: drawing.o dsf.o emcc.o malloc.o map.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)map.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o emcc.o malloc.o map.o midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)mines.js: drawing.o emcc.o malloc.o midend.o mines.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)mines.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o mines.o misc.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)net.js: drawing.o dsf.o findloop.o emcc.o malloc.o midend.o \
|
||||
misc.o net.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)net.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o findloop.o emcc.o malloc.o midend.o misc.o net.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)netslide.js: drawing.o emcc.o malloc.o midend.o misc.o \
|
||||
netslide.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)netslide.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o netslide.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)nullgame.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
nullgame.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)nullgame.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o nullgame.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)palisade.js: divvy.o drawing.o dsf.o emcc.o malloc.o midend.o \
|
||||
misc.o no-icon.o palisade.o printing.o ps.o random.o \
|
||||
version.o emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)palisade.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" divvy.o drawing.o dsf.o emcc.o malloc.o midend.o misc.o no-icon.o palisade.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)pattern.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
pattern.o printing.o ps.o random.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)pattern.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o pattern.o printing.o ps.o random.o version.o
|
||||
|
||||
$(OUTPREFIX)pearl.js: drawing.o dsf.o grid.o emcc.o loopgen.o malloc.o \
|
||||
midend.o misc.o no-icon.o pearl.o penrose.o printing.o ps.o \
|
||||
random.o tdq.o tree234.o version.o emccpre.js emcclib.js \
|
||||
emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)pearl.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o grid.o emcc.o loopgen.o malloc.o midend.o misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o tdq.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)pegs.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
pegs.o printing.o ps.o random.o tree234.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)pegs.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o pegs.o printing.o ps.o random.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)range.js: drawing.o dsf.o emcc.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o range.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)range.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o range.o version.o
|
||||
|
||||
$(OUTPREFIX)rect.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o rect.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)rect.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o rect.o version.o
|
||||
|
||||
$(OUTPREFIX)samegame.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o samegame.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)samegame.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o samegame.o version.o
|
||||
|
||||
$(OUTPREFIX)signpost.js: drawing.o dsf.o emcc.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o signpost.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)signpost.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o signpost.o version.o
|
||||
|
||||
$(OUTPREFIX)singles.js: drawing.o dsf.o emcc.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o singles.o \
|
||||
tree234.o version.o emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)singles.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o emcc.o latin.o malloc.o maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o singles.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)sixteen.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o sixteen.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)sixteen.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o sixteen.o version.o
|
||||
|
||||
$(OUTPREFIX)slant.js: drawing.o dsf.o findloop.o emcc.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o slant.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)slant.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o findloop.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o slant.o version.o
|
||||
|
||||
$(OUTPREFIX)solo.js: divvy.o drawing.o dsf.o emcc.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o solo.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)solo.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" divvy.o drawing.o dsf.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o solo.o version.o
|
||||
|
||||
$(OUTPREFIX)tents.js: drawing.o dsf.o emcc.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tents.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)tents.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o emcc.o malloc.o maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o tents.o version.o
|
||||
|
||||
$(OUTPREFIX)towers.js: drawing.o emcc.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o \
|
||||
version.o emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)towers.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o latin.o malloc.o maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o version.o
|
||||
|
||||
$(OUTPREFIX)tracks.js: drawing.o dsf.o findloop.o emcc.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tracks.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)tracks.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o dsf.o findloop.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o tracks.o version.o
|
||||
|
||||
$(OUTPREFIX)twiddle.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o twiddle.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)twiddle.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o twiddle.o version.o
|
||||
|
||||
$(OUTPREFIX)undead.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o undead.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)undead.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o undead.o version.o
|
||||
|
||||
$(OUTPREFIX)unequal.js: drawing.o emcc.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
unequal.o version.o emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)unequal.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o latin.o malloc.o maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o unequal.o version.o
|
||||
|
||||
$(OUTPREFIX)unruly.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o unruly.o version.o emccpre.js \
|
||||
emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)unruly.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o unruly.o version.o
|
||||
|
||||
$(OUTPREFIX)untangle.js: drawing.o emcc.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o untangle.o version.o \
|
||||
emccpre.js emcclib.js emccx.json
|
||||
$(EMCC) -o $(OUTPREFIX)untangle.js -O2 -s ASM_JS=1 --pre-js emccpre.js --js-library emcclib.js -s EXPORTED_FUNCTIONS="`sed 's://.*::' emccx.json | tr -d ' \n'`" drawing.o emcc.o malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o untangle.o version.o
|
||||
|
||||
blackbox.o: ./blackbox.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
blackbo3.o: ./blackbox.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
bridges.o: ./bridges.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
bridges3.o: ./bridges.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
combi.o: ./combi.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube.o: ./cube.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube3.o: ./cube.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
divvy.o: ./divvy.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominosa.o: ./dominosa.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominos3.o: ./dominosa.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
drawing.o: ./drawing.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dsf.o: ./dsf.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen.o: ./fifteen.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen5.o: ./fifteen.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
fifteen2.o: ./fifteen.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
filling.o: ./filling.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
filling5.o: ./filling.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
filling2.o: ./filling.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
findloop.o: ./findloop.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip3.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
flood.o: ./flood.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flood3.o: ./flood.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxies.o: ./galaxies.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
galaxie7.o: ./galaxies.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxie4.o: ./galaxies.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
galaxie2.o: ./galaxies.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
grid.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
emcc.o: ./emcc.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess.o: ./guess.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess3.o: ./guess.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
inertia.o: ./inertia.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
inertia3.o: ./inertia.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
keen5.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen2.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
latin.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
latin8.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@
|
||||
latin6.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
laydomino.o: ./laydomino.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup.o: ./lightup.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup5.o: ./lightup.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
lightup2.o: ./lightup.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
list.o: ./list.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopgen.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy5.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
loopy2.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
magnets.o: ./magnets.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
magnets5.o: ./magnets.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
magnets2.o: ./magnets.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
malloc.o: ./malloc.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map.o: ./map.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map5.o: ./map.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
map2.o: ./map.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
maxflow.o: ./maxflow.c ./maxflow.h ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
midend.o: ./midend.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines5.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
mines2.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@
|
||||
misc.o: ./misc.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net3.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
netslide.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
netslid3.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
no-icon.o: ./no-icon.c
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullfe.o: ./nullfe.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullgame.o: ./nullgame.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
obfusc.o: ./obfusc.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
osx.o: ./osx.m ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisade.o: ./palisade.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisad3.o: ./palisade.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern.o: ./pattern.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pattern7.o: ./pattern.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern4.o: ./pattern.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
pattern2.o: ./pattern.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pearl.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pearl5.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pearl2.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pegs.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pegs3.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
penrose.o: ./penrose.c ./puzzles.h ./penrose.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
printing.o: ./printing.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
ps.o: ./ps.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
random.o: ./random.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range.o: ./range.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range3.o: ./range.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
rect.o: ./rect.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
rect3.o: ./rect.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
samegame.o: ./samegame.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
samegam3.o: ./samegame.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpost.o: ./signpost.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
signpos5.o: ./signpost.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpos2.o: ./signpost.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
singles.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
singles5.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
singles3.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
sixteen.o: ./sixteen.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
sixteen3.o: ./sixteen.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant.o: ./slant.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
slant5.o: ./slant.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant2.o: ./slant.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
solo.o: ./solo.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
solo5.o: ./solo.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
solo2.o: ./solo.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tdq.o: ./tdq.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents5.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tents3.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
towers.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
towers5.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
towers2.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tracks.o: ./tracks.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tracks3.o: ./tracks.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tree234.o: ./tree234.c ./tree234.h ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle.o: ./twiddle.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle3.o: ./twiddle.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
undead.o: ./undead.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
undead3.o: ./undead.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unequal5.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal2.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
unruly.o: ./unruly.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unruly5.o: ./unruly.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unruly2.o: ./unruly.c ./puzzles.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
untangle.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
untangl3.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
version.o: ./version.c ./version.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows1.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(EMCC) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf *.o $(OUTPREFIX)blackbox.js $(OUTPREFIX)bridges.js $(OUTPREFIX)cube.js $(OUTPREFIX)dominosa.js $(OUTPREFIX)fifteen.js $(OUTPREFIX)filling.js $(OUTPREFIX)flip.js $(OUTPREFIX)flood.js $(OUTPREFIX)galaxies.js $(OUTPREFIX)guess.js $(OUTPREFIX)inertia.js $(OUTPREFIX)keen.js $(OUTPREFIX)lightup.js $(OUTPREFIX)loopy.js $(OUTPREFIX)magnets.js $(OUTPREFIX)map.js $(OUTPREFIX)mines.js $(OUTPREFIX)net.js $(OUTPREFIX)netslide.js $(OUTPREFIX)nullgame.js $(OUTPREFIX)palisade.js $(OUTPREFIX)pattern.js $(OUTPREFIX)pearl.js $(OUTPREFIX)pegs.js $(OUTPREFIX)range.js $(OUTPREFIX)rect.js $(OUTPREFIX)samegame.js $(OUTPREFIX)signpost.js $(OUTPREFIX)singles.js $(OUTPREFIX)sixteen.js $(OUTPREFIX)slant.js $(OUTPREFIX)solo.js $(OUTPREFIX)tents.js $(OUTPREFIX)towers.js $(OUTPREFIX)tracks.js $(OUTPREFIX)twiddle.js $(OUTPREFIX)undead.js $(OUTPREFIX)unequal.js $(OUTPREFIX)unruly.js $(OUTPREFIX)untangle.js
|
||||
412
apps/plugins/puzzles/src/Makefile.gnustep
Normal file
412
apps/plugins/puzzles/src/Makefile.gnustep
Normal file
|
|
@ -0,0 +1,412 @@
|
|||
# Makefile for puzzles under GNUstep.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
NEEDS_GUI=yes
|
||||
include $(GNUSTEP_MAKEFILES)/common.make
|
||||
include $(GNUSTEP_MAKEFILES)/rules.make
|
||||
include $(GNUSTEP_MAKEFILES)/Instance/rules.make
|
||||
|
||||
all:: Puzzles fifteensolver fillingsolver galaxiespicture galaxiessolver \
|
||||
keensolver latincheck lightupsolver loopysolver \
|
||||
magnetssolver mapsolver mineobfusc obfusc patternpicture \
|
||||
patternsolver pearlbench signpostsolver singlessolver \
|
||||
slantsolver solosolver tentssolver towerssolver \
|
||||
unequalsolver unrulysolver
|
||||
|
||||
.SUFFIXES: .o .c .m
|
||||
|
||||
|
||||
|
||||
Puzzles.app:
|
||||
mkdir -p $@
|
||||
Puzzles.app/Resources: Puzzles.app
|
||||
mkdir -p $@
|
||||
Puzzles.app/Resources/Puzzles.icns: Puzzles.app/Resources osx.icns
|
||||
cp osx.icns $@
|
||||
Puzzles.app/Info.plist: Puzzles.app osx-info.plist
|
||||
cp osx-info.plist $@
|
||||
Puzzles: Puzzles.app Puzzles.app/Puzzles \
|
||||
Puzzles.app/Resources/Puzzles.icns Puzzles.app/Info.plist \
|
||||
$(Puzzles_extra)
|
||||
|
||||
Puzzles.app/Puzzles: blackbo3.o bridges3.o combi.o cube3.o divvy.o \
|
||||
dominos3.o drawing.o dsf.o fifteen5.o filling5.o findloop.o \
|
||||
flip3.o flood3.o galaxie7.o grid.o guess3.o inertia3.o \
|
||||
keen5.o latin.o laydomino.o lightup5.o list.o loopgen.o \
|
||||
loopy5.o magnets5.o malloc.o map5.o maxflow.o midend.o \
|
||||
mines5.o misc.o net3.o netslid3.o osx.o palisad3.o \
|
||||
pattern7.o pearl5.o pegs3.o penrose.o random.o range3.o \
|
||||
rect3.o samegam3.o signpos5.o singles5.o sixteen3.o slant5.o \
|
||||
solo5.o tdq.o tents5.o towers5.o tracks3.o tree234.o \
|
||||
twiddle3.o undead3.o unequal5.o unruly5.o untangl3.o \
|
||||
version.o
|
||||
$(CC) $(ALL_LDFLAGS) -o $@ blackbo3.o bridges3.o combi.o cube3.o \
|
||||
divvy.o dominos3.o drawing.o dsf.o fifteen5.o filling5.o \
|
||||
findloop.o flip3.o flood3.o galaxie7.o grid.o guess3.o \
|
||||
inertia3.o keen5.o latin.o laydomino.o lightup5.o list.o \
|
||||
loopgen.o loopy5.o magnets5.o malloc.o map5.o maxflow.o \
|
||||
midend.o mines5.o misc.o net3.o netslid3.o osx.o palisad3.o \
|
||||
pattern7.o pearl5.o pegs3.o penrose.o random.o range3.o \
|
||||
rect3.o samegam3.o signpos5.o singles5.o sixteen3.o slant5.o \
|
||||
solo5.o tdq.o tents5.o towers5.o tracks3.o tree234.o \
|
||||
twiddle3.o undead3.o unequal5.o unruly5.o untangl3.o \
|
||||
version.o $(ALL_LIB_DIRS) $(ALL_LIBS)
|
||||
|
||||
fifteensolver: fifteen2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ fifteen2.o malloc.o misc.o nullfe.o random.o
|
||||
|
||||
fillingsolver: dsf.o filling2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o filling2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
|
||||
galaxiespicture: dsf.o galaxie4.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o galaxie4.o malloc.o misc.o nullfe.o \
|
||||
random.o -lm
|
||||
|
||||
galaxiessolver: dsf.o galaxie2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o galaxie2.o malloc.o misc.o nullfe.o \
|
||||
random.o -lm
|
||||
|
||||
keensolver: dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o tree234.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o keen2.o latin6.o malloc.o maxflow.o \
|
||||
misc.o nullfe.o random.o tree234.o
|
||||
|
||||
latincheck: latin8.o malloc.o maxflow.o misc.o nullfe.o random.o tree234.o
|
||||
$(CC) $(ULDFLAGS) -o $@ latin8.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o tree234.o
|
||||
|
||||
lightupsolver: combi.o lightup2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ combi.o lightup2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
|
||||
loopysolver: dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o nullfe.o \
|
||||
penrose.o random.o tree234.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o grid.o loopgen.o loopy2.o malloc.o \
|
||||
misc.o nullfe.o penrose.o random.o tree234.o -lm
|
||||
|
||||
magnetssolver: laydomino.o magnets2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ laydomino.o magnets2.o malloc.o misc.o \
|
||||
nullfe.o random.o -lm
|
||||
|
||||
mapsolver: dsf.o malloc.o map2.o misc.o nullfe.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o malloc.o map2.o misc.o nullfe.o \
|
||||
random.o -lm
|
||||
|
||||
mineobfusc: malloc.o mines2.o misc.o nullfe.o random.o tree234.o
|
||||
$(CC) $(ULDFLAGS) -o $@ malloc.o mines2.o misc.o nullfe.o random.o \
|
||||
tree234.o
|
||||
|
||||
obfusc: malloc.o misc.o nullfe.o obfusc.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ malloc.o misc.o nullfe.o obfusc.o random.o
|
||||
|
||||
patternpicture: malloc.o misc.o nullfe.o pattern4.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ malloc.o misc.o nullfe.o pattern4.o random.o
|
||||
|
||||
patternsolver: malloc.o misc.o nullfe.o pattern2.o random.o
|
||||
$(CC) $(ULDFLAGS) -o $@ malloc.o misc.o nullfe.o pattern2.o random.o
|
||||
|
||||
pearlbench: dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o pearl2.o \
|
||||
penrose.o random.o tdq.o tree234.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o grid.o loopgen.o malloc.o misc.o \
|
||||
nullfe.o pearl2.o penrose.o random.o tdq.o tree234.o -lm
|
||||
|
||||
signpostsolver: dsf.o malloc.o misc.o nullfe.o random.o signpos2.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o malloc.o misc.o nullfe.o random.o \
|
||||
signpos2.o -lm
|
||||
|
||||
singlessolver: dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
singles3.o tree234.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o latin.o malloc.o maxflow.o misc.o \
|
||||
nullfe.o random.o singles3.o tree234.o
|
||||
|
||||
slantsolver: dsf.o findloop.o malloc.o misc.o nullfe.o random.o slant2.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o findloop.o malloc.o misc.o nullfe.o \
|
||||
random.o slant2.o
|
||||
|
||||
solosolver: divvy.o dsf.o malloc.o misc.o nullfe.o random.o solo2.o
|
||||
$(CC) $(ULDFLAGS) -o $@ divvy.o dsf.o malloc.o misc.o nullfe.o \
|
||||
random.o solo2.o
|
||||
|
||||
tentssolver: dsf.o malloc.o maxflow.o misc.o nullfe.o random.o tents3.o
|
||||
$(CC) $(ULDFLAGS) -o $@ dsf.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o tents3.o
|
||||
|
||||
towerssolver: latin6.o malloc.o maxflow.o misc.o nullfe.o random.o towers2.o \
|
||||
tree234.o
|
||||
$(CC) $(ULDFLAGS) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o towers2.o tree234.o
|
||||
|
||||
unequalsolver: latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o unequal2.o
|
||||
$(CC) $(ULDFLAGS) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o tree234.o unequal2.o
|
||||
|
||||
unrulysolver: malloc.o misc.o nullfe.o random.o unruly2.o
|
||||
$(CC) $(ULDFLAGS) -o $@ malloc.o misc.o nullfe.o random.o unruly2.o
|
||||
|
||||
blackbox.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
blackbo3.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
bridges.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
bridges3.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
combi.o: ./combi.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube3.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
divvy.o: ./divvy.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominosa.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominos3.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
drawing.o: ./drawing.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dsf.o: ./dsf.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen5.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
fifteen2.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
filling.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
filling5.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
filling2.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
findloop.o: ./findloop.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip3.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
flood.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flood3.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxies.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
galaxie7.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxie4.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
galaxie2.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
grid.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
gtk.o: ./gtk.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess3.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
inertia.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
inertia3.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
keen5.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen2.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
latin.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
latin8.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@
|
||||
latin6.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
laydomino.o: ./laydomino.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup5.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
lightup2.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
list.o: ./list.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopgen.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy5.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
loopy2.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
magnets.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
magnets5.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
magnets2.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
malloc.o: ./malloc.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map.o: ./map.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map5.o: ./map.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
map2.o: ./map.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
maxflow.o: ./maxflow.c ./maxflow.h ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
midend.o: ./midend.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines5.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
mines2.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@
|
||||
misc.o: ./misc.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net3.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
netslide.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
netslid3.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
no-icon.o: ./no-icon.c
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullfe.o: ./nullfe.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullgame.o: ./nullgame.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
obfusc.o: ./obfusc.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
osx.o: ./osx.m ./puzzles.h
|
||||
$(CC) -DGNUSTEP $(ALL_OBJCFLAGS) $(COMPAT) $(FWHACK) $(OBJCFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisade.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisad3.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pattern7.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern4.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
pattern2.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pearl.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pearl5.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pearl2.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pegs.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pegs3.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
penrose.o: ./penrose.c ./puzzles.h ./penrose.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
printing.o: ./printing.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
ps.o: ./ps.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
random.o: ./random.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range.o: ./range.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range3.o: ./range.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
rect.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
rect3.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
samegame.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
samegam3.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpost.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
signpos5.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpos2.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
singles.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
singles5.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
singles3.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
sixteen.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
sixteen3.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
slant5.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant2.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
solo.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
solo5.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
solo2.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tdq.o: ./tdq.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents5.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tents3.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
towers.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
towers5.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
towers2.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tracks.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tracks3.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tree234.o: ./tree234.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle3.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
undead.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
undead3.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unequal5.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal2.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
unruly.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unruly5.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unruly2.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
untangle.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
untangl3.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
version.o: ./version.c ./version.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows1.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(ALL_CFLAGS) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
|
||||
clean::
|
||||
rm -f *.o fifteensolver fillingsolver galaxiespicture galaxiessolver keensolver latincheck lightupsolver loopysolver magnetssolver mapsolver mineobfusc obfusc patternpicture patternsolver pearlbench signpostsolver singlessolver slantsolver solosolver tentssolver towerssolver unequalsolver unrulysolver
|
||||
rm -rf *.app
|
||||
727
apps/plugins/puzzles/src/Makefile.gtk
Normal file
727
apps/plugins/puzzles/src/Makefile.gtk
Normal file
|
|
@ -0,0 +1,727 @@
|
|||
# Makefile for puzzles under X/GTK and Unix.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
|
||||
# You can define this path to point at your tools if you need to
|
||||
# TOOLPATH = /opt/gcc/bin
|
||||
CC := $(TOOLPATH)$(CC)
|
||||
# You can manually set this to `gtk-config' or `pkg-config gtk+-1.2'
|
||||
# (depending on what works on your system) if you want to enforce
|
||||
# building with GTK 1.2, or you can set it to `pkg-config gtk+-2.0'
|
||||
# if you want to enforce 2.0. The default is to try 2.0 and fall back
|
||||
# to 1.2 if it isn't found.
|
||||
GTK_CONFIG = sh -c 'pkg-config gtk+-2.0 $$0 2>/dev/null || gtk-config $$0'
|
||||
|
||||
CFLAGS := -O2 -Wall -Werror -ansi -pedantic -g -I./ -Iicons/ `$(GTK_CONFIG) \
|
||||
--cflags` $(CFLAGS)
|
||||
XLIBS = `$(GTK_CONFIG) --libs` -lm
|
||||
ULIBS = -lm#
|
||||
INSTALL=install
|
||||
INSTALL_PROGRAM=$(INSTALL)
|
||||
INSTALL_DATA=$(INSTALL)
|
||||
prefix=/usr/local
|
||||
exec_prefix=$(prefix)
|
||||
bindir=$(exec_prefix)/bin
|
||||
gamesdir=$(exec_prefix)/games
|
||||
mandir=$(prefix)/man
|
||||
man1dir=$(mandir)/man1
|
||||
|
||||
all: $(BINPREFIX)blackbox $(BINPREFIX)bridges $(BINPREFIX)cube \
|
||||
$(BINPREFIX)dominosa $(BINPREFIX)fifteen \
|
||||
$(BINPREFIX)fifteensolver $(BINPREFIX)filling \
|
||||
$(BINPREFIX)fillingsolver $(BINPREFIX)flip $(BINPREFIX)flood \
|
||||
$(BINPREFIX)galaxies $(BINPREFIX)galaxiespicture \
|
||||
$(BINPREFIX)galaxiessolver $(BINPREFIX)guess \
|
||||
$(BINPREFIX)inertia $(BINPREFIX)keen $(BINPREFIX)keensolver \
|
||||
$(BINPREFIX)latincheck $(BINPREFIX)lightup \
|
||||
$(BINPREFIX)lightupsolver $(BINPREFIX)loopy \
|
||||
$(BINPREFIX)loopysolver $(BINPREFIX)magnets \
|
||||
$(BINPREFIX)magnetssolver $(BINPREFIX)map \
|
||||
$(BINPREFIX)mapsolver $(BINPREFIX)mineobfusc \
|
||||
$(BINPREFIX)mines $(BINPREFIX)net $(BINPREFIX)netslide \
|
||||
$(BINPREFIX)nullgame $(BINPREFIX)obfusc $(BINPREFIX)palisade \
|
||||
$(BINPREFIX)pattern $(BINPREFIX)patternpicture \
|
||||
$(BINPREFIX)patternsolver $(BINPREFIX)pearl \
|
||||
$(BINPREFIX)pearlbench $(BINPREFIX)pegs $(BINPREFIX)range \
|
||||
$(BINPREFIX)rect $(BINPREFIX)samegame $(BINPREFIX)signpost \
|
||||
$(BINPREFIX)signpostsolver $(BINPREFIX)singles \
|
||||
$(BINPREFIX)singlessolver $(BINPREFIX)sixteen \
|
||||
$(BINPREFIX)slant $(BINPREFIX)slantsolver $(BINPREFIX)solo \
|
||||
$(BINPREFIX)solosolver $(BINPREFIX)tents \
|
||||
$(BINPREFIX)tentssolver $(BINPREFIX)towers \
|
||||
$(BINPREFIX)towerssolver $(BINPREFIX)tracks \
|
||||
$(BINPREFIX)twiddle $(BINPREFIX)undead $(BINPREFIX)unequal \
|
||||
$(BINPREFIX)unequalsolver $(BINPREFIX)unruly \
|
||||
$(BINPREFIX)unrulysolver $(BINPREFIX)untangle
|
||||
|
||||
$(BINPREFIX)blackbox: blackbox.o drawing.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ blackbox.o drawing.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)bridges: bridges.o drawing.o dsf.o findloop.o gtk.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ bridges.o drawing.o dsf.o findloop.o gtk.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)cube: cube.o drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ cube.o drawing.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)dominosa: dominosa.o drawing.o gtk.o laydomino.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ dominosa.o drawing.o gtk.o laydomino.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)fifteen: drawing.o fifteen.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o fifteen.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)fifteensolver: fifteen2.o malloc.o misc.o nullfe.o random.o
|
||||
$(CC) -o $@ fifteen2.o malloc.o misc.o nullfe.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)filling: drawing.o dsf.o filling.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o filling.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)fillingsolver: dsf.o filling2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ dsf.o filling2.o malloc.o misc.o nullfe.o random.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)flip: drawing.o flip.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o flip.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)flood: drawing.o flood.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o flood.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)galaxies: drawing.o dsf.o galaxies.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o galaxies.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)galaxiespicture: dsf.o galaxie4.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ dsf.o galaxie4.o malloc.o misc.o nullfe.o random.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)galaxiessolver: dsf.o galaxie2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ dsf.o galaxie2.o malloc.o misc.o nullfe.o random.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)guess: drawing.o gtk.o guess.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o guess.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)inertia: drawing.o gtk.o inertia.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o inertia.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)keen: drawing.o dsf.o gtk.o keen.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o keen.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)keensolver: dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o \
|
||||
nullfe.o random.o tree234.o
|
||||
$(CC) -o $@ dsf.o keen2.o latin6.o malloc.o maxflow.o misc.o \
|
||||
nullfe.o random.o tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)latincheck: latin8.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o
|
||||
$(CC) -o $@ latin8.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)lightup: combi.o drawing.o gtk.o lightup.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ combi.o drawing.o gtk.o lightup.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)lightupsolver: combi.o lightup2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ combi.o lightup2.o malloc.o misc.o nullfe.o random.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)loopy: drawing.o dsf.o grid.o gtk.o loopgen.o loopy.o malloc.o \
|
||||
midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o \
|
||||
tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o grid.o gtk.o loopgen.o loopy.o malloc.o \
|
||||
midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o \
|
||||
tree234.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)loopysolver: dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o \
|
||||
nullfe.o penrose.o random.o tree234.o
|
||||
$(CC) -o $@ dsf.o grid.o loopgen.o loopy2.o malloc.o misc.o nullfe.o \
|
||||
penrose.o random.o tree234.o -lm $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)magnets: drawing.o gtk.o laydomino.o magnets.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o laydomino.o magnets.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)magnetssolver: laydomino.o magnets2.o malloc.o misc.o nullfe.o \
|
||||
random.o
|
||||
$(CC) -o $@ laydomino.o magnets2.o malloc.o misc.o nullfe.o random.o \
|
||||
-lm $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)map: drawing.o dsf.o gtk.o malloc.o map.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o map.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)mapsolver: dsf.o malloc.o map2.o misc.o nullfe.o random.o
|
||||
$(CC) -o $@ dsf.o malloc.o map2.o misc.o nullfe.o random.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)mineobfusc: malloc.o mines2.o misc.o nullfe.o random.o tree234.o
|
||||
$(CC) -o $@ malloc.o mines2.o misc.o nullfe.o random.o tree234.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)mines: drawing.o gtk.o malloc.o midend.o mines.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o mines.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)net: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o misc.o \
|
||||
net.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o net.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)netslide: drawing.o gtk.o malloc.o midend.o misc.o netslide.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o netslide.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)nullgame: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
nullgame.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
nullgame.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)obfusc: malloc.o misc.o nullfe.o obfusc.o random.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o obfusc.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)palisade: divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o palisade.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o palisade.o printing.o ps.o random.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)pattern: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
pattern.o printing.o ps.o random.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
pattern.o printing.o ps.o random.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)patternpicture: malloc.o misc.o nullfe.o pattern4.o random.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o pattern4.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)patternsolver: malloc.o misc.o nullfe.o pattern2.o random.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o pattern2.o random.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)pearl: drawing.o dsf.o grid.o gtk.o loopgen.o malloc.o midend.o \
|
||||
misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o \
|
||||
tdq.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o grid.o gtk.o loopgen.o malloc.o midend.o \
|
||||
misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o \
|
||||
tdq.o tree234.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)pearlbench: dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o \
|
||||
pearl2.o penrose.o random.o tdq.o tree234.o
|
||||
$(CC) -o $@ dsf.o grid.o loopgen.o malloc.o misc.o nullfe.o pearl2.o \
|
||||
penrose.o random.o tdq.o tree234.o -lm $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)pegs: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o pegs.o \
|
||||
printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
pegs.o printing.o ps.o random.o tree234.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)range: drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o range.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o range.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)rect: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o rect.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o rect.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)samegame: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o samegame.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o samegame.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)signpost: drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o signpost.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o signpost.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)signpostsolver: dsf.o malloc.o misc.o nullfe.o random.o \
|
||||
signpos2.o
|
||||
$(CC) -o $@ dsf.o malloc.o misc.o nullfe.o random.o signpos2.o -lm \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)singles: drawing.o dsf.o gtk.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o singles.o \
|
||||
tree234.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o singles.o \
|
||||
tree234.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)singlessolver: dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o singles3.o tree234.o
|
||||
$(CC) -o $@ dsf.o latin.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o singles3.o tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)sixteen: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o sixteen.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o sixteen.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)slant: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o slant.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o slant.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)slantsolver: dsf.o findloop.o malloc.o misc.o nullfe.o random.o \
|
||||
slant2.o
|
||||
$(CC) -o $@ dsf.o findloop.o malloc.o misc.o nullfe.o random.o \
|
||||
slant2.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)solo: divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o solo.o version.o
|
||||
$(CC) -o $@ divvy.o drawing.o dsf.o gtk.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o solo.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)solosolver: divvy.o dsf.o malloc.o misc.o nullfe.o random.o \
|
||||
solo2.o
|
||||
$(CC) -o $@ divvy.o dsf.o malloc.o misc.o nullfe.o random.o solo2.o \
|
||||
$(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)tents: drawing.o dsf.o gtk.o malloc.o maxflow.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tents.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o gtk.o malloc.o maxflow.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tents.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)tentssolver: dsf.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tents3.o
|
||||
$(CC) -o $@ dsf.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tents3.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)towers: drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o \
|
||||
version.o
|
||||
$(CC) -o $@ drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o towers.o tree234.o \
|
||||
version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)towerssolver: latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o towers2.o tree234.o
|
||||
$(CC) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
towers2.o tree234.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)tracks: drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tracks.o version.o
|
||||
$(CC) -o $@ drawing.o dsf.o findloop.o gtk.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tracks.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)twiddle: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o twiddle.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o twiddle.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)undead: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o undead.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o undead.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)unequal: drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
unequal.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
unequal.o version.o $(XLFLAGS) $(XLIBS)
|
||||
|
||||
$(BINPREFIX)unequalsolver: latin6.o malloc.o maxflow.o misc.o nullfe.o \
|
||||
random.o tree234.o unequal2.o
|
||||
$(CC) -o $@ latin6.o malloc.o maxflow.o misc.o nullfe.o random.o \
|
||||
tree234.o unequal2.o $(XLFLAGS) $(ULIBS)
|
||||
|
||||
$(BINPREFIX)unruly: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o unruly.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o unruly.o version.o $(XLFLAGS) \
|
||||
$(XLIBS)
|
||||
|
||||
$(BINPREFIX)unrulysolver: malloc.o misc.o nullfe.o random.o unruly2.o
|
||||
$(CC) -o $@ malloc.o misc.o nullfe.o random.o unruly2.o $(XLFLAGS) \
|
||||
$(ULIBS)
|
||||
|
||||
$(BINPREFIX)untangle: drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o untangle.o version.o
|
||||
$(CC) -o $@ drawing.o gtk.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o untangle.o version.o \
|
||||
$(XLFLAGS) $(XLIBS)
|
||||
|
||||
blackbox.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
blackbo3.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
bridges.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
bridges3.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
combi.o: ./combi.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube3.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
divvy.o: ./divvy.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominosa.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominos3.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
drawing.o: ./drawing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dsf.o: ./dsf.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen5.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
fifteen2.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
filling.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
filling5.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
filling2.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
findloop.o: ./findloop.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip3.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
flood.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flood3.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxies.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
galaxie7.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxie4.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
galaxie2.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
grid.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
gtk.o: ./gtk.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess3.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
inertia.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
inertia3.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
keen5.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen2.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
latin.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
latin8.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@
|
||||
latin6.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
laydomino.o: ./laydomino.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup5.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
lightup2.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
list.o: ./list.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopgen.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy5.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
loopy2.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
magnets.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
magnets5.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
magnets2.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
malloc.o: ./malloc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map5.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
map2.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
maxflow.o: ./maxflow.c ./maxflow.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
midend.o: ./midend.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines5.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
mines2.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@
|
||||
misc.o: ./misc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net3.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
netslide.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
netslid3.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
no-icon.o: ./no-icon.c
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullfe.o: ./nullfe.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullgame.o: ./nullgame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
obfusc.o: ./obfusc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
osx.o: ./osx.m ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisade.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisad3.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pattern7.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern4.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
pattern2.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pearl.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pearl5.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pearl2.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pegs.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pegs3.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
penrose.o: ./penrose.c ./puzzles.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
printing.o: ./printing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
ps.o: ./ps.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
random.o: ./random.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range3.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
rect.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
rect3.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
samegame.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
samegam3.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpost.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
signpos5.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpos2.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
singles.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
singles5.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
singles3.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
sixteen.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
sixteen3.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
slant5.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant2.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
solo.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
solo5.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
solo2.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tdq.o: ./tdq.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents5.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tents3.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
towers.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
towers5.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
towers2.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tracks.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tracks3.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tree234.o: ./tree234.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle3.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
undead.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
undead3.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unequal5.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal2.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
unruly.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unruly5.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unruly2.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
untangle.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
untangl3.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
version.o: ./version.c ./version.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows1.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
|
||||
GAMES += blackbox
|
||||
GAMES += bridges
|
||||
GAMES += cube
|
||||
GAMES += dominosa
|
||||
GAMES += fifteen
|
||||
GAMES += filling
|
||||
GAMES += flip
|
||||
GAMES += flood
|
||||
GAMES += galaxies
|
||||
GAMES += guess
|
||||
GAMES += inertia
|
||||
GAMES += keen
|
||||
GAMES += lightup
|
||||
GAMES += loopy
|
||||
GAMES += magnets
|
||||
GAMES += map
|
||||
GAMES += mines
|
||||
GAMES += net
|
||||
GAMES += netslide
|
||||
GAMES += palisade
|
||||
GAMES += pattern
|
||||
GAMES += pearl
|
||||
GAMES += pegs
|
||||
GAMES += range
|
||||
GAMES += rect
|
||||
GAMES += samegame
|
||||
GAMES += signpost
|
||||
GAMES += singles
|
||||
GAMES += sixteen
|
||||
GAMES += slant
|
||||
GAMES += solo
|
||||
GAMES += tents
|
||||
GAMES += towers
|
||||
GAMES += tracks
|
||||
GAMES += twiddle
|
||||
GAMES += undead
|
||||
GAMES += unequal
|
||||
GAMES += unruly
|
||||
GAMES += untangle
|
||||
install:
|
||||
for i in $(GAMES); do \
|
||||
$(INSTALL_PROGRAM) -m 755 $(BINPREFIX)$$i $(DESTDIR)$(gamesdir)/$(BINPREFIX)$$i \
|
||||
|| exit 1; \
|
||||
done
|
||||
test: benchmark.html benchmark.txt
|
||||
|
||||
benchmark.html: benchmark.txt benchmark.pl
|
||||
./benchmark.pl benchmark.txt > $@
|
||||
|
||||
benchmark.txt: benchmark.sh $(GAMES)
|
||||
./benchmark.sh > $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -f *.o $(BINPREFIX)blackbox $(BINPREFIX)bridges $(BINPREFIX)cube $(BINPREFIX)dominosa $(BINPREFIX)fifteen $(BINPREFIX)fifteensolver $(BINPREFIX)filling $(BINPREFIX)fillingsolver $(BINPREFIX)flip $(BINPREFIX)flood $(BINPREFIX)galaxies $(BINPREFIX)galaxiespicture $(BINPREFIX)galaxiessolver $(BINPREFIX)guess $(BINPREFIX)inertia $(BINPREFIX)keen $(BINPREFIX)keensolver $(BINPREFIX)latincheck $(BINPREFIX)lightup $(BINPREFIX)lightupsolver $(BINPREFIX)loopy $(BINPREFIX)loopysolver $(BINPREFIX)magnets $(BINPREFIX)magnetssolver $(BINPREFIX)map $(BINPREFIX)mapsolver $(BINPREFIX)mineobfusc $(BINPREFIX)mines $(BINPREFIX)net $(BINPREFIX)netslide $(BINPREFIX)nullgame $(BINPREFIX)obfusc $(BINPREFIX)palisade $(BINPREFIX)pattern $(BINPREFIX)patternpicture $(BINPREFIX)patternsolver $(BINPREFIX)pearl $(BINPREFIX)pearlbench $(BINPREFIX)pegs $(BINPREFIX)range $(BINPREFIX)rect $(BINPREFIX)samegame $(BINPREFIX)signpost $(BINPREFIX)signpostsolver $(BINPREFIX)singles $(BINPREFIX)singlessolver $(BINPREFIX)sixteen $(BINPREFIX)slant $(BINPREFIX)slantsolver $(BINPREFIX)solo $(BINPREFIX)solosolver $(BINPREFIX)tents $(BINPREFIX)tentssolver $(BINPREFIX)towers $(BINPREFIX)towerssolver $(BINPREFIX)tracks $(BINPREFIX)twiddle $(BINPREFIX)undead $(BINPREFIX)unequal $(BINPREFIX)unequalsolver $(BINPREFIX)unruly $(BINPREFIX)unrulysolver $(BINPREFIX)untangle
|
||||
2611
apps/plugins/puzzles/src/Makefile.in
Normal file
2611
apps/plugins/puzzles/src/Makefile.in
Normal file
File diff suppressed because it is too large
Load diff
556
apps/plugins/puzzles/src/Makefile.nestedvm
Normal file
556
apps/plugins/puzzles/src/Makefile.nestedvm
Normal file
|
|
@ -0,0 +1,556 @@
|
|||
# Makefile for puzzles under NestedVM.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
|
||||
# This path points at the nestedvm root directory
|
||||
NESTEDVM = /opt/nestedvm
|
||||
# You can define this path to point at your tools if you need to
|
||||
TOOLPATH = $(NESTEDVM)/upstream/install/bin
|
||||
CC = $(TOOLPATH)/mips-unknown-elf-gcc
|
||||
|
||||
CFLAGS = -O2 -Wall -Werror -DSLOW_SYSTEM -g -I./ -Iicons/
|
||||
|
||||
all: blackbox.jar bridges.jar cube.jar dominosa.jar fifteen.jar filling.jar \
|
||||
flip.jar flood.jar galaxies.jar guess.jar inertia.jar \
|
||||
keen.jar lightup.jar loopy.jar magnets.jar map.jar mines.jar \
|
||||
net.jar netslide.jar nullgame.jar palisade.jar pattern.jar \
|
||||
pearl.jar pegs.jar range.jar rect.jar samegame.jar \
|
||||
signpost.jar singles.jar sixteen.jar slant.jar solo.jar \
|
||||
tents.jar towers.jar tracks.jar twiddle.jar undead.jar \
|
||||
unequal.jar unruly.jar untangle.jar
|
||||
|
||||
blackbox.mips: blackbox.o drawing.o nestedvm.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ blackbox.o drawing.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
-lm
|
||||
|
||||
bridges.mips: bridges.o drawing.o dsf.o findloop.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ bridges.o drawing.o dsf.o findloop.o \
|
||||
nestedvm.o malloc.o midend.o misc.o no-icon.o printing.o \
|
||||
ps.o random.o version.o -lm
|
||||
|
||||
cube.mips: cube.o drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ cube.o drawing.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
-lm
|
||||
|
||||
dominosa.mips: dominosa.o drawing.o nestedvm.o laydomino.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ dominosa.o drawing.o nestedvm.o laydomino.o \
|
||||
malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
version.o -lm
|
||||
|
||||
fifteen.mips: drawing.o fifteen.o nestedvm.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o fifteen.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
-lm
|
||||
|
||||
filling.mips: drawing.o dsf.o filling.o nestedvm.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o filling.o nestedvm.o \
|
||||
malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
version.o -lm
|
||||
|
||||
flip.mips: drawing.o flip.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o flip.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o -lm
|
||||
|
||||
flood.mips: drawing.o flood.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o flood.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
-lm
|
||||
|
||||
galaxies.mips: drawing.o dsf.o galaxies.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o galaxies.o nestedvm.o \
|
||||
malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
version.o -lm
|
||||
|
||||
guess.mips: drawing.o nestedvm.o guess.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o guess.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
-lm
|
||||
|
||||
inertia.mips: drawing.o nestedvm.o inertia.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o inertia.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
-lm
|
||||
|
||||
keen.mips: drawing.o dsf.o nestedvm.o keen.o latin.o malloc.o maxflow.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o nestedvm.o keen.o latin.o \
|
||||
malloc.o maxflow.o midend.o misc.o no-icon.o printing.o ps.o \
|
||||
random.o tree234.o version.o -lm
|
||||
|
||||
lightup.mips: combi.o drawing.o nestedvm.o lightup.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ combi.o drawing.o nestedvm.o lightup.o \
|
||||
malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
version.o -lm
|
||||
|
||||
loopy.mips: drawing.o dsf.o grid.o nestedvm.o loopgen.o loopy.o malloc.o \
|
||||
midend.o misc.o no-icon.o penrose.o printing.o ps.o random.o \
|
||||
tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o grid.o nestedvm.o loopgen.o \
|
||||
loopy.o malloc.o midend.o misc.o no-icon.o penrose.o \
|
||||
printing.o ps.o random.o tree234.o version.o -lm
|
||||
|
||||
magnets.mips: drawing.o nestedvm.o laydomino.o magnets.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o laydomino.o magnets.o \
|
||||
malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
version.o -lm
|
||||
|
||||
map.mips: drawing.o dsf.o nestedvm.o malloc.o map.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o nestedvm.o malloc.o map.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o version.o \
|
||||
-lm
|
||||
|
||||
mines.mips: drawing.o nestedvm.o malloc.o midend.o mines.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
mines.o misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
version.o -lm
|
||||
|
||||
net.mips: drawing.o dsf.o findloop.o nestedvm.o malloc.o midend.o misc.o \
|
||||
net.o no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o findloop.o nestedvm.o \
|
||||
malloc.o midend.o misc.o net.o no-icon.o printing.o ps.o \
|
||||
random.o tree234.o version.o -lm
|
||||
|
||||
netslide.mips: drawing.o nestedvm.o malloc.o midend.o misc.o netslide.o \
|
||||
no-icon.o printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o netslide.o no-icon.o printing.o ps.o random.o \
|
||||
tree234.o version.o -lm
|
||||
|
||||
nullgame.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
nullgame.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o nullgame.o printing.o ps.o random.o \
|
||||
version.o -lm
|
||||
|
||||
palisade.mips: divvy.o drawing.o dsf.o nestedvm.o malloc.o midend.o misc.o \
|
||||
no-icon.o palisade.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ divvy.o drawing.o dsf.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o palisade.o printing.o ps.o \
|
||||
random.o version.o -lm
|
||||
|
||||
pattern.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
pattern.o printing.o ps.o random.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o pattern.o printing.o ps.o random.o \
|
||||
version.o -lm
|
||||
|
||||
pearl.mips: drawing.o dsf.o grid.o nestedvm.o loopgen.o malloc.o midend.o \
|
||||
misc.o no-icon.o pearl.o penrose.o printing.o ps.o random.o \
|
||||
tdq.o tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o grid.o nestedvm.o loopgen.o \
|
||||
malloc.o midend.o misc.o no-icon.o pearl.o penrose.o \
|
||||
printing.o ps.o random.o tdq.o tree234.o version.o -lm
|
||||
|
||||
pegs.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o pegs.o \
|
||||
printing.o ps.o random.o tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o pegs.o printing.o ps.o random.o tree234.o \
|
||||
version.o -lm
|
||||
|
||||
range.mips: drawing.o dsf.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o range.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o range.o version.o \
|
||||
-lm
|
||||
|
||||
rect.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o rect.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o rect.o version.o \
|
||||
-lm
|
||||
|
||||
samegame.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o samegame.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o samegame.o \
|
||||
version.o -lm
|
||||
|
||||
signpost.mips: drawing.o dsf.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o signpost.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o signpost.o \
|
||||
version.o -lm
|
||||
|
||||
singles.mips: drawing.o dsf.o nestedvm.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o singles.o \
|
||||
tree234.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o nestedvm.o latin.o malloc.o \
|
||||
maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
singles.o tree234.o version.o -lm
|
||||
|
||||
sixteen.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o sixteen.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o sixteen.o \
|
||||
version.o -lm
|
||||
|
||||
slant.mips: drawing.o dsf.o findloop.o nestedvm.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o slant.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o findloop.o nestedvm.o \
|
||||
malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
slant.o version.o -lm
|
||||
|
||||
solo.mips: divvy.o drawing.o dsf.o nestedvm.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o solo.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ divvy.o drawing.o dsf.o nestedvm.o malloc.o \
|
||||
midend.o misc.o no-icon.o printing.o ps.o random.o solo.o \
|
||||
version.o -lm
|
||||
|
||||
tents.mips: drawing.o dsf.o nestedvm.o malloc.o maxflow.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tents.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o nestedvm.o malloc.o \
|
||||
maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
tents.o version.o -lm
|
||||
|
||||
towers.mips: drawing.o nestedvm.o latin.o malloc.o maxflow.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o towers.o tree234.o \
|
||||
version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o latin.o malloc.o \
|
||||
maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
towers.o tree234.o version.o -lm
|
||||
|
||||
tracks.mips: drawing.o dsf.o findloop.o nestedvm.o malloc.o midend.o misc.o \
|
||||
no-icon.o printing.o ps.o random.o tracks.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o dsf.o findloop.o nestedvm.o \
|
||||
malloc.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
tracks.o version.o -lm
|
||||
|
||||
twiddle.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o twiddle.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o twiddle.o \
|
||||
version.o -lm
|
||||
|
||||
undead.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o undead.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o undead.o version.o \
|
||||
-lm
|
||||
|
||||
unequal.mips: drawing.o nestedvm.o latin.o malloc.o maxflow.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
unequal.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o latin.o malloc.o \
|
||||
maxflow.o midend.o misc.o no-icon.o printing.o ps.o random.o \
|
||||
tree234.o unequal.o version.o -lm
|
||||
|
||||
unruly.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o unruly.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o unruly.o version.o \
|
||||
-lm
|
||||
|
||||
untangle.mips: drawing.o nestedvm.o malloc.o midend.o misc.o no-icon.o \
|
||||
printing.o ps.o random.o tree234.o untangle.o version.o
|
||||
$(CC) $(XLDFLAGS) -o $@ drawing.o nestedvm.o malloc.o midend.o \
|
||||
misc.o no-icon.o printing.o ps.o random.o tree234.o \
|
||||
untangle.o version.o -lm
|
||||
|
||||
blackbox.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
blackbo3.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
bridges.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
bridges3.o: ./bridges.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
combi.o: ./combi.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube3.o: ./cube.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
divvy.o: ./divvy.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominosa.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominos3.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
drawing.o: ./drawing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dsf.o: ./dsf.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen5.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
fifteen2.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
filling.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
filling5.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
filling2.o: ./filling.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
findloop.o: ./findloop.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip3.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
flood.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flood3.o: ./flood.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxies.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
galaxie7.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxie4.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
galaxie2.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
grid.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nestedvm.o: ./nestedvm.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess3.o: ./guess.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
inertia.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
inertia3.o: ./inertia.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
keen5.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen2.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
latin.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
latin8.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@
|
||||
latin6.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
laydomino.o: ./laydomino.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup5.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
lightup2.o: ./lightup.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
list.o: ./list.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopgen.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy5.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
loopy2.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
magnets.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
magnets5.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
magnets2.o: ./magnets.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
malloc.o: ./malloc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map5.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
map2.o: ./map.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
maxflow.o: ./maxflow.c ./maxflow.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
midend.o: ./midend.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines5.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
mines2.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@
|
||||
misc.o: ./misc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net3.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
netslide.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
netslid3.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
no-icon.o: ./no-icon.c
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullfe.o: ./nullfe.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullgame.o: ./nullgame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
obfusc.o: ./obfusc.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
osx.o: ./osx.m ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisade.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisad3.o: ./palisade.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pattern7.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern4.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
pattern2.o: ./pattern.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pearl.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pearl5.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pearl2.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pegs.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pegs3.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
penrose.o: ./penrose.c ./puzzles.h ./penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
printing.o: ./printing.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
ps.o: ./ps.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
random.o: ./random.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range3.o: ./range.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
rect.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
rect3.o: ./rect.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
samegame.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
samegam3.o: ./samegame.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpost.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
signpos5.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpos2.o: ./signpost.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
singles.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
singles5.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
singles3.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
sixteen.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
sixteen3.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
slant5.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant2.o: ./slant.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
solo.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
solo5.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
solo2.o: ./solo.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tdq.o: ./tdq.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents5.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tents3.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
towers.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
towers5.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
towers2.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tracks.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tracks3.o: ./tracks.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tree234.o: ./tree234.c ./tree234.h ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle3.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
undead.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
undead3.o: ./undead.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unequal5.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal2.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
unruly.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unruly5.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unruly2.o: ./unruly.c ./puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
untangle.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
untangl3.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
version.o: ./version.c ./version.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows1.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
|
||||
.PRECIOUS: %.class
|
||||
%.class: %.mips
|
||||
java -cp $(NESTEDVM)/build:$(NESTEDVM)/upstream/build/classgen/build \
|
||||
org.ibex.nestedvm.Compiler -outformat class -d . \
|
||||
PuzzleEngine $<
|
||||
mv PuzzleEngine.class $@
|
||||
|
||||
org:
|
||||
mkdir -p org/ibex/nestedvm/util
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/Registers.class org/ibex/nestedvm
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/UsermodeConstants.class org/ibex/nestedvm
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/Runtime*.class org/ibex/nestedvm
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Platform*.class org/ibex/nestedvm/util
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Seekable*.class org/ibex/nestedvm/util
|
||||
echo "Main-Class: PuzzleApplet" >applet.manifest
|
||||
|
||||
PuzzleApplet.class: PuzzleApplet.java org
|
||||
javac -source 1.3 -target 1.3 PuzzleApplet.java
|
||||
|
||||
%.jar: %.class PuzzleApplet.class org
|
||||
mv $< PuzzleEngine.class
|
||||
jar cfm $@ applet.manifest PuzzleEngine.class PuzzleApplet*.class org
|
||||
echo '<applet archive="'$@'" code="PuzzleApplet" width="700" height="500"></applet>' >$*.html
|
||||
mv PuzzleEngine.class $<
|
||||
|
||||
clean:
|
||||
rm -rf *.o *.mips *.class *.html *.jar org applet.manifest
|
||||
574
apps/plugins/puzzles/src/Makefile.osx
Normal file
574
apps/plugins/puzzles/src/Makefile.osx
Normal file
|
|
@ -0,0 +1,574 @@
|
|||
# Makefile for puzzles under Mac OS X.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
CC = $(TOOLPATH)gcc
|
||||
LIPO = $(TOOLPATH)lipo
|
||||
|
||||
CFLAGS = -O2 -Wall -Werror -g -I./ -Iicons/
|
||||
LDFLAGS = -framework Cocoa
|
||||
all: Puzzles fifteensolver fillingsolver galaxiespicture galaxiessolver \
|
||||
keensolver latincheck lightupsolver loopysolver \
|
||||
magnetssolver mapsolver mineobfusc obfusc patternpicture \
|
||||
patternsolver pearlbench signpostsolver singlessolver \
|
||||
slantsolver solosolver tentssolver towerssolver \
|
||||
unequalsolver unrulysolver
|
||||
Puzzles_extra = Puzzles.app/Contents/Resources/Help/index.html
|
||||
Puzzles.app/Contents/Resources/Help/index.html: \
|
||||
Puzzles.app/Contents/Resources/Help osx-help.but puzzles.but
|
||||
cd Puzzles.app/Contents/Resources/Help; \
|
||||
halibut --html ../../../../osx-help.but ../../../../puzzles.but
|
||||
Puzzles.app/Contents/Resources/Help: Puzzles.app/Contents/Resources
|
||||
mkdir -p Puzzles.app/Contents/Resources/Help
|
||||
|
||||
release: Puzzles.dmg
|
||||
Puzzles.dmg: Puzzles
|
||||
rm -f raw.dmg
|
||||
hdiutil create -megabytes 5 -layout NONE raw.dmg
|
||||
hdid -nomount raw.dmg > devicename
|
||||
newfs_hfs -v "Simon Tatham's Puzzle Collection" `cat devicename`
|
||||
hdiutil eject `cat devicename`
|
||||
hdid raw.dmg | cut -f1 -d' ' > devicename
|
||||
cp -R Puzzles.app /Volumes/"Simon Tatham's Puzzle Collection"
|
||||
hdiutil eject `cat devicename`
|
||||
rm -f Puzzles.dmg
|
||||
hdiutil convert -format UDCO raw.dmg -o Puzzles.dmg
|
||||
rm -f raw.dmg devicename
|
||||
|
||||
.SUFFIXES: .o .c .m
|
||||
|
||||
|
||||
|
||||
Puzzles.app:
|
||||
mkdir -p $@
|
||||
Puzzles.app/Contents: Puzzles.app
|
||||
mkdir -p $@
|
||||
Puzzles.app/Contents/MacOS: Puzzles.app/Contents
|
||||
mkdir -p $@
|
||||
Puzzles.app/Contents/Resources: Puzzles.app/Contents
|
||||
mkdir -p $@
|
||||
Puzzles.app/Contents/Resources/Puzzles.icns: Puzzles.app/Contents/Resources osx.icns
|
||||
cp osx.icns $@
|
||||
Puzzles.app/Contents/Info.plist: Puzzles.app/Contents/Resources osx-info.plist
|
||||
cp osx-info.plist $@
|
||||
Puzzles: Puzzles.app/Contents/MacOS/Puzzles \
|
||||
Puzzles.app/Contents/Resources/Puzzles.icns \
|
||||
Puzzles.app/Contents/Info.plist $(Puzzles_extra)
|
||||
|
||||
Puzzles.i386.bin: blackbo3.i386.o bridges3.i386.o combi.i386.o cube3.i386.o \
|
||||
divvy.i386.o dominos3.i386.o drawing.i386.o dsf.i386.o \
|
||||
fifteen5.i386.o filling5.i386.o findloop.i386.o flip3.i386.o \
|
||||
flood3.i386.o galaxie7.i386.o grid.i386.o guess3.i386.o \
|
||||
inertia3.i386.o keen5.i386.o latin.i386.o laydomino.i386.o \
|
||||
lightup5.i386.o list.i386.o loopgen.i386.o loopy5.i386.o \
|
||||
magnets5.i386.o malloc.i386.o map5.i386.o maxflow.i386.o \
|
||||
midend.i386.o mines5.i386.o misc.i386.o net3.i386.o \
|
||||
netslid3.i386.o osx.i386.o palisad3.i386.o pattern7.i386.o \
|
||||
pearl5.i386.o pegs3.i386.o penrose.i386.o random.i386.o \
|
||||
range3.i386.o rect3.i386.o samegam3.i386.o signpos5.i386.o \
|
||||
singles5.i386.o sixteen3.i386.o slant5.i386.o solo5.i386.o \
|
||||
tdq.i386.o tents5.i386.o towers5.i386.o tracks3.i386.o \
|
||||
tree234.i386.o twiddle3.i386.o undead3.i386.o \
|
||||
unequal5.i386.o unruly5.i386.o untangl3.i386.o \
|
||||
version.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(LDFLAGS) -o $@ \
|
||||
blackbo3.i386.o bridges3.i386.o combi.i386.o cube3.i386.o \
|
||||
divvy.i386.o dominos3.i386.o drawing.i386.o dsf.i386.o \
|
||||
fifteen5.i386.o filling5.i386.o findloop.i386.o flip3.i386.o \
|
||||
flood3.i386.o galaxie7.i386.o grid.i386.o guess3.i386.o \
|
||||
inertia3.i386.o keen5.i386.o latin.i386.o laydomino.i386.o \
|
||||
lightup5.i386.o list.i386.o loopgen.i386.o loopy5.i386.o \
|
||||
magnets5.i386.o malloc.i386.o map5.i386.o maxflow.i386.o \
|
||||
midend.i386.o mines5.i386.o misc.i386.o net3.i386.o \
|
||||
netslid3.i386.o osx.i386.o palisad3.i386.o pattern7.i386.o \
|
||||
pearl5.i386.o pegs3.i386.o penrose.i386.o random.i386.o \
|
||||
range3.i386.o rect3.i386.o samegam3.i386.o signpos5.i386.o \
|
||||
singles5.i386.o sixteen3.i386.o slant5.i386.o solo5.i386.o \
|
||||
tdq.i386.o tents5.i386.o towers5.i386.o tracks3.i386.o \
|
||||
tree234.i386.o twiddle3.i386.o undead3.i386.o \
|
||||
unequal5.i386.o unruly5.i386.o untangl3.i386.o \
|
||||
version.i386.o
|
||||
|
||||
Puzzles.app/Contents/MacOS/Puzzles: Puzzles.app/Contents/MacOS \
|
||||
Puzzles.i386.bin
|
||||
$(LIPO) -create Puzzles.i386.bin -output $@
|
||||
|
||||
fifteensolver.i386: fifteen2.i386.o malloc.i386.o misc.i386.o nullfe.i386.o \
|
||||
random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
fifteen2.i386.o malloc.i386.o misc.i386.o nullfe.i386.o \
|
||||
random.i386.o
|
||||
|
||||
fifteensolver: fifteensolver.i386
|
||||
$(LIPO) -create fifteensolver.i386 -output $@
|
||||
|
||||
fillingsolver.i386: dsf.i386.o filling2.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o filling2.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o
|
||||
|
||||
fillingsolver: fillingsolver.i386
|
||||
$(LIPO) -create fillingsolver.i386 -output $@
|
||||
|
||||
galaxiespicture.i386: dsf.i386.o galaxie4.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o galaxie4.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o -lm
|
||||
|
||||
galaxiespicture: galaxiespicture.i386
|
||||
$(LIPO) -create galaxiespicture.i386 -output $@
|
||||
|
||||
galaxiessolver.i386: dsf.i386.o galaxie2.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o galaxie2.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o -lm
|
||||
|
||||
galaxiessolver: galaxiessolver.i386
|
||||
$(LIPO) -create galaxiessolver.i386 -output $@
|
||||
|
||||
keensolver.i386: dsf.i386.o keen2.i386.o latin6.i386.o malloc.i386.o \
|
||||
maxflow.i386.o misc.i386.o nullfe.i386.o random.i386.o \
|
||||
tree234.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o keen2.i386.o latin6.i386.o malloc.i386.o \
|
||||
maxflow.i386.o misc.i386.o nullfe.i386.o random.i386.o \
|
||||
tree234.i386.o
|
||||
|
||||
keensolver: keensolver.i386
|
||||
$(LIPO) -create keensolver.i386 -output $@
|
||||
|
||||
latincheck.i386: latin8.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o tree234.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
latin8.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o tree234.i386.o
|
||||
|
||||
latincheck: latincheck.i386
|
||||
$(LIPO) -create latincheck.i386 -output $@
|
||||
|
||||
lightupsolver.i386: combi.i386.o lightup2.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
combi.i386.o lightup2.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o
|
||||
|
||||
lightupsolver: lightupsolver.i386
|
||||
$(LIPO) -create lightupsolver.i386 -output $@
|
||||
|
||||
loopysolver.i386: dsf.i386.o grid.i386.o loopgen.i386.o loopy2.i386.o \
|
||||
malloc.i386.o misc.i386.o nullfe.i386.o penrose.i386.o \
|
||||
random.i386.o tree234.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o grid.i386.o loopgen.i386.o loopy2.i386.o \
|
||||
malloc.i386.o misc.i386.o nullfe.i386.o penrose.i386.o \
|
||||
random.i386.o tree234.i386.o -lm
|
||||
|
||||
loopysolver: loopysolver.i386
|
||||
$(LIPO) -create loopysolver.i386 -output $@
|
||||
|
||||
magnetssolver.i386: laydomino.i386.o magnets2.i386.o malloc.i386.o \
|
||||
misc.i386.o nullfe.i386.o random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
laydomino.i386.o magnets2.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o -lm
|
||||
|
||||
magnetssolver: magnetssolver.i386
|
||||
$(LIPO) -create magnetssolver.i386 -output $@
|
||||
|
||||
mapsolver.i386: dsf.i386.o malloc.i386.o map2.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o malloc.i386.o map2.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o -lm
|
||||
|
||||
mapsolver: mapsolver.i386
|
||||
$(LIPO) -create mapsolver.i386 -output $@
|
||||
|
||||
mineobfusc.i386: malloc.i386.o mines2.i386.o misc.i386.o nullfe.i386.o \
|
||||
random.i386.o tree234.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
malloc.i386.o mines2.i386.o misc.i386.o nullfe.i386.o \
|
||||
random.i386.o tree234.i386.o
|
||||
|
||||
mineobfusc: mineobfusc.i386
|
||||
$(LIPO) -create mineobfusc.i386 -output $@
|
||||
|
||||
obfusc.i386: malloc.i386.o misc.i386.o nullfe.i386.o obfusc.i386.o \
|
||||
random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
malloc.i386.o misc.i386.o nullfe.i386.o obfusc.i386.o \
|
||||
random.i386.o
|
||||
|
||||
obfusc: obfusc.i386
|
||||
$(LIPO) -create obfusc.i386 -output $@
|
||||
|
||||
patternpicture.i386: malloc.i386.o misc.i386.o nullfe.i386.o pattern4.i386.o \
|
||||
random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
malloc.i386.o misc.i386.o nullfe.i386.o pattern4.i386.o \
|
||||
random.i386.o
|
||||
|
||||
patternpicture: patternpicture.i386
|
||||
$(LIPO) -create patternpicture.i386 -output $@
|
||||
|
||||
patternsolver.i386: malloc.i386.o misc.i386.o nullfe.i386.o pattern2.i386.o \
|
||||
random.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
malloc.i386.o misc.i386.o nullfe.i386.o pattern2.i386.o \
|
||||
random.i386.o
|
||||
|
||||
patternsolver: patternsolver.i386
|
||||
$(LIPO) -create patternsolver.i386 -output $@
|
||||
|
||||
pearlbench.i386: dsf.i386.o grid.i386.o loopgen.i386.o malloc.i386.o \
|
||||
misc.i386.o nullfe.i386.o pearl2.i386.o penrose.i386.o \
|
||||
random.i386.o tdq.i386.o tree234.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o grid.i386.o loopgen.i386.o malloc.i386.o \
|
||||
misc.i386.o nullfe.i386.o pearl2.i386.o penrose.i386.o \
|
||||
random.i386.o tdq.i386.o tree234.i386.o -lm
|
||||
|
||||
pearlbench: pearlbench.i386
|
||||
$(LIPO) -create pearlbench.i386 -output $@
|
||||
|
||||
signpostsolver.i386: dsf.i386.o malloc.i386.o misc.i386.o nullfe.i386.o \
|
||||
random.i386.o signpos2.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o malloc.i386.o misc.i386.o nullfe.i386.o \
|
||||
random.i386.o signpos2.i386.o -lm
|
||||
|
||||
signpostsolver: signpostsolver.i386
|
||||
$(LIPO) -create signpostsolver.i386 -output $@
|
||||
|
||||
singlessolver.i386: dsf.i386.o latin.i386.o malloc.i386.o maxflow.i386.o \
|
||||
misc.i386.o nullfe.i386.o random.i386.o singles3.i386.o \
|
||||
tree234.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o latin.i386.o malloc.i386.o maxflow.i386.o \
|
||||
misc.i386.o nullfe.i386.o random.i386.o singles3.i386.o \
|
||||
tree234.i386.o
|
||||
|
||||
singlessolver: singlessolver.i386
|
||||
$(LIPO) -create singlessolver.i386 -output $@
|
||||
|
||||
slantsolver.i386: dsf.i386.o findloop.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o slant2.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o findloop.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o slant2.i386.o
|
||||
|
||||
slantsolver: slantsolver.i386
|
||||
$(LIPO) -create slantsolver.i386 -output $@
|
||||
|
||||
solosolver.i386: divvy.i386.o dsf.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o solo2.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
divvy.i386.o dsf.i386.o malloc.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o solo2.i386.o
|
||||
|
||||
solosolver: solosolver.i386
|
||||
$(LIPO) -create solosolver.i386 -output $@
|
||||
|
||||
tentssolver.i386: dsf.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o tents3.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
dsf.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o tents3.i386.o
|
||||
|
||||
tentssolver: tentssolver.i386
|
||||
$(LIPO) -create tentssolver.i386 -output $@
|
||||
|
||||
towerssolver.i386: latin6.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o towers2.i386.o tree234.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
latin6.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o towers2.i386.o tree234.i386.o
|
||||
|
||||
towerssolver: towerssolver.i386
|
||||
$(LIPO) -create towerssolver.i386 -output $@
|
||||
|
||||
unequalsolver.i386: latin6.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o tree234.i386.o unequal2.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
latin6.i386.o malloc.i386.o maxflow.i386.o misc.i386.o \
|
||||
nullfe.i386.o random.i386.o tree234.i386.o unequal2.i386.o
|
||||
|
||||
unequalsolver: unequalsolver.i386
|
||||
$(LIPO) -create unequalsolver.i386 -output $@
|
||||
|
||||
unrulysolver.i386: malloc.i386.o misc.i386.o nullfe.i386.o random.i386.o \
|
||||
unruly2.i386.o
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(ULDFLAGS) -o $@ \
|
||||
malloc.i386.o misc.i386.o nullfe.i386.o random.i386.o \
|
||||
unruly2.i386.o
|
||||
|
||||
unrulysolver: unrulysolver.i386
|
||||
$(LIPO) -create unrulysolver.i386 -output $@
|
||||
|
||||
blackbox.i386.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
blackbo3.i386.o: ./blackbox.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
bridges.i386.o: ./bridges.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
bridges3.i386.o: ./bridges.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
combi.i386.o: ./combi.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube.i386.o: ./cube.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
cube3.i386.o: ./cube.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
divvy.i386.o: ./divvy.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominosa.i386.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dominos3.i386.o: ./dominosa.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
drawing.i386.o: ./drawing.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
dsf.i386.o: ./dsf.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen.i386.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
fifteen5.i386.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
fifteen2.i386.o: ./fifteen.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
filling.i386.o: ./filling.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
filling5.i386.o: ./filling.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
filling2.i386.o: ./filling.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
findloop.i386.o: ./findloop.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip.i386.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flip3.i386.o: ./flip.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
flood.i386.o: ./flood.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
flood3.i386.o: ./flood.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxies.i386.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
galaxie7.i386.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
galaxie4.i386.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
galaxie2.i386.o: ./galaxies.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
grid.i386.o: ./grid.c ./puzzles.h ./tree234.h ./grid.h ./penrose.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
gtk.i386.o: ./gtk.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess.i386.o: ./guess.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
guess3.i386.o: ./guess.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
inertia.i386.o: ./inertia.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
inertia3.i386.o: ./inertia.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen.i386.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
keen5.i386.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
keen2.i386.o: ./keen.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
latin.i386.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
latin8.i386.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_LATIN_TEST -c $< -o $@
|
||||
latin6.i386.o: ./latin.c ./puzzles.h ./tree234.h ./maxflow.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
laydomino.i386.o: ./laydomino.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup.i386.o: ./lightup.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
lightup5.i386.o: ./lightup.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
lightup2.i386.o: ./lightup.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
list.i386.o: ./list.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopgen.i386.o: ./loopgen.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy.i386.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
loopy5.i386.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
loopy2.i386.o: ./loopy.c ./puzzles.h ./tree234.h ./grid.h ./loopgen.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
magnets.i386.o: ./magnets.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
magnets5.i386.o: ./magnets.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
magnets2.i386.o: ./magnets.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
malloc.i386.o: ./malloc.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map.i386.o: ./map.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
map5.i386.o: ./map.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
map2.i386.o: ./map.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
maxflow.i386.o: ./maxflow.c ./maxflow.h ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
midend.i386.o: ./midend.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines.i386.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
mines5.i386.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
mines2.i386.o: ./mines.c ./tree234.h ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_OBFUSCATOR -c $< -o $@
|
||||
misc.i386.o: ./misc.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net.i386.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
net3.i386.o: ./net.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
netslide.i386.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
netslid3.i386.o: ./netslide.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
no-icon.i386.o: ./no-icon.c
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullfe.i386.o: ./nullfe.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
nullgame.i386.o: ./nullgame.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
obfusc.i386.o: ./obfusc.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
osx.i386.o: ./osx.m ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 -x objective-c $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisade.i386.o: ./palisade.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
palisad3.i386.o: ./palisade.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern.i386.o: ./pattern.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pattern7.i386.o: ./pattern.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pattern4.i386.o: ./pattern.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_PICTURE_GENERATOR -c $< -o $@
|
||||
pattern2.i386.o: ./pattern.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pearl.i386.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pearl5.i386.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
pearl2.i386.o: ./pearl.c ./puzzles.h ./grid.h ./loopgen.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
pegs.i386.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
pegs3.i386.o: ./pegs.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
penrose.i386.o: ./penrose.c ./puzzles.h ./penrose.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
printing.i386.o: ./printing.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
ps.i386.o: ./ps.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
random.i386.o: ./random.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range.i386.o: ./range.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
range3.i386.o: ./range.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
rect.i386.o: ./rect.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
rect3.i386.o: ./rect.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
samegame.i386.o: ./samegame.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
samegam3.i386.o: ./samegame.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpost.i386.o: ./signpost.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
signpos5.i386.o: ./signpost.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
signpos2.i386.o: ./signpost.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
singles.i386.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
singles5.i386.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
singles3.i386.o: ./singles.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
sixteen.i386.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
sixteen3.i386.o: ./sixteen.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant.i386.o: ./slant.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
slant5.i386.o: ./slant.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
slant2.i386.o: ./slant.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
solo.i386.o: ./solo.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
solo5.i386.o: ./solo.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
solo2.i386.o: ./solo.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tdq.i386.o: ./tdq.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents.i386.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tents5.i386.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tents3.i386.o: ./tents.c ./puzzles.h ./maxflow.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
towers.i386.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
towers5.i386.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
towers2.i386.o: ./towers.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
tracks.i386.o: ./tracks.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
tracks3.i386.o: ./tracks.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
tree234.i386.o: ./tree234.c ./tree234.h ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle.i386.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
twiddle3.i386.o: ./twiddle.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
undead.i386.o: ./undead.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
undead3.i386.o: ./undead.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal.i386.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unequal5.i386.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unequal2.i386.o: ./unequal.c ./puzzles.h ./latin.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
unruly.i386.o: ./unruly.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
unruly5.i386.o: ./unruly.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
unruly2.i386.o: ./unruly.c ./puzzles.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DSTANDALONE_SOLVER -c $< -o $@
|
||||
untangle.i386.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
untangl3.i386.o: ./untangle.c ./puzzles.h ./tree234.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
version.i386.o: ./version.c ./version.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows.i386.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -c $< -o $@
|
||||
windows1.i386.o: ./windows.c ./puzzles.h ./resource.h
|
||||
$(CC) -arch i386 -mmacosx-version-min=10.4 $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) -DCOMBINED -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f *.o *.dmg fifteensolver fifteensolver.i386 fillingsolver fillingsolver.i386 galaxiespicture galaxiespicture.i386 galaxiessolver galaxiessolver.i386 keensolver keensolver.i386 latincheck latincheck.i386 lightupsolver lightupsolver.i386 loopysolver loopysolver.i386 magnetssolver magnetssolver.i386 mapsolver mapsolver.i386 mineobfusc mineobfusc.i386 obfusc obfusc.i386 patternpicture patternpicture.i386 patternsolver patternsolver.i386 pearlbench pearlbench.i386 signpostsolver signpostsolver.i386 singlessolver singlessolver.i386 slantsolver slantsolver.i386 solosolver solosolver.i386 tentssolver tentssolver.i386 towerssolver towerssolver.i386 unequalsolver unequalsolver.i386 unrulysolver unrulysolver.i386
|
||||
rm -rf *.app
|
||||
1040
apps/plugins/puzzles/src/Makefile.vc
Normal file
1040
apps/plugins/puzzles/src/Makefile.vc
Normal file
File diff suppressed because it is too large
Load diff
808
apps/plugins/puzzles/src/Makefile.wce
Normal file
808
apps/plugins/puzzles/src/Makefile.wce
Normal file
|
|
@ -0,0 +1,808 @@
|
|||
# Makefile for puzzles on PocketPC using eMbedded Visual C.
|
||||
#
|
||||
# This file was created by `mkfiles.pl' from the `Recipe' file.
|
||||
# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.
|
||||
|
||||
# If you rename this file to `Makefile', you should change this line,
|
||||
# so that the .rsp files still depend on the correct makefile.
|
||||
MAKEFILE = Makefile.wce
|
||||
|
||||
# This makefile expects the environment to have been set up by one
|
||||
# of the PocketPC batch files wcearmv4.bat and wceemulator.bat. No
|
||||
# other build targets are currently supported, because they would
|
||||
# need a section in this if statement.
|
||||
!if "$(TARGETCPU)" == "emulator"
|
||||
PLATFORM_DEFS=/D "_i386_" /D "i_386_" /D "_X86_" /D "x86"
|
||||
CC=cl
|
||||
BASELIBS=commctrl.lib coredll.lib corelibc.lib aygshell.lib
|
||||
MACHINE=IX86
|
||||
!else
|
||||
PLATFORM_DEFS=/D "ARM" /D "_ARM_" /D "ARMV4"
|
||||
CC=clarm
|
||||
BASELIBS=commctrl.lib coredll.lib aygshell.lib
|
||||
MACHINE=ARM
|
||||
!endif
|
||||
|
||||
# C compilation flags
|
||||
CFLAGS = /nologo /W3 /O1 /MC /D _WIN32_WCE=420 /D "WIN32_PLATFORM_PSPC=400" /D UNDER_CE=420 \
|
||||
$(PLATFORM_DEFS) \
|
||||
/D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "NO_HTMLHELP"
|
||||
|
||||
LFLAGS = /nologo /incremental:no \
|
||||
/base:0x00010000 /stack:0x10000,0x1000 /entry:WinMainCRTStartup \
|
||||
/nodefaultlib:libc.lib /nodefaultlib:libcmt.lib /nodefaultlib:msvcrt.lib /nodefaultlib:OLDNAMES.lib \
|
||||
/subsystem:windowsce,4.20 /align:4096 /MACHINE:$(MACHINE)
|
||||
|
||||
RCFL = /d UNDER_CE=420 /d _WIN32_WCE=420 /d "WIN32_PLATFORM_PSPC=400" \
|
||||
$(PLATFORM_DEFS) \
|
||||
/d "NDEBUG" /d "UNICODE" /d "_UNICODE"
|
||||
|
||||
all: blackbox.exe bridges.exe cube.exe dominosa.exe fifteen.exe filling.exe \
|
||||
flip.exe flood.exe galaxies.exe guess.exe inertia.exe \
|
||||
keen.exe lightup.exe loopy.exe magnets.exe map.exe mines.exe \
|
||||
netgame.exe netslide.exe nullgame.exe palisade.exe \
|
||||
pattern.exe pearl.exe pegs.exe puzzles.exe range.exe \
|
||||
rect.exe samegame.exe signpost.exe singles.exe sixteen.exe \
|
||||
slant.exe solo.exe tents.exe towers.exe tracks.exe \
|
||||
twiddle.exe undead.exe unequal.exe unruly.exe untangle.exe
|
||||
|
||||
blackbox.exe: blackbox.obj drawing.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj version.obj windows.obj \
|
||||
blackbox.rsp
|
||||
link $(LFLAGS) -out:blackbox.exe -map:blackbox.map @blackbox.rsp
|
||||
|
||||
bridges.exe: bridges.obj drawing.obj dsf.obj findloop.obj malloc.obj \
|
||||
midend.obj misc.obj noicon.res printing.obj random.obj \
|
||||
version.obj windows.obj bridges.rsp
|
||||
link $(LFLAGS) -out:bridges.exe -map:bridges.map @bridges.rsp
|
||||
|
||||
cube.exe: cube.obj drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj version.obj windows.obj cube.rsp
|
||||
link $(LFLAGS) -out:cube.exe -map:cube.map @cube.rsp
|
||||
|
||||
dominosa.exe: dominosa.obj drawing.obj laydomino.obj malloc.obj midend.obj \
|
||||
misc.obj noicon.res printing.obj random.obj version.obj \
|
||||
windows.obj dominosa.rsp
|
||||
link $(LFLAGS) -out:dominosa.exe -map:dominosa.map @dominosa.rsp
|
||||
|
||||
fifteen.exe: drawing.obj fifteen.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj version.obj windows.obj \
|
||||
fifteen.rsp
|
||||
link $(LFLAGS) -out:fifteen.exe -map:fifteen.map @fifteen.rsp
|
||||
|
||||
filling.exe: drawing.obj dsf.obj filling.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj version.obj windows.obj \
|
||||
filling.rsp
|
||||
link $(LFLAGS) -out:filling.exe -map:filling.map @filling.rsp
|
||||
|
||||
flip.exe: drawing.obj flip.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj tree234.obj version.obj windows.obj \
|
||||
flip.rsp
|
||||
link $(LFLAGS) -out:flip.exe -map:flip.map @flip.rsp
|
||||
|
||||
flood.exe: drawing.obj flood.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj version.obj windows.obj flood.rsp
|
||||
link $(LFLAGS) -out:flood.exe -map:flood.map @flood.rsp
|
||||
|
||||
galaxies.exe: drawing.obj dsf.obj galaxies.obj malloc.obj midend.obj \
|
||||
misc.obj noicon.res printing.obj random.obj version.obj \
|
||||
windows.obj galaxies.rsp
|
||||
link $(LFLAGS) -out:galaxies.exe -map:galaxies.map @galaxies.rsp
|
||||
|
||||
guess.exe: drawing.obj guess.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj version.obj windows.obj guess.rsp
|
||||
link $(LFLAGS) -out:guess.exe -map:guess.map @guess.rsp
|
||||
|
||||
inertia.exe: drawing.obj inertia.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj version.obj windows.obj \
|
||||
inertia.rsp
|
||||
link $(LFLAGS) -out:inertia.exe -map:inertia.map @inertia.rsp
|
||||
|
||||
keen.exe: drawing.obj dsf.obj keen.obj latin.obj malloc.obj maxflow.obj \
|
||||
midend.obj misc.obj noicon.res printing.obj random.obj \
|
||||
tree234.obj version.obj windows.obj keen.rsp
|
||||
link $(LFLAGS) -out:keen.exe -map:keen.map @keen.rsp
|
||||
|
||||
lightup.exe: combi.obj drawing.obj lightup.obj malloc.obj midend.obj \
|
||||
misc.obj noicon.res printing.obj random.obj version.obj \
|
||||
windows.obj lightup.rsp
|
||||
link $(LFLAGS) -out:lightup.exe -map:lightup.map @lightup.rsp
|
||||
|
||||
loopy.exe: drawing.obj dsf.obj grid.obj loopgen.obj loopy.obj malloc.obj \
|
||||
midend.obj misc.obj noicon.res penrose.obj printing.obj \
|
||||
random.obj tree234.obj version.obj windows.obj loopy.rsp
|
||||
link $(LFLAGS) -out:loopy.exe -map:loopy.map @loopy.rsp
|
||||
|
||||
magnets.exe: drawing.obj laydomino.obj magnets.obj malloc.obj midend.obj \
|
||||
misc.obj noicon.res printing.obj random.obj version.obj \
|
||||
windows.obj magnets.rsp
|
||||
link $(LFLAGS) -out:magnets.exe -map:magnets.map @magnets.rsp
|
||||
|
||||
map.exe: drawing.obj dsf.obj malloc.obj map.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj version.obj windows.obj \
|
||||
map.rsp
|
||||
link $(LFLAGS) -out:map.exe -map:map.map @map.rsp
|
||||
|
||||
mines.exe: drawing.obj malloc.obj midend.obj mines.obj misc.obj noicon.res \
|
||||
printing.obj random.obj tree234.obj version.obj windows.obj \
|
||||
mines.rsp
|
||||
link $(LFLAGS) -out:mines.exe -map:mines.map @mines.rsp
|
||||
|
||||
netgame.exe: drawing.obj dsf.obj findloop.obj malloc.obj midend.obj misc.obj \
|
||||
net.obj noicon.res printing.obj random.obj tree234.obj \
|
||||
version.obj windows.obj netgame.rsp
|
||||
link $(LFLAGS) -out:netgame.exe -map:netgame.map @netgame.rsp
|
||||
|
||||
netslide.exe: drawing.obj malloc.obj midend.obj misc.obj netslide.obj \
|
||||
noicon.res printing.obj random.obj tree234.obj version.obj \
|
||||
windows.obj netslide.rsp
|
||||
link $(LFLAGS) -out:netslide.exe -map:netslide.map @netslide.rsp
|
||||
|
||||
nullgame.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
nullgame.obj printing.obj random.obj version.obj windows.obj \
|
||||
nullgame.rsp
|
||||
link $(LFLAGS) -out:nullgame.exe -map:nullgame.map @nullgame.rsp
|
||||
|
||||
palisade.exe: divvy.obj drawing.obj dsf.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res palisade.obj printing.obj random.obj version.obj \
|
||||
windows.obj palisade.rsp
|
||||
link $(LFLAGS) -out:palisade.exe -map:palisade.map @palisade.rsp
|
||||
|
||||
pattern.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
pattern.obj printing.obj random.obj version.obj windows.obj \
|
||||
pattern.rsp
|
||||
link $(LFLAGS) -out:pattern.exe -map:pattern.map @pattern.rsp
|
||||
|
||||
pearl.exe: drawing.obj dsf.obj grid.obj loopgen.obj malloc.obj midend.obj \
|
||||
misc.obj pearl.obj penrose.obj printing.obj random.obj \
|
||||
tdq.obj tree234.obj version.obj windows.obj pearl.rsp
|
||||
link $(LFLAGS) -out:pearl.exe -map:pearl.map @pearl.rsp
|
||||
|
||||
pegs.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res pegs.obj \
|
||||
printing.obj random.obj tree234.obj version.obj windows.obj \
|
||||
pegs.rsp
|
||||
link $(LFLAGS) -out:pegs.exe -map:pegs.map @pegs.rsp
|
||||
|
||||
puzzles.exe: blackbo3.obj bridges3.obj combi.obj cube3.obj divvy.obj \
|
||||
dominos3.obj drawing.obj dsf.obj fifteen5.obj filling5.obj \
|
||||
findloop.obj flip3.obj flood3.obj galaxie7.obj grid.obj \
|
||||
guess3.obj inertia3.obj keen5.obj latin.obj laydomino.obj \
|
||||
lightup5.obj list.obj loopgen.obj loopy5.obj magnets5.obj \
|
||||
malloc.obj map5.obj maxflow.obj midend.obj mines5.obj \
|
||||
misc.obj net3.obj netslid3.obj noicon.res palisad3.obj \
|
||||
pattern7.obj pearl5.obj pegs3.obj penrose.obj printing.obj \
|
||||
random.obj range3.obj rect3.obj samegam3.obj signpos5.obj \
|
||||
singles5.obj sixteen3.obj slant5.obj solo5.obj tdq.obj \
|
||||
tents5.obj towers5.obj tracks3.obj tree234.obj twiddle3.obj \
|
||||
undead3.obj unequal5.obj unruly5.obj untangl3.obj \
|
||||
version.obj windows1.obj puzzles.rsp
|
||||
link $(LFLAGS) -out:puzzles.exe -map:puzzles.map @puzzles.rsp
|
||||
|
||||
range.exe: drawing.obj dsf.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj range.obj version.obj windows.obj \
|
||||
range.rsp
|
||||
link $(LFLAGS) -out:range.exe -map:range.map @range.rsp
|
||||
|
||||
rect.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res printing.obj \
|
||||
random.obj rect.obj version.obj windows.obj rect.rsp
|
||||
link $(LFLAGS) -out:rect.exe -map:rect.map @rect.rsp
|
||||
|
||||
samegame.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj samegame.obj version.obj windows.obj \
|
||||
samegame.rsp
|
||||
link $(LFLAGS) -out:samegame.exe -map:samegame.map @samegame.rsp
|
||||
|
||||
signpost.exe: drawing.obj dsf.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj signpost.obj version.obj windows.obj \
|
||||
signpost.rsp
|
||||
link $(LFLAGS) -out:signpost.exe -map:signpost.map @signpost.rsp
|
||||
|
||||
singles.exe: drawing.obj dsf.obj latin.obj malloc.obj maxflow.obj midend.obj \
|
||||
misc.obj noicon.res printing.obj random.obj singles.obj \
|
||||
tree234.obj version.obj windows.obj singles.rsp
|
||||
link $(LFLAGS) -out:singles.exe -map:singles.map @singles.rsp
|
||||
|
||||
sixteen.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj sixteen.obj version.obj windows.obj \
|
||||
sixteen.rsp
|
||||
link $(LFLAGS) -out:sixteen.exe -map:sixteen.map @sixteen.rsp
|
||||
|
||||
slant.exe: drawing.obj dsf.obj findloop.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj slant.obj version.obj \
|
||||
windows.obj slant.rsp
|
||||
link $(LFLAGS) -out:slant.exe -map:slant.map @slant.rsp
|
||||
|
||||
solo.exe: divvy.obj drawing.obj dsf.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj solo.obj version.obj \
|
||||
windows.obj solo.rsp
|
||||
link $(LFLAGS) -out:solo.exe -map:solo.map @solo.rsp
|
||||
|
||||
tents.exe: drawing.obj dsf.obj malloc.obj maxflow.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj tents.obj version.obj \
|
||||
windows.obj tents.rsp
|
||||
link $(LFLAGS) -out:tents.exe -map:tents.map @tents.rsp
|
||||
|
||||
towers.exe: drawing.obj latin.obj malloc.obj maxflow.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj towers.obj tree234.obj \
|
||||
version.obj windows.obj towers.rsp
|
||||
link $(LFLAGS) -out:towers.exe -map:towers.map @towers.rsp
|
||||
|
||||
tracks.exe: drawing.obj dsf.obj findloop.obj malloc.obj midend.obj misc.obj \
|
||||
noicon.res printing.obj random.obj tracks.obj version.obj \
|
||||
windows.obj tracks.rsp
|
||||
link $(LFLAGS) -out:tracks.exe -map:tracks.map @tracks.rsp
|
||||
|
||||
twiddle.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj twiddle.obj version.obj windows.obj \
|
||||
twiddle.rsp
|
||||
link $(LFLAGS) -out:twiddle.exe -map:twiddle.map @twiddle.rsp
|
||||
|
||||
undead.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj undead.obj version.obj windows.obj \
|
||||
undead.rsp
|
||||
link $(LFLAGS) -out:undead.exe -map:undead.map @undead.rsp
|
||||
|
||||
unequal.exe: drawing.obj latin.obj malloc.obj maxflow.obj midend.obj \
|
||||
misc.obj noicon.res printing.obj random.obj tree234.obj \
|
||||
unequal.obj version.obj windows.obj unequal.rsp
|
||||
link $(LFLAGS) -out:unequal.exe -map:unequal.map @unequal.rsp
|
||||
|
||||
unruly.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj unruly.obj version.obj windows.obj \
|
||||
unruly.rsp
|
||||
link $(LFLAGS) -out:unruly.exe -map:unruly.map @unruly.rsp
|
||||
|
||||
untangle.exe: drawing.obj malloc.obj midend.obj misc.obj noicon.res \
|
||||
printing.obj random.obj tree234.obj untangle.obj version.obj \
|
||||
windows.obj untangle.rsp
|
||||
link $(LFLAGS) -out:untangle.exe -map:untangle.map @untangle.rsp
|
||||
|
||||
blackbox.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > blackbox.rsp
|
||||
echo blackbox.obj drawing.obj malloc.obj midend.obj >> blackbox.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> blackbox.rsp
|
||||
echo version.obj windows.obj >> blackbox.rsp
|
||||
|
||||
bridges.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > bridges.rsp
|
||||
echo bridges.obj drawing.obj dsf.obj findloop.obj >> bridges.rsp
|
||||
echo malloc.obj midend.obj misc.obj noicon.res >> bridges.rsp
|
||||
echo printing.obj random.obj version.obj windows.obj >> bridges.rsp
|
||||
|
||||
cube.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > cube.rsp
|
||||
echo cube.obj drawing.obj malloc.obj midend.obj >> cube.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> cube.rsp
|
||||
echo version.obj windows.obj >> cube.rsp
|
||||
|
||||
dominosa.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > dominosa.rsp
|
||||
echo dominosa.obj drawing.obj laydomino.obj malloc.obj >> dominosa.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> dominosa.rsp
|
||||
echo random.obj version.obj windows.obj >> dominosa.rsp
|
||||
|
||||
fifteen.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > fifteen.rsp
|
||||
echo drawing.obj fifteen.obj malloc.obj midend.obj >> fifteen.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> fifteen.rsp
|
||||
echo version.obj windows.obj >> fifteen.rsp
|
||||
|
||||
filling.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > filling.rsp
|
||||
echo drawing.obj dsf.obj filling.obj malloc.obj >> filling.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> filling.rsp
|
||||
echo random.obj version.obj windows.obj >> filling.rsp
|
||||
|
||||
flip.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > flip.rsp
|
||||
echo drawing.obj flip.obj malloc.obj midend.obj >> flip.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> flip.rsp
|
||||
echo tree234.obj version.obj windows.obj >> flip.rsp
|
||||
|
||||
flood.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > flood.rsp
|
||||
echo drawing.obj flood.obj malloc.obj midend.obj >> flood.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> flood.rsp
|
||||
echo version.obj windows.obj >> flood.rsp
|
||||
|
||||
galaxies.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > galaxies.rsp
|
||||
echo drawing.obj dsf.obj galaxies.obj malloc.obj >> galaxies.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> galaxies.rsp
|
||||
echo random.obj version.obj windows.obj >> galaxies.rsp
|
||||
|
||||
guess.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > guess.rsp
|
||||
echo drawing.obj guess.obj malloc.obj midend.obj >> guess.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> guess.rsp
|
||||
echo version.obj windows.obj >> guess.rsp
|
||||
|
||||
inertia.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > inertia.rsp
|
||||
echo drawing.obj inertia.obj malloc.obj midend.obj >> inertia.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> inertia.rsp
|
||||
echo version.obj windows.obj >> inertia.rsp
|
||||
|
||||
keen.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > keen.rsp
|
||||
echo drawing.obj dsf.obj keen.obj latin.obj malloc.obj >> keen.rsp
|
||||
echo maxflow.obj midend.obj misc.obj noicon.res >> keen.rsp
|
||||
echo printing.obj random.obj tree234.obj version.obj >> keen.rsp
|
||||
echo windows.obj >> keen.rsp
|
||||
|
||||
lightup.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > lightup.rsp
|
||||
echo combi.obj drawing.obj lightup.obj malloc.obj >> lightup.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> lightup.rsp
|
||||
echo random.obj version.obj windows.obj >> lightup.rsp
|
||||
|
||||
loopy.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > loopy.rsp
|
||||
echo drawing.obj dsf.obj grid.obj loopgen.obj >> loopy.rsp
|
||||
echo loopy.obj malloc.obj midend.obj misc.obj >> loopy.rsp
|
||||
echo noicon.res penrose.obj printing.obj random.obj >> loopy.rsp
|
||||
echo tree234.obj version.obj windows.obj >> loopy.rsp
|
||||
|
||||
magnets.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > magnets.rsp
|
||||
echo drawing.obj laydomino.obj magnets.obj malloc.obj >> magnets.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> magnets.rsp
|
||||
echo random.obj version.obj windows.obj >> magnets.rsp
|
||||
|
||||
map.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > map.rsp
|
||||
echo drawing.obj dsf.obj malloc.obj map.obj midend.obj >> map.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> map.rsp
|
||||
echo version.obj windows.obj >> map.rsp
|
||||
|
||||
mines.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > mines.rsp
|
||||
echo drawing.obj malloc.obj midend.obj mines.obj >> mines.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> mines.rsp
|
||||
echo tree234.obj version.obj windows.obj >> mines.rsp
|
||||
|
||||
netgame.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > netgame.rsp
|
||||
echo drawing.obj dsf.obj findloop.obj malloc.obj >> netgame.rsp
|
||||
echo midend.obj misc.obj net.obj noicon.res >> netgame.rsp
|
||||
echo printing.obj random.obj tree234.obj version.obj >> netgame.rsp
|
||||
echo windows.obj >> netgame.rsp
|
||||
|
||||
netslide.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > netslide.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> netslide.rsp
|
||||
echo netslide.obj noicon.res printing.obj random.obj >> netslide.rsp
|
||||
echo tree234.obj version.obj windows.obj >> netslide.rsp
|
||||
|
||||
nullgame.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > nullgame.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> nullgame.rsp
|
||||
echo noicon.res nullgame.obj printing.obj random.obj >> nullgame.rsp
|
||||
echo version.obj windows.obj >> nullgame.rsp
|
||||
|
||||
palisade.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > palisade.rsp
|
||||
echo divvy.obj drawing.obj dsf.obj malloc.obj >> palisade.rsp
|
||||
echo midend.obj misc.obj noicon.res palisade.obj >> palisade.rsp
|
||||
echo printing.obj random.obj version.obj windows.obj >> palisade.rsp
|
||||
|
||||
pattern.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > pattern.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> pattern.rsp
|
||||
echo noicon.res pattern.obj printing.obj random.obj >> pattern.rsp
|
||||
echo version.obj windows.obj >> pattern.rsp
|
||||
|
||||
pearl.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > pearl.rsp
|
||||
echo drawing.obj dsf.obj grid.obj loopgen.obj >> pearl.rsp
|
||||
echo malloc.obj midend.obj misc.obj pearl.obj >> pearl.rsp
|
||||
echo penrose.obj printing.obj random.obj tdq.obj >> pearl.rsp
|
||||
echo tree234.obj version.obj windows.obj >> pearl.rsp
|
||||
|
||||
pegs.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > pegs.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> pegs.rsp
|
||||
echo noicon.res pegs.obj printing.obj random.obj >> pegs.rsp
|
||||
echo tree234.obj version.obj windows.obj >> pegs.rsp
|
||||
|
||||
puzzles.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > puzzles.rsp
|
||||
echo blackbo3.obj bridges3.obj combi.obj cube3.obj >> puzzles.rsp
|
||||
echo divvy.obj dominos3.obj drawing.obj dsf.obj >> puzzles.rsp
|
||||
echo fifteen5.obj filling5.obj findloop.obj flip3.obj >> puzzles.rsp
|
||||
echo flood3.obj galaxie7.obj grid.obj guess3.obj >> puzzles.rsp
|
||||
echo inertia3.obj keen5.obj latin.obj laydomino.obj >> puzzles.rsp
|
||||
echo lightup5.obj list.obj loopgen.obj loopy5.obj >> puzzles.rsp
|
||||
echo magnets5.obj malloc.obj map5.obj maxflow.obj >> puzzles.rsp
|
||||
echo midend.obj mines5.obj misc.obj net3.obj >> puzzles.rsp
|
||||
echo netslid3.obj noicon.res palisad3.obj pattern7.obj >> puzzles.rsp
|
||||
echo pearl5.obj pegs3.obj penrose.obj printing.obj >> puzzles.rsp
|
||||
echo random.obj range3.obj rect3.obj samegam3.obj >> puzzles.rsp
|
||||
echo signpos5.obj singles5.obj sixteen3.obj slant5.obj >> puzzles.rsp
|
||||
echo solo5.obj tdq.obj tents5.obj towers5.obj >> puzzles.rsp
|
||||
echo tracks3.obj tree234.obj twiddle3.obj undead3.obj >> puzzles.rsp
|
||||
echo unequal5.obj unruly5.obj untangl3.obj version.obj >> puzzles.rsp
|
||||
echo windows1.obj >> puzzles.rsp
|
||||
|
||||
range.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > range.rsp
|
||||
echo drawing.obj dsf.obj malloc.obj midend.obj >> range.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> range.rsp
|
||||
echo range.obj version.obj windows.obj >> range.rsp
|
||||
|
||||
rect.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > rect.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> rect.rsp
|
||||
echo noicon.res printing.obj random.obj rect.obj >> rect.rsp
|
||||
echo version.obj windows.obj >> rect.rsp
|
||||
|
||||
samegame.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > samegame.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> samegame.rsp
|
||||
echo noicon.res printing.obj random.obj samegame.obj >> samegame.rsp
|
||||
echo version.obj windows.obj >> samegame.rsp
|
||||
|
||||
signpost.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > signpost.rsp
|
||||
echo drawing.obj dsf.obj malloc.obj midend.obj >> signpost.rsp
|
||||
echo misc.obj noicon.res printing.obj random.obj >> signpost.rsp
|
||||
echo signpost.obj version.obj windows.obj >> signpost.rsp
|
||||
|
||||
singles.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > singles.rsp
|
||||
echo drawing.obj dsf.obj latin.obj malloc.obj >> singles.rsp
|
||||
echo maxflow.obj midend.obj misc.obj noicon.res >> singles.rsp
|
||||
echo printing.obj random.obj singles.obj tree234.obj >> singles.rsp
|
||||
echo version.obj windows.obj >> singles.rsp
|
||||
|
||||
sixteen.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > sixteen.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> sixteen.rsp
|
||||
echo noicon.res printing.obj random.obj sixteen.obj >> sixteen.rsp
|
||||
echo version.obj windows.obj >> sixteen.rsp
|
||||
|
||||
slant.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > slant.rsp
|
||||
echo drawing.obj dsf.obj findloop.obj malloc.obj >> slant.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> slant.rsp
|
||||
echo random.obj slant.obj version.obj windows.obj >> slant.rsp
|
||||
|
||||
solo.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > solo.rsp
|
||||
echo divvy.obj drawing.obj dsf.obj malloc.obj >> solo.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> solo.rsp
|
||||
echo random.obj solo.obj version.obj windows.obj >> solo.rsp
|
||||
|
||||
tents.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > tents.rsp
|
||||
echo drawing.obj dsf.obj malloc.obj maxflow.obj >> tents.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> tents.rsp
|
||||
echo random.obj tents.obj version.obj windows.obj >> tents.rsp
|
||||
|
||||
towers.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > towers.rsp
|
||||
echo drawing.obj latin.obj malloc.obj maxflow.obj >> towers.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> towers.rsp
|
||||
echo random.obj towers.obj tree234.obj version.obj >> towers.rsp
|
||||
echo windows.obj >> towers.rsp
|
||||
|
||||
tracks.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > tracks.rsp
|
||||
echo drawing.obj dsf.obj findloop.obj malloc.obj >> tracks.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> tracks.rsp
|
||||
echo random.obj tracks.obj version.obj windows.obj >> tracks.rsp
|
||||
|
||||
twiddle.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > twiddle.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> twiddle.rsp
|
||||
echo noicon.res printing.obj random.obj twiddle.obj >> twiddle.rsp
|
||||
echo version.obj windows.obj >> twiddle.rsp
|
||||
|
||||
undead.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > undead.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> undead.rsp
|
||||
echo noicon.res printing.obj random.obj undead.obj >> undead.rsp
|
||||
echo version.obj windows.obj >> undead.rsp
|
||||
|
||||
unequal.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > unequal.rsp
|
||||
echo drawing.obj latin.obj malloc.obj maxflow.obj >> unequal.rsp
|
||||
echo midend.obj misc.obj noicon.res printing.obj >> unequal.rsp
|
||||
echo random.obj tree234.obj unequal.obj version.obj >> unequal.rsp
|
||||
echo windows.obj >> unequal.rsp
|
||||
|
||||
unruly.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > unruly.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> unruly.rsp
|
||||
echo noicon.res printing.obj random.obj unruly.obj >> unruly.rsp
|
||||
echo version.obj windows.obj >> unruly.rsp
|
||||
|
||||
untangle.rsp: $(MAKEFILE)
|
||||
echo $(BASELIBS) > untangle.rsp
|
||||
echo drawing.obj malloc.obj midend.obj misc.obj >> untangle.rsp
|
||||
echo noicon.res printing.obj random.obj tree234.obj >> untangle.rsp
|
||||
echo untangle.obj version.obj windows.obj >> untangle.rsp
|
||||
|
||||
blackbox.obj: .\blackbox.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\blackbox.c /Foblackbox.obj
|
||||
blackbo3.obj: .\blackbox.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\blackbox.c /Foblackbo3.obj
|
||||
bridges.obj: .\bridges.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\bridges.c /Fobridges.obj
|
||||
bridges3.obj: .\bridges.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\bridges.c /Fobridges3.obj
|
||||
combi.obj: .\combi.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\combi.c /Focombi.obj
|
||||
cube.obj: .\cube.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\cube.c /Focube.obj
|
||||
cube3.obj: .\cube.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\cube.c /Focube3.obj
|
||||
divvy.obj: .\divvy.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\divvy.c /Fodivvy.obj
|
||||
dominosa.obj: .\dominosa.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\dominosa.c /Fodominosa.obj
|
||||
dominos3.obj: .\dominosa.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\dominosa.c /Fodominos3.obj
|
||||
drawing.obj: .\drawing.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\drawing.c /Fodrawing.obj
|
||||
dsf.obj: .\dsf.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\dsf.c /Fodsf.obj
|
||||
fifteen.obj: .\fifteen.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\fifteen.c /Fofifteen.obj
|
||||
fifteen5.obj: .\fifteen.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\fifteen.c /Fofifteen5.obj
|
||||
fifteen2.obj: .\fifteen.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\fifteen.c /Fofifteen2.obj
|
||||
filling.obj: .\filling.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\filling.c /Fofilling.obj
|
||||
filling5.obj: .\filling.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\filling.c /Fofilling5.obj
|
||||
filling2.obj: .\filling.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\filling.c /Fofilling2.obj
|
||||
findloop.obj: .\findloop.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\findloop.c /Fofindloop.obj
|
||||
flip.obj: .\flip.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\flip.c /Foflip.obj
|
||||
flip3.obj: .\flip.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\flip.c /Foflip3.obj
|
||||
flood.obj: .\flood.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\flood.c /Foflood.obj
|
||||
flood3.obj: .\flood.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\flood.c /Foflood3.obj
|
||||
galaxies.obj: .\galaxies.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\galaxies.c /Fogalaxies.obj
|
||||
galaxie7.obj: .\galaxies.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\galaxies.c /Fogalaxie7.obj
|
||||
galaxie4.obj: .\galaxies.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_PICTURE_GENERATOR /c .\galaxies.c /Fogalaxie4.obj
|
||||
galaxie2.obj: .\galaxies.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\galaxies.c /Fogalaxie2.obj
|
||||
grid.obj: .\grid.c .\puzzles.h .\tree234.h .\grid.h .\penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\grid.c /Fogrid.obj
|
||||
gtk.obj: .\gtk.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\gtk.c /Fogtk.obj
|
||||
guess.obj: .\guess.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\guess.c /Foguess.obj
|
||||
guess3.obj: .\guess.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\guess.c /Foguess3.obj
|
||||
inertia.obj: .\inertia.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\inertia.c /Foinertia.obj
|
||||
inertia3.obj: .\inertia.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\inertia.c /Foinertia3.obj
|
||||
keen.obj: .\keen.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\keen.c /Fokeen.obj
|
||||
keen5.obj: .\keen.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\keen.c /Fokeen5.obj
|
||||
keen2.obj: .\keen.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\keen.c /Fokeen2.obj
|
||||
latin.obj: .\latin.c .\puzzles.h .\tree234.h .\maxflow.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\latin.c /Folatin.obj
|
||||
latin8.obj: .\latin.c .\puzzles.h .\tree234.h .\maxflow.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_LATIN_TEST /c .\latin.c /Folatin8.obj
|
||||
latin6.obj: .\latin.c .\puzzles.h .\tree234.h .\maxflow.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\latin.c /Folatin6.obj
|
||||
laydomino.obj: .\laydomino.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\laydomino.c /Folaydomino.obj
|
||||
lightup.obj: .\lightup.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\lightup.c /Folightup.obj
|
||||
lightup5.obj: .\lightup.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\lightup.c /Folightup5.obj
|
||||
lightup2.obj: .\lightup.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\lightup.c /Folightup2.obj
|
||||
list.obj: .\list.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\list.c /Folist.obj
|
||||
loopgen.obj: .\loopgen.c .\puzzles.h .\tree234.h .\grid.h .\loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\loopgen.c /Foloopgen.obj
|
||||
loopy.obj: .\loopy.c .\puzzles.h .\tree234.h .\grid.h .\loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\loopy.c /Foloopy.obj
|
||||
loopy5.obj: .\loopy.c .\puzzles.h .\tree234.h .\grid.h .\loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\loopy.c /Foloopy5.obj
|
||||
loopy2.obj: .\loopy.c .\puzzles.h .\tree234.h .\grid.h .\loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\loopy.c /Foloopy2.obj
|
||||
magnets.obj: .\magnets.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\magnets.c /Fomagnets.obj
|
||||
magnets5.obj: .\magnets.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\magnets.c /Fomagnets5.obj
|
||||
magnets2.obj: .\magnets.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\magnets.c /Fomagnets2.obj
|
||||
malloc.obj: .\malloc.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\malloc.c /Fomalloc.obj
|
||||
map.obj: .\map.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\map.c /Fomap.obj
|
||||
map5.obj: .\map.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\map.c /Fomap5.obj
|
||||
map2.obj: .\map.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\map.c /Fomap2.obj
|
||||
maxflow.obj: .\maxflow.c .\maxflow.h .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\maxflow.c /Fomaxflow.obj
|
||||
midend.obj: .\midend.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\midend.c /Fomidend.obj
|
||||
mines.obj: .\mines.c .\tree234.h .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\mines.c /Fomines.obj
|
||||
mines5.obj: .\mines.c .\tree234.h .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\mines.c /Fomines5.obj
|
||||
mines2.obj: .\mines.c .\tree234.h .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_OBFUSCATOR /c .\mines.c /Fomines2.obj
|
||||
misc.obj: .\misc.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\misc.c /Fomisc.obj
|
||||
net.obj: .\net.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\net.c /Fonet.obj
|
||||
net3.obj: .\net.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\net.c /Fonet3.obj
|
||||
netslide.obj: .\netslide.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\netslide.c /Fonetslide.obj
|
||||
netslid3.obj: .\netslide.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\netslide.c /Fonetslid3.obj
|
||||
no-icon.obj: .\no-icon.c
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\no-icon.c /Fono-icon.obj
|
||||
noicon.res: .\noicon.rc .\puzzles.rc2 .\resource.h
|
||||
rc $(FWHACK) $(RCFL) -r -fonoicon.res .\noicon.rc
|
||||
nullfe.obj: .\nullfe.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\nullfe.c /Fonullfe.obj
|
||||
nullgame.obj: .\nullgame.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\nullgame.c /Fonullgame.obj
|
||||
obfusc.obj: .\obfusc.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\obfusc.c /Foobfusc.obj
|
||||
osx.obj: .\osx.m .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\osx.m /Foosx.obj
|
||||
palisade.obj: .\palisade.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\palisade.c /Fopalisade.obj
|
||||
palisad3.obj: .\palisade.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\palisade.c /Fopalisad3.obj
|
||||
pattern.obj: .\pattern.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\pattern.c /Fopattern.obj
|
||||
pattern7.obj: .\pattern.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\pattern.c /Fopattern7.obj
|
||||
pattern4.obj: .\pattern.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_PICTURE_GENERATOR /c .\pattern.c /Fopattern4.obj
|
||||
pattern2.obj: .\pattern.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\pattern.c /Fopattern2.obj
|
||||
pearl.obj: .\pearl.c .\puzzles.h .\grid.h .\loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\pearl.c /Fopearl.obj
|
||||
pearl5.obj: .\pearl.c .\puzzles.h .\grid.h .\loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\pearl.c /Fopearl5.obj
|
||||
pearl2.obj: .\pearl.c .\puzzles.h .\grid.h .\loopgen.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\pearl.c /Fopearl2.obj
|
||||
pegs.obj: .\pegs.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\pegs.c /Fopegs.obj
|
||||
pegs3.obj: .\pegs.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\pegs.c /Fopegs3.obj
|
||||
penrose.obj: .\penrose.c .\puzzles.h .\penrose.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\penrose.c /Fopenrose.obj
|
||||
printing.obj: .\printing.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\printing.c /Foprinting.obj
|
||||
ps.obj: .\ps.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\ps.c /Fops.obj
|
||||
random.obj: .\random.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\random.c /Forandom.obj
|
||||
range.obj: .\range.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\range.c /Forange.obj
|
||||
range3.obj: .\range.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\range.c /Forange3.obj
|
||||
rect.obj: .\rect.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\rect.c /Forect.obj
|
||||
rect3.obj: .\rect.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\rect.c /Forect3.obj
|
||||
samegame.obj: .\samegame.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\samegame.c /Fosamegame.obj
|
||||
samegam3.obj: .\samegame.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\samegame.c /Fosamegam3.obj
|
||||
signpost.obj: .\signpost.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\signpost.c /Fosignpost.obj
|
||||
signpos5.obj: .\signpost.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\signpost.c /Fosignpos5.obj
|
||||
signpos2.obj: .\signpost.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\signpost.c /Fosignpos2.obj
|
||||
singles.obj: .\singles.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\singles.c /Fosingles.obj
|
||||
singles5.obj: .\singles.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\singles.c /Fosingles5.obj
|
||||
singles3.obj: .\singles.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\singles.c /Fosingles3.obj
|
||||
sixteen.obj: .\sixteen.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\sixteen.c /Fosixteen.obj
|
||||
sixteen3.obj: .\sixteen.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\sixteen.c /Fosixteen3.obj
|
||||
slant.obj: .\slant.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\slant.c /Foslant.obj
|
||||
slant5.obj: .\slant.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\slant.c /Foslant5.obj
|
||||
slant2.obj: .\slant.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\slant.c /Foslant2.obj
|
||||
solo.obj: .\solo.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\solo.c /Fosolo.obj
|
||||
solo5.obj: .\solo.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\solo.c /Fosolo5.obj
|
||||
solo2.obj: .\solo.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\solo.c /Fosolo2.obj
|
||||
tdq.obj: .\tdq.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\tdq.c /Fotdq.obj
|
||||
tents.obj: .\tents.c .\puzzles.h .\maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\tents.c /Fotents.obj
|
||||
tents5.obj: .\tents.c .\puzzles.h .\maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\tents.c /Fotents5.obj
|
||||
tents3.obj: .\tents.c .\puzzles.h .\maxflow.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\tents.c /Fotents3.obj
|
||||
towers.obj: .\towers.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\towers.c /Fotowers.obj
|
||||
towers5.obj: .\towers.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\towers.c /Fotowers5.obj
|
||||
towers2.obj: .\towers.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\towers.c /Fotowers2.obj
|
||||
tracks.obj: .\tracks.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\tracks.c /Fotracks.obj
|
||||
tracks3.obj: .\tracks.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\tracks.c /Fotracks3.obj
|
||||
tree234.obj: .\tree234.c .\tree234.h .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\tree234.c /Fotree234.obj
|
||||
twiddle.obj: .\twiddle.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\twiddle.c /Fotwiddle.obj
|
||||
twiddle3.obj: .\twiddle.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\twiddle.c /Fotwiddle3.obj
|
||||
undead.obj: .\undead.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\undead.c /Foundead.obj
|
||||
undead3.obj: .\undead.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\undead.c /Foundead3.obj
|
||||
unequal.obj: .\unequal.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\unequal.c /Founequal.obj
|
||||
unequal5.obj: .\unequal.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\unequal.c /Founequal5.obj
|
||||
unequal2.obj: .\unequal.c .\puzzles.h .\latin.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\unequal.c /Founequal2.obj
|
||||
unruly.obj: .\unruly.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\unruly.c /Founruly.obj
|
||||
unruly5.obj: .\unruly.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\unruly.c /Founruly5.obj
|
||||
unruly2.obj: .\unruly.c .\puzzles.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DSTANDALONE_SOLVER /c .\unruly.c /Founruly2.obj
|
||||
untangle.obj: .\untangle.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\untangle.c /Fountangle.obj
|
||||
untangl3.obj: .\untangle.c .\puzzles.h .\tree234.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\untangle.c /Fountangl3.obj
|
||||
version.obj: .\version.c .\version.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\version.c /Foversion.obj
|
||||
windows.obj: .\windows.c .\puzzles.h .\resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /c .\windows.c /Fowindows.obj
|
||||
windows1.obj: .\windows.c .\puzzles.h .\resource.h
|
||||
$(CC) $(COMPAT) $(FWHACK) $(CFLAGS) $(XFLAGS) /DCOMBINED /c .\windows.c /Fowindows1.obj
|
||||
|
||||
|
||||
clean: tidy
|
||||
-del *.exe
|
||||
|
||||
tidy:
|
||||
-del *.obj
|
||||
-del *.res
|
||||
-del *.pch
|
||||
-del *.aps
|
||||
-del *.ilk
|
||||
-del *.pdb
|
||||
-del *.rsp
|
||||
-del *.dsp
|
||||
-del *.dsw
|
||||
-del *.ncb
|
||||
-del *.opt
|
||||
-del *.plg
|
||||
-del *.map
|
||||
-del *.idb
|
||||
-del debug.log
|
||||
650
apps/plugins/puzzles/src/PuzzleApplet.java
Normal file
650
apps/plugins/puzzles/src/PuzzleApplet.java
Normal file
|
|
@ -0,0 +1,650 @@
|
|||
/*
|
||||
* PuzzleApplet.java: NestedVM applet for the puzzle collection
|
||||
*/
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.*;
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.BevelBorder;
|
||||
import javax.swing.Timer;
|
||||
import java.util.List;
|
||||
|
||||
import org.ibex.nestedvm.Runtime;
|
||||
|
||||
public class PuzzleApplet extends JApplet implements Runtime.CallJavaCB {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static final int CFG_SETTINGS = 0, CFG_SEED = 1, CFG_DESC = 2,
|
||||
LEFT_BUTTON = 0x0200, MIDDLE_BUTTON = 0x201, RIGHT_BUTTON = 0x202,
|
||||
LEFT_DRAG = 0x203, MIDDLE_DRAG = 0x204, RIGHT_DRAG = 0x205,
|
||||
LEFT_RELEASE = 0x206, CURSOR_UP = 0x209, CURSOR_DOWN = 0x20a,
|
||||
CURSOR_LEFT = 0x20b, CURSOR_RIGHT = 0x20c, MOD_CTRL = 0x1000,
|
||||
MOD_SHFT = 0x2000, MOD_NUM_KEYPAD = 0x4000, ALIGN_VCENTRE = 0x100,
|
||||
ALIGN_HCENTRE = 0x001, ALIGN_HRIGHT = 0x002, C_STRING = 0,
|
||||
C_CHOICES = 1, C_BOOLEAN = 2;
|
||||
|
||||
private JFrame mainWindow;
|
||||
|
||||
private JMenu typeMenu;
|
||||
private JMenuItem[] typeMenuItems;
|
||||
private int customMenuItemIndex;
|
||||
|
||||
private JMenuItem solveCommand;
|
||||
private Color[] colors;
|
||||
private JLabel statusBar;
|
||||
private PuzzlePanel pp;
|
||||
private Runtime runtime;
|
||||
private String[] puzzle_args;
|
||||
private Graphics2D gg;
|
||||
private Timer timer;
|
||||
private int xarg1, xarg2, xarg3;
|
||||
private int[] xPoints, yPoints;
|
||||
private BufferedImage[] blitters = new BufferedImage[512];
|
||||
private ConfigDialog dlg;
|
||||
|
||||
static {
|
||||
try {
|
||||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void init() {
|
||||
try {
|
||||
Container cp = getContentPane();
|
||||
cp.setLayout(new BorderLayout());
|
||||
runtime = (Runtime) Class.forName("PuzzleEngine").newInstance();
|
||||
runtime.setCallJavaCB(this);
|
||||
JMenuBar menubar = new JMenuBar();
|
||||
JMenu jm;
|
||||
menubar.add(jm = new JMenu("Game"));
|
||||
addMenuItemWithKey(jm, "New", 'n');
|
||||
addMenuItemCallback(jm, "Restart", "jcallback_restart_event");
|
||||
addMenuItemCallback(jm, "Specific...", "jcallback_config_event", CFG_DESC);
|
||||
addMenuItemCallback(jm, "Random Seed...", "jcallback_config_event", CFG_SEED);
|
||||
jm.addSeparator();
|
||||
addMenuItemWithKey(jm, "Undo", 'u');
|
||||
addMenuItemWithKey(jm, "Redo", 'r');
|
||||
jm.addSeparator();
|
||||
solveCommand = addMenuItemCallback(jm, "Solve", "jcallback_solve_event");
|
||||
solveCommand.setEnabled(false);
|
||||
if (mainWindow != null) {
|
||||
jm.addSeparator();
|
||||
addMenuItemWithKey(jm, "Exit", 'q');
|
||||
}
|
||||
menubar.add(typeMenu = new JMenu("Type"));
|
||||
typeMenu.setVisible(false);
|
||||
menubar.add(jm = new JMenu("Help"));
|
||||
addMenuItemCallback(jm, "About", "jcallback_about_event");
|
||||
setJMenuBar(menubar);
|
||||
cp.add(pp = new PuzzlePanel(), BorderLayout.CENTER);
|
||||
pp.addKeyListener(new KeyAdapter() {
|
||||
public void keyPressed(KeyEvent e) {
|
||||
int key = -1;
|
||||
int shift = e.isShiftDown() ? MOD_SHFT : 0;
|
||||
int ctrl = e.isControlDown() ? MOD_CTRL : 0;
|
||||
switch (e.getKeyCode()) {
|
||||
case KeyEvent.VK_LEFT:
|
||||
case KeyEvent.VK_KP_LEFT:
|
||||
key = shift | ctrl | CURSOR_LEFT;
|
||||
break;
|
||||
case KeyEvent.VK_RIGHT:
|
||||
case KeyEvent.VK_KP_RIGHT:
|
||||
key = shift | ctrl | CURSOR_RIGHT;
|
||||
break;
|
||||
case KeyEvent.VK_UP:
|
||||
case KeyEvent.VK_KP_UP:
|
||||
key = shift | ctrl | CURSOR_UP;
|
||||
break;
|
||||
case KeyEvent.VK_DOWN:
|
||||
case KeyEvent.VK_KP_DOWN:
|
||||
key = shift | ctrl | CURSOR_DOWN;
|
||||
break;
|
||||
case KeyEvent.VK_PAGE_UP:
|
||||
key = shift | ctrl | MOD_NUM_KEYPAD | '9';
|
||||
break;
|
||||
case KeyEvent.VK_PAGE_DOWN:
|
||||
key = shift | ctrl | MOD_NUM_KEYPAD | '3';
|
||||
break;
|
||||
case KeyEvent.VK_HOME:
|
||||
key = shift | ctrl | MOD_NUM_KEYPAD | '7';
|
||||
break;
|
||||
case KeyEvent.VK_END:
|
||||
key = shift | ctrl | MOD_NUM_KEYPAD | '1';
|
||||
break;
|
||||
default:
|
||||
if (e.getKeyCode() >= KeyEvent.VK_NUMPAD0 && e.getKeyCode() <=KeyEvent.VK_NUMPAD9) {
|
||||
key = MOD_NUM_KEYPAD | (e.getKeyCode() - KeyEvent.VK_NUMPAD0+'0');
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (key != -1) {
|
||||
runtimeCall("jcallback_key_event", new int[] {0, 0, key});
|
||||
}
|
||||
}
|
||||
public void keyTyped(KeyEvent e) {
|
||||
runtimeCall("jcallback_key_event", new int[] {0, 0, e.getKeyChar()});
|
||||
}
|
||||
});
|
||||
pp.addMouseListener(new MouseAdapter() {
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
mousePressedReleased(e, true);
|
||||
}
|
||||
public void mousePressed(MouseEvent e) {
|
||||
pp.requestFocus();
|
||||
mousePressedReleased(e, false);
|
||||
}
|
||||
private void mousePressedReleased(MouseEvent e, boolean released) {
|
||||
int button;
|
||||
if ((e.getModifiers() & (InputEvent.BUTTON2_MASK | InputEvent.SHIFT_MASK)) != 0)
|
||||
button = MIDDLE_BUTTON;
|
||||
else if ((e.getModifiers() & (InputEvent.BUTTON3_MASK | InputEvent.ALT_MASK)) != 0)
|
||||
button = RIGHT_BUTTON;
|
||||
else if ((e.getModifiers() & (InputEvent.BUTTON1_MASK)) != 0)
|
||||
button = LEFT_BUTTON;
|
||||
else
|
||||
return;
|
||||
if (released)
|
||||
button += LEFT_RELEASE - LEFT_BUTTON;
|
||||
runtimeCall("jcallback_key_event", new int[] {e.getX(), e.getY(), button});
|
||||
}
|
||||
});
|
||||
pp.addMouseMotionListener(new MouseMotionAdapter() {
|
||||
public void mouseDragged(MouseEvent e) {
|
||||
int button;
|
||||
if ((e.getModifiers() & (InputEvent.BUTTON2_MASK | InputEvent.SHIFT_MASK)) != 0)
|
||||
button = MIDDLE_DRAG;
|
||||
else if ((e.getModifiers() & (InputEvent.BUTTON3_MASK | InputEvent.ALT_MASK)) != 0)
|
||||
button = RIGHT_DRAG;
|
||||
else
|
||||
button = LEFT_DRAG;
|
||||
runtimeCall("jcallback_key_event", new int[] {e.getX(), e.getY(), button});
|
||||
}
|
||||
});
|
||||
pp.addComponentListener(new ComponentAdapter() {
|
||||
public void componentResized(ComponentEvent e) {
|
||||
handleResized();
|
||||
}
|
||||
});
|
||||
pp.setFocusable(true);
|
||||
pp.requestFocus();
|
||||
timer = new Timer(20, new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
runtimeCall("jcallback_timer_func", new int[0]);
|
||||
}
|
||||
});
|
||||
String gameid;
|
||||
try {
|
||||
gameid = getParameter("game_id");
|
||||
} catch (java.lang.NullPointerException ex) {
|
||||
gameid = null;
|
||||
}
|
||||
if (gameid == null) {
|
||||
puzzle_args = null;
|
||||
} else {
|
||||
puzzle_args = new String[2];
|
||||
puzzle_args[0] = "puzzle";
|
||||
puzzle_args[1] = gameid;
|
||||
}
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
runtime.start(puzzle_args);
|
||||
runtime.execute();
|
||||
}
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
runtime.execute();
|
||||
if (mainWindow != null) {
|
||||
mainWindow.dispose();
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected void handleResized() {
|
||||
pp.createBackBuffer(pp.getWidth(), pp.getHeight(), colors[0]);
|
||||
runtimeCall("jcallback_resize", new int[] {pp.getWidth(), pp.getHeight()});
|
||||
}
|
||||
|
||||
private void addMenuItemWithKey(JMenu jm, String name, int key) {
|
||||
addMenuItemCallback(jm, name, "jcallback_menu_key_event", key);
|
||||
}
|
||||
|
||||
private JMenuItem addMenuItemCallback(JMenu jm, String name, final String callback, final int arg) {
|
||||
return addMenuItemCallback(jm, name, callback, new int[] {arg}, false);
|
||||
}
|
||||
|
||||
private JMenuItem addMenuItemCallback(JMenu jm, String name, final String callback) {
|
||||
return addMenuItemCallback(jm, name, callback, new int[0], false);
|
||||
}
|
||||
|
||||
private JMenuItem addMenuItemCallback(JMenu jm, String name, final String callback, final int[] args, boolean checkbox) {
|
||||
JMenuItem jmi;
|
||||
if (checkbox)
|
||||
jm.add(jmi = new JCheckBoxMenuItem(name));
|
||||
else
|
||||
jm.add(jmi = new JMenuItem(name));
|
||||
jmi.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
runtimeCall(callback, args);
|
||||
}
|
||||
});
|
||||
return jmi;
|
||||
}
|
||||
|
||||
protected void runtimeCall(String func, int[] args) {
|
||||
if (runtimeCallWithResult(func, args) == 42 && mainWindow != null) {
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
|
||||
protected int runtimeCallWithResult(String func, int[] args) {
|
||||
try {
|
||||
return runtime.call(func, args);
|
||||
} catch (Runtime.CallException ex) {
|
||||
ex.printStackTrace();
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
private void buildConfigureMenuItem() {
|
||||
if (typeMenu.isVisible()) {
|
||||
typeMenu.addSeparator();
|
||||
} else {
|
||||
typeMenu.setVisible(true);
|
||||
}
|
||||
typeMenuItems[customMenuItemIndex] =
|
||||
addMenuItemCallback(typeMenu, "Custom...",
|
||||
"jcallback_config_event",
|
||||
new int[] {CFG_SETTINGS}, true);
|
||||
}
|
||||
|
||||
private void addTypeItem
|
||||
(JMenu targetMenu, String name, int newId, final int ptrGameParams) {
|
||||
|
||||
typeMenu.setVisible(true);
|
||||
typeMenuItems[newId] =
|
||||
addMenuItemCallback(targetMenu, name,
|
||||
"jcallback_preset_event",
|
||||
new int[] {ptrGameParams}, true);
|
||||
}
|
||||
|
||||
private void addTypeSubmenu
|
||||
(JMenu targetMenu, String name, int newId) {
|
||||
|
||||
JMenu newMenu = new JMenu(name);
|
||||
newMenu.setVisible(true);
|
||||
typeMenuItems[newId] = newMenu;
|
||||
targetMenu.add(newMenu);
|
||||
}
|
||||
|
||||
public int call(int cmd, int arg1, int arg2, int arg3) {
|
||||
try {
|
||||
switch(cmd) {
|
||||
case 0: // initialize
|
||||
if (mainWindow != null) mainWindow.setTitle(runtime.cstring(arg1));
|
||||
if ((arg2 & 1) != 0) buildConfigureMenuItem();
|
||||
if ((arg2 & 2) != 0) addStatusBar();
|
||||
if ((arg2 & 4) != 0) solveCommand.setEnabled(true);
|
||||
colors = new Color[arg3];
|
||||
return 0;
|
||||
case 1: // configure Type menu
|
||||
if (arg1 == 0) {
|
||||
// preliminary setup
|
||||
typeMenuItems = new JMenuItem[arg2 + 2];
|
||||
typeMenuItems[arg2] = typeMenu;
|
||||
customMenuItemIndex = arg2 + 1;
|
||||
return arg2;
|
||||
} else if (xarg1 != 0) {
|
||||
addTypeItem((JMenu)typeMenuItems[arg2],
|
||||
runtime.cstring(arg1), arg3, xarg1);
|
||||
} else {
|
||||
addTypeSubmenu((JMenu)typeMenuItems[arg2],
|
||||
runtime.cstring(arg1), arg3);
|
||||
}
|
||||
return 0;
|
||||
case 2: // MessageBox
|
||||
JOptionPane.showMessageDialog(this, runtime.cstring(arg2), runtime.cstring(arg1), arg3 == 0 ? JOptionPane.INFORMATION_MESSAGE : JOptionPane.ERROR_MESSAGE);
|
||||
return 0;
|
||||
case 3: // Resize
|
||||
pp.setPreferredSize(new Dimension(arg1, arg2));
|
||||
if (mainWindow != null) mainWindow.pack();
|
||||
handleResized();
|
||||
if (mainWindow != null) mainWindow.setVisible(true);
|
||||
return 0;
|
||||
case 4: // drawing tasks
|
||||
switch(arg1) {
|
||||
case 0:
|
||||
String text = runtime.cstring(arg2);
|
||||
if (text.equals("")) text = " ";
|
||||
statusBar.setText(text);
|
||||
break;
|
||||
case 1:
|
||||
gg = pp.backBuffer.createGraphics();
|
||||
if (arg2 != 0 || arg3 != 0 ||
|
||||
arg2 + xarg2 != getWidth() ||
|
||||
arg3 + xarg3 != getHeight()) {
|
||||
int left = arg2, right = arg2 + xarg2;
|
||||
int top = arg3, bottom = arg3 + xarg3;
|
||||
int width = getWidth(), height = getHeight();
|
||||
gg.setColor(colors != null ? colors[0] : Color.black);
|
||||
gg.fillRect(0, 0, left, height);
|
||||
gg.fillRect(right, 0, width-right, height);
|
||||
gg.fillRect(0, 0, width, top);
|
||||
gg.fillRect(0, bottom, width, height-bottom);
|
||||
gg.setClip(left, top, right-left, bottom-top);
|
||||
}
|
||||
break;
|
||||
case 2: gg.dispose(); pp.repaint(); break;
|
||||
case 3: gg.setClip(arg2, arg3, xarg1, xarg2); break;
|
||||
case 4:
|
||||
if (arg2 == 0 && arg3 == 0) {
|
||||
gg.setClip(0, 0, getWidth(), getHeight());
|
||||
} else {
|
||||
gg.setClip(arg2, arg3, getWidth()-2*arg2, getHeight()-2*arg3);
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
gg.setColor(colors[xarg3]);
|
||||
gg.fillRect(arg2, arg3, xarg1, xarg2);
|
||||
break;
|
||||
case 6:
|
||||
gg.setColor(colors[xarg3]);
|
||||
gg.drawLine(arg2, arg3, xarg1, xarg2);
|
||||
break;
|
||||
case 7:
|
||||
xPoints = new int[arg2];
|
||||
yPoints = new int[arg2];
|
||||
break;
|
||||
case 8:
|
||||
if (arg3 != -1) {
|
||||
gg.setColor(colors[arg3]);
|
||||
gg.fillPolygon(xPoints, yPoints, xPoints.length);
|
||||
}
|
||||
gg.setColor(colors[arg2]);
|
||||
gg.drawPolygon(xPoints, yPoints, xPoints.length);
|
||||
break;
|
||||
case 9:
|
||||
if (arg3 != -1) {
|
||||
gg.setColor(colors[arg3]);
|
||||
gg.fillOval(xarg1-xarg3, xarg2-xarg3, xarg3*2, xarg3*2);
|
||||
}
|
||||
gg.setColor(colors[arg2]);
|
||||
gg.drawOval(xarg1-xarg3, xarg2-xarg3, xarg3*2, xarg3*2);
|
||||
break;
|
||||
case 10:
|
||||
for(int i=0; i<blitters.length; i++) {
|
||||
if (blitters[i] == null) {
|
||||
blitters[i] = new BufferedImage(arg2, arg3, BufferedImage.TYPE_3BYTE_BGR);
|
||||
return i;
|
||||
}
|
||||
}
|
||||
throw new RuntimeException("No free blitter found!");
|
||||
case 11: blitters[arg2] = null; break;
|
||||
case 12:
|
||||
timer.start(); break;
|
||||
case 13:
|
||||
timer.stop(); break;
|
||||
}
|
||||
return 0;
|
||||
case 5: // more arguments
|
||||
xarg1 = arg1;
|
||||
xarg2 = arg2;
|
||||
xarg3 = arg3;
|
||||
return 0;
|
||||
case 6: // polygon vertex
|
||||
xPoints[arg1]=arg2;
|
||||
yPoints[arg1]=arg3;
|
||||
return 0;
|
||||
case 7: // string
|
||||
gg.setColor(colors[arg2]);
|
||||
{
|
||||
String text = runtime.utfstring(arg3);
|
||||
Font ft = new Font((xarg3 & 0x10) != 0 ? "Monospaced" : "Dialog",
|
||||
Font.PLAIN, 100);
|
||||
int height100 = this.getFontMetrics(ft).getHeight();
|
||||
ft = ft.deriveFont(arg1 * 100 / (float)height100);
|
||||
FontMetrics fm = this.getFontMetrics(ft);
|
||||
int asc = fm.getAscent(), desc = fm.getDescent();
|
||||
if ((xarg3 & ALIGN_VCENTRE) != 0)
|
||||
xarg2 += asc - (asc+desc)/2;
|
||||
int wid = fm.stringWidth(text);
|
||||
if ((xarg3 & ALIGN_HCENTRE) != 0)
|
||||
xarg1 -= wid / 2;
|
||||
else if ((xarg3 & ALIGN_HRIGHT) != 0)
|
||||
xarg1 -= wid;
|
||||
gg.setFont(ft);
|
||||
gg.drawString(text, xarg1, xarg2);
|
||||
}
|
||||
return 0;
|
||||
case 8: // blitter_save
|
||||
Graphics g2 = blitters[arg1].createGraphics();
|
||||
g2.drawImage(pp.backBuffer, 0, 0, blitters[arg1].getWidth(), blitters[arg1].getHeight(),
|
||||
arg2, arg3, arg2 + blitters[arg1].getWidth(), arg3 + blitters[arg1].getHeight(), this);
|
||||
g2.dispose();
|
||||
return 0;
|
||||
case 9: // blitter_load
|
||||
gg.drawImage(blitters[arg1], arg2, arg3, this);
|
||||
return 0;
|
||||
case 10: // dialog_init
|
||||
dlg= new ConfigDialog(this, runtime.cstring(arg1));
|
||||
return 0;
|
||||
case 11: // dialog_add_control
|
||||
{
|
||||
int sval_ptr = arg1;
|
||||
int ival = arg2;
|
||||
int ptr = xarg1;
|
||||
int type=xarg2;
|
||||
String name = runtime.cstring(xarg3);
|
||||
switch(type) {
|
||||
case C_STRING:
|
||||
dlg.addTextBox(ptr, name, runtime.cstring(sval_ptr));
|
||||
break;
|
||||
case C_BOOLEAN:
|
||||
dlg.addCheckBox(ptr, name, ival != 0);
|
||||
break;
|
||||
case C_CHOICES:
|
||||
dlg.addComboBox(ptr, name, runtime.cstring(sval_ptr), ival);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case 12:
|
||||
dlg.finish();
|
||||
dlg = null;
|
||||
return 0;
|
||||
case 13: // tick a menu item
|
||||
if (arg1 < 0) arg1 = customMenuItemIndex;
|
||||
for (int i = 0; i < typeMenuItems.length; i++) {
|
||||
if (typeMenuItems[i] instanceof JCheckBoxMenuItem) {
|
||||
((JCheckBoxMenuItem)typeMenuItems[i]).setSelected
|
||||
(arg1 == i);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
default:
|
||||
if (cmd >= 1024 && cmd < 2048) { // palette
|
||||
colors[cmd-1024] = new Color(arg1, arg2, arg3);
|
||||
}
|
||||
if (cmd == 1024) {
|
||||
pp.setBackground(colors[0]);
|
||||
if (statusBar != null) statusBar.setBackground(colors[0]);
|
||||
this.setBackground(colors[0]);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
ex.printStackTrace();
|
||||
System.exit(-1);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void addStatusBar() {
|
||||
statusBar = new JLabel("test");
|
||||
statusBar.setBorder(new BevelBorder(BevelBorder.LOWERED));
|
||||
getContentPane().add(BorderLayout.SOUTH,statusBar);
|
||||
}
|
||||
|
||||
// Standalone runner
|
||||
public static void main(String[] args) {
|
||||
final PuzzleApplet a = new PuzzleApplet();
|
||||
JFrame jf = new JFrame("Loading...");
|
||||
jf.getContentPane().setLayout(new BorderLayout());
|
||||
jf.getContentPane().add(a, BorderLayout.CENTER);
|
||||
a.mainWindow=jf;
|
||||
a.init();
|
||||
a.start();
|
||||
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
jf.addWindowListener(new WindowAdapter() {
|
||||
public void windowClosing(WindowEvent e) {
|
||||
a.stop();
|
||||
a.destroy();
|
||||
}
|
||||
});
|
||||
jf.setVisible(true);
|
||||
}
|
||||
|
||||
public static class PuzzlePanel extends JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
protected BufferedImage backBuffer;
|
||||
|
||||
public PuzzlePanel() {
|
||||
setPreferredSize(new Dimension(100,100));
|
||||
createBackBuffer(100,100, Color.black);
|
||||
}
|
||||
|
||||
public void createBackBuffer(int w, int h, Color bg) {
|
||||
if (w > 0 && h > 0) {
|
||||
backBuffer = new BufferedImage(w,h, BufferedImage.TYPE_3BYTE_BGR);
|
||||
Graphics g = backBuffer.createGraphics();
|
||||
g.setColor(bg);
|
||||
g.fillRect(0, 0, w, h);
|
||||
g.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
protected void paintComponent(Graphics g) {
|
||||
g.drawImage(backBuffer, 0, 0, this);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ConfigComponent {
|
||||
public int type;
|
||||
public int configItemPointer;
|
||||
public JComponent component;
|
||||
|
||||
public ConfigComponent(int type, int configItemPointer, JComponent component) {
|
||||
this.type = type;
|
||||
this.configItemPointer = configItemPointer;
|
||||
this.component = component;
|
||||
}
|
||||
}
|
||||
|
||||
public class ConfigDialog extends JDialog {
|
||||
|
||||
private GridBagConstraints gbcLeft = new GridBagConstraints(
|
||||
GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE, 1, 1,
|
||||
0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE,
|
||||
new Insets(0, 0, 0, 0), 0, 0);
|
||||
private GridBagConstraints gbcRight = new GridBagConstraints(
|
||||
GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE,
|
||||
GridBagConstraints.REMAINDER, 1, 1.0, 0,
|
||||
GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
|
||||
new Insets(5, 5, 5, 5), 0, 0);
|
||||
private GridBagConstraints gbcBottom = new GridBagConstraints(
|
||||
GridBagConstraints.RELATIVE, GridBagConstraints.RELATIVE,
|
||||
GridBagConstraints.REMAINDER, GridBagConstraints.REMAINDER,
|
||||
1.0, 1.0, GridBagConstraints.CENTER,
|
||||
GridBagConstraints.HORIZONTAL, new Insets(5, 5, 5, 5), 0, 0);
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private List components = new ArrayList();
|
||||
|
||||
public ConfigDialog(JApplet parent, String title) {
|
||||
super(JOptionPane.getFrameForComponent(parent), title, true);
|
||||
getContentPane().setLayout(new GridBagLayout());
|
||||
}
|
||||
|
||||
public void addTextBox(int ptr, String name, String value) {
|
||||
getContentPane().add(new JLabel(name), gbcLeft);
|
||||
JComponent c = new JTextField(value, 25);
|
||||
getContentPane().add(c, gbcRight);
|
||||
components.add(new ConfigComponent(C_STRING, ptr, c));
|
||||
}
|
||||
|
||||
|
||||
public void addCheckBox(int ptr, String name, boolean selected) {
|
||||
JComponent c = new JCheckBox(name, selected);
|
||||
getContentPane().add(c, gbcRight);
|
||||
components.add(new ConfigComponent(C_BOOLEAN, ptr, c));
|
||||
}
|
||||
|
||||
public void addComboBox(int ptr, String name, String values, int selected) {
|
||||
getContentPane().add(new JLabel(name), gbcLeft);
|
||||
StringTokenizer st = new StringTokenizer(values.substring(1), values.substring(0,1));
|
||||
JComboBox c = new JComboBox();
|
||||
c.setEditable(false);
|
||||
while(st.hasMoreTokens())
|
||||
c.addItem(st.nextToken());
|
||||
c.setSelectedIndex(selected);
|
||||
getContentPane().add(c, gbcRight);
|
||||
components.add(new ConfigComponent(C_CHOICES, ptr, c));
|
||||
}
|
||||
|
||||
public void finish() {
|
||||
JPanel buttons = new JPanel(new GridLayout(1, 2, 5, 5));
|
||||
getContentPane().add(buttons, gbcBottom);
|
||||
JButton b;
|
||||
buttons.add(b=new JButton("OK"));
|
||||
b.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
save();
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
getRootPane().setDefaultButton(b);
|
||||
buttons.add(b=new JButton("Cancel"));
|
||||
b.addActionListener(new ActionListener() {
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
pack();
|
||||
setLocationRelativeTo(null);
|
||||
setVisible(true);
|
||||
}
|
||||
private void save() {
|
||||
for (int i = 0; i < components.size(); i++) {
|
||||
ConfigComponent cc = (ConfigComponent) components.get(i);
|
||||
switch(cc.type) {
|
||||
case C_STRING:
|
||||
JTextField jtf = (JTextField)cc.component;
|
||||
runtimeCall("jcallback_config_set_string", new int[] {cc.configItemPointer, runtime.strdup(jtf.getText())});
|
||||
break;
|
||||
case C_BOOLEAN:
|
||||
JCheckBox jcb = (JCheckBox)cc.component;
|
||||
runtimeCall("jcallback_config_set_boolean", new int[] {cc.configItemPointer, jcb.isSelected()?1:0});
|
||||
break;
|
||||
case C_CHOICES:
|
||||
JComboBox jcm = (JComboBox)cc.component;
|
||||
runtimeCall("jcallback_config_set_choice", new int[] {cc.configItemPointer, jcm.getSelectedIndex()});
|
||||
break;
|
||||
}
|
||||
}
|
||||
runtimeCall("jcallback_config_ok", new int[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
54
apps/plugins/puzzles/src/README
Normal file
54
apps/plugins/puzzles/src/README
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
This is the README accompanying the source code to Simon Tatham's
|
||||
puzzle collection. The collection's web site is at
|
||||
<http://www.chiark.greenend.org.uk/~sgtatham/puzzles/>.
|
||||
|
||||
If you've obtained the source code by downloading a .tar.gz archive
|
||||
from the Puzzles web site, you should find several Makefiles in the
|
||||
source code. However, if you've checked the source code out from the
|
||||
Puzzles git repository, you won't find the Makefiles: they're
|
||||
automatically generated by `mkfiles.pl', so run that to create them.
|
||||
|
||||
The Makefiles include:
|
||||
|
||||
- `Makefile.am', together with the static `configure.ac', is intended
|
||||
as input to automake. Run `mkauto.sh' to turn these into a
|
||||
configure script and Makefile.in, after which you can then run
|
||||
`./configure' to create an actual Unix Makefile.
|
||||
|
||||
- `Makefile.vc' should work under MS Visual C++ on Windows. Run
|
||||
'nmake /f Makefile.vc' in a Visual Studio command prompt.
|
||||
|
||||
- `Makefile.cyg' should work under Cygwin / MinGW. With appropriate
|
||||
tweaks and setting of TOOLPATH, it should work for both compiling
|
||||
on Windows and cross-compiling on Unix.
|
||||
|
||||
- `Makefile.osx' should work under Mac OS X, provided the Xcode
|
||||
tools are installed. It builds a single monolithic OS X
|
||||
application capable of running any of the puzzles, or even more
|
||||
than one of them at a time.
|
||||
|
||||
- `Makefile.wce' should work under MS eMbedded Visual C++ on
|
||||
Windows and the Pocket PC SDK; it builds Pocket PC binaries.
|
||||
|
||||
Many of these Makefiles build a program called `nullgame' in
|
||||
addition to the actual game binaries. This program doesn't do
|
||||
anything; it's just a template for people to start from when adding
|
||||
a new game to the collection, and it's compiled every time to ensure
|
||||
that it _does_ compile and link successfully (because otherwise it
|
||||
wouldn't be much use as a template). Once it's built, you can run it
|
||||
if you really want to (but it's very boring), and then you should
|
||||
ignore it.
|
||||
|
||||
DO NOT EDIT THE MAKEFILES DIRECTLY, if you plan to send any changes
|
||||
back to the maintainer. The makefiles are generated automatically by
|
||||
the Perl script `mkfiles.pl' from the file `Recipe' and the various
|
||||
.R files. If you need to change the makefiles as part of a patch,
|
||||
you should change Recipe, *.R, and/or mkfiles.pl.
|
||||
|
||||
The manual is provided in Windows Help format for the Windows build;
|
||||
in text format for anyone who needs it; and in HTML for the Mac OS X
|
||||
application and for the web site. It is generated from a Halibut
|
||||
source file (puzzles.but), which is the preferred form for
|
||||
modification. To generate the manual in other formats, rebuild it,
|
||||
or learn about Halibut, visit the Halibut website at
|
||||
<http://www.chiark.greenend.org.uk/~sgtatham/halibut/>.
|
||||
157
apps/plugins/puzzles/src/Recipe
Normal file
157
apps/plugins/puzzles/src/Recipe
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
# -*- makefile -*-
|
||||
#
|
||||
# This file describes which puzzle binaries are made up from which
|
||||
# object and resource files. It is processed into the various
|
||||
# Makefiles by means of a Perl script. Makefile changes should
|
||||
# really be made by editing this file and/or the Perl script, not
|
||||
# by editing the actual Makefiles.
|
||||
|
||||
!name puzzles
|
||||
|
||||
!makefile gtk Makefile.gtk
|
||||
!makefile am Makefile.am
|
||||
!makefile vc Makefile.vc
|
||||
!makefile wce Makefile.wce
|
||||
!makefile cygwin Makefile.cyg
|
||||
!makefile osx Makefile.osx
|
||||
!makefile gnustep Makefile.gnustep
|
||||
!makefile nestedvm Makefile.nestedvm
|
||||
!makefile emcc Makefile.emcc
|
||||
|
||||
!srcdir icons/
|
||||
|
||||
WINDOWS_COMMON = printing
|
||||
+ user32.lib gdi32.lib comctl32.lib comdlg32.lib winspool.lib
|
||||
WINDOWS = windows WINDOWS_COMMON
|
||||
COMMON = midend drawing misc malloc random version
|
||||
GTK = gtk printing ps
|
||||
# Objects needed for auxiliary command-line programs.
|
||||
STANDALONE = nullfe random misc malloc
|
||||
|
||||
ALL = list
|
||||
|
||||
# First half of list.c.
|
||||
!begin >list.c
|
||||
/*
|
||||
* list.c: List of pointers to puzzle structures, for monolithic
|
||||
* platforms.
|
||||
*
|
||||
* This file is automatically generated by mkfiles.pl. Do not edit
|
||||
* it directly, or the changes will be lost next time mkfiles.pl runs.
|
||||
* Instead, edit Recipe and/or its *.R subfiles.
|
||||
*/
|
||||
#include "puzzles.h"
|
||||
#define GAMELIST(A) \
|
||||
!end
|
||||
|
||||
# Now each .R file adds part of the macro definition of GAMELIST to list.c.
|
||||
!include *.R
|
||||
|
||||
# Then we finish up list.c as follows:
|
||||
!begin >list.c
|
||||
|
||||
#define DECL(x) extern const game x;
|
||||
#define REF(x) &x,
|
||||
GAMELIST(DECL)
|
||||
const game *gamelist[] = { GAMELIST(REF) };
|
||||
const int gamecount = lenof(gamelist);
|
||||
!end
|
||||
|
||||
# Unix standalone application for special-purpose obfuscation.
|
||||
obfusc : [U] obfusc STANDALONE
|
||||
|
||||
puzzles : [G] windows[COMBINED] WINDOWS_COMMON COMMON ALL noicon.res
|
||||
|
||||
# Mac OS X unified application containing all the puzzles.
|
||||
Puzzles : [MX] osx osx.icns osx-info.plist COMMON ALL
|
||||
# For OS X, we must create the online help and include it in the
|
||||
# application bundle.) Also we add -DCOMBINED to the compiler flags
|
||||
# so as to inform the code that we're building a single binary for
|
||||
# all the puzzles. Then I've also got some code in here to build a
|
||||
# distributable .dmg disk image.
|
||||
!begin osx
|
||||
Puzzles_extra = Puzzles.app/Contents/Resources/Help/index.html
|
||||
Puzzles.app/Contents/Resources/Help/index.html: \
|
||||
Puzzles.app/Contents/Resources/Help osx-help.but puzzles.but
|
||||
cd Puzzles.app/Contents/Resources/Help; \
|
||||
halibut --html ../../../../osx-help.but ../../../../puzzles.but
|
||||
Puzzles.app/Contents/Resources/Help: Puzzles.app/Contents/Resources
|
||||
mkdir -p Puzzles.app/Contents/Resources/Help
|
||||
|
||||
release: Puzzles.dmg
|
||||
Puzzles.dmg: Puzzles
|
||||
rm -f raw.dmg
|
||||
hdiutil create -megabytes 5 -layout NONE raw.dmg
|
||||
hdid -nomount raw.dmg > devicename
|
||||
newfs_hfs -v "Simon Tatham's Puzzle Collection" `cat devicename`
|
||||
hdiutil eject `cat devicename`
|
||||
hdid raw.dmg | cut -f1 -d' ' > devicename
|
||||
cp -R Puzzles.app /Volumes/"Simon Tatham's Puzzle Collection"
|
||||
hdiutil eject `cat devicename`
|
||||
rm -f Puzzles.dmg
|
||||
hdiutil convert -format UDCO raw.dmg -o Puzzles.dmg
|
||||
rm -f raw.dmg devicename
|
||||
!end
|
||||
|
||||
!begin am
|
||||
bin_PROGRAMS = $(GAMES)
|
||||
!end
|
||||
!begin am_begin
|
||||
GAMES =
|
||||
!end
|
||||
|
||||
# make install for Unix.
|
||||
!begin gtk
|
||||
install:
|
||||
for i in $(GAMES); do \
|
||||
$(INSTALL_PROGRAM) -m 755 $(BINPREFIX)$$i $(DESTDIR)$(gamesdir)/$(BINPREFIX)$$i \
|
||||
|| exit 1; \
|
||||
done
|
||||
!end
|
||||
!begin nestedvm
|
||||
.PRECIOUS: %.class
|
||||
%.class: %.mips
|
||||
java -cp $(NESTEDVM)/build:$(NESTEDVM)/upstream/build/classgen/build \
|
||||
org.ibex.nestedvm.Compiler -outformat class -d . \
|
||||
PuzzleEngine $<
|
||||
mv PuzzleEngine.class $@
|
||||
|
||||
org:
|
||||
mkdir -p org/ibex/nestedvm/util
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/Registers.class org/ibex/nestedvm
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/UsermodeConstants.class org/ibex/nestedvm
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/Runtime*.class org/ibex/nestedvm
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Platform*.class org/ibex/nestedvm/util
|
||||
cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Seekable*.class org/ibex/nestedvm/util
|
||||
echo "Main-Class: PuzzleApplet" >applet.manifest
|
||||
|
||||
PuzzleApplet.class: PuzzleApplet.java org
|
||||
javac -source 1.3 -target 1.3 PuzzleApplet.java
|
||||
|
||||
%.jar: %.class PuzzleApplet.class org
|
||||
mv $< PuzzleEngine.class
|
||||
jar cfm $@ applet.manifest PuzzleEngine.class PuzzleApplet*.class org
|
||||
echo '<applet archive="'$@'" code="PuzzleApplet" width="700" height="500"></applet>' >$*.html
|
||||
mv PuzzleEngine.class $<
|
||||
!end
|
||||
|
||||
# A benchmarking and testing target for the GTK puzzles.
|
||||
!begin gtk
|
||||
test: benchmark.html benchmark.txt
|
||||
|
||||
benchmark.html: benchmark.txt benchmark.pl
|
||||
./benchmark.pl benchmark.txt > $@
|
||||
|
||||
benchmark.txt: benchmark.sh $(GAMES)
|
||||
./benchmark.sh > $@
|
||||
|
||||
!end
|
||||
!begin am
|
||||
test: benchmark.html benchmark.txt
|
||||
|
||||
benchmark.html: benchmark.txt benchmark.pl
|
||||
./benchmark.pl benchmark.txt > $@
|
||||
|
||||
benchmark.txt: benchmark.sh $(GAMES)
|
||||
./benchmark.sh > $@
|
||||
!end
|
||||
1832
apps/plugins/puzzles/src/aclocal.m4
vendored
Normal file
1832
apps/plugins/puzzles/src/aclocal.m4
vendored
Normal file
File diff suppressed because it is too large
Load diff
197
apps/plugins/puzzles/src/benchmark.pl
Executable file
197
apps/plugins/puzzles/src/benchmark.pl
Executable file
|
|
@ -0,0 +1,197 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Process the raw output from benchmark.sh into Javascript-ified HTML.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my @presets = ();
|
||||
my %presets = ();
|
||||
my $maxval = 0;
|
||||
|
||||
while (<>) {
|
||||
chomp;
|
||||
if (/^(.*)(#.*): ([\d\.]+)$/) {
|
||||
push @presets, $1 unless defined $presets{$1};
|
||||
push @{$presets{$1}}, $3;
|
||||
$maxval = $3 if $maxval < $3;
|
||||
}
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ASCII" />
|
||||
<title>Puzzle generation-time benchmarks</title>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function choose_scale_ticks(scale) {
|
||||
var nscale = 1, j = 0, factors = [2,2.5,2];
|
||||
while (scale / nscale > 20) {
|
||||
nscale *= factors[j];
|
||||
j = (j+1) % factors.length;
|
||||
}
|
||||
return nscale;
|
||||
}
|
||||
function initPlots() {
|
||||
var canvases = document.getElementsByTagName('canvas');
|
||||
for (var i = 0; i < canvases.length; i++) {
|
||||
var canvas = canvases[i];
|
||||
var scale = eval(canvas.getAttribute("data-scale"));
|
||||
var add = 20.5, mult = (canvas.width - 2*add) / scale;
|
||||
var data = eval(canvas.getAttribute("data-points"));
|
||||
var ctx = canvas.getContext('2d');
|
||||
ctx.lineWidth = '1px';
|
||||
ctx.lineCap = 'round';
|
||||
ctx.lineJoin = 'round';
|
||||
ctx.strokeStyle = ctx.fillStyle = '#000000';
|
||||
if (data === "scale") {
|
||||
// Draw scale.
|
||||
ctx.font = "16px sans-serif";
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "alphabetic";
|
||||
var nscale = choose_scale_ticks(scale);
|
||||
for (var x = 0; x <= scale; x += nscale) {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(add+mult*x, canvas.height);
|
||||
ctx.lineTo(add+mult*x, canvas.height - 3);
|
||||
ctx.stroke();
|
||||
ctx.fillText(x + "s", add+mult*x, canvas.height - 6);
|
||||
}
|
||||
} else {
|
||||
// Draw a box plot.
|
||||
function quantile(x) {
|
||||
var n = (data.length * x) | 0;
|
||||
return (data[n-1] + data[n]) / 2;
|
||||
}
|
||||
|
||||
var q1 = quantile(0.25), q2 = quantile(0.5), q3 = quantile(0.75);
|
||||
var iqr = q3 - q1;
|
||||
var top = 0.5, bot = canvas.height - 1.5, mid = (top+bot)/2;
|
||||
var wlo = null, whi = null; // whisker ends
|
||||
|
||||
ctx.strokeStyle = '#bbbbbb';
|
||||
var nscale = choose_scale_ticks(scale);
|
||||
for (var x = 0; x <= scale; x += nscale) {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(add+mult*x, 0);
|
||||
ctx.lineTo(add+mult*x, canvas.height);
|
||||
ctx.stroke();
|
||||
}
|
||||
ctx.strokeStyle = '#000000';
|
||||
|
||||
for (var j in data) {
|
||||
var x = data[j];
|
||||
if (x >= q1 - 1.5 * iqr && x <= q3 + 1.5 * iqr) {
|
||||
if (wlo === null || wlo > x)
|
||||
wlo = x;
|
||||
if (whi === null || whi < x)
|
||||
whi = x;
|
||||
} else {
|
||||
ctx.beginPath();
|
||||
ctx.arc(add+mult*x, mid, 2, 0, 2*Math.PI);
|
||||
ctx.stroke();
|
||||
if (x >= q1 - 3 * iqr && x <= q3 + 3 * iqr)
|
||||
ctx.fill();
|
||||
}
|
||||
}
|
||||
|
||||
ctx.beginPath();
|
||||
|
||||
// Box
|
||||
ctx.moveTo(add+mult*q1, top);
|
||||
ctx.lineTo(add+mult*q3, top);
|
||||
ctx.lineTo(add+mult*q3, bot);
|
||||
ctx.lineTo(add+mult*q1, bot);
|
||||
ctx.closePath();
|
||||
|
||||
// Line at median
|
||||
ctx.moveTo(add+mult*q2, top);
|
||||
ctx.lineTo(add+mult*q2, bot);
|
||||
|
||||
// Lower whisker
|
||||
ctx.moveTo(add+mult*q1, mid);
|
||||
ctx.lineTo(add+mult*wlo, mid);
|
||||
ctx.moveTo(add+mult*wlo, top);
|
||||
ctx.lineTo(add+mult*wlo, bot);
|
||||
|
||||
// Upper whisker
|
||||
ctx.moveTo(add+mult*q3, mid);
|
||||
ctx.lineTo(add+mult*whi, mid);
|
||||
ctx.moveTo(add+mult*whi, top);
|
||||
ctx.lineTo(add+mult*whi, bot);
|
||||
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
document.getElementById('sort_orig').onclick = function() {
|
||||
sort(function(e) {
|
||||
return parseFloat(e.getAttribute("data-index"));
|
||||
});
|
||||
};
|
||||
document.getElementById('sort_median').onclick = function() {
|
||||
sort(function(e) {
|
||||
return -parseFloat(e.getAttribute("data-median"));
|
||||
});
|
||||
};
|
||||
document.getElementById('sort_mean').onclick = function() {
|
||||
sort(function(e) {
|
||||
return -parseFloat(e.getAttribute("data-mean"));
|
||||
});
|
||||
};
|
||||
}
|
||||
function sort(keyfn) {
|
||||
var rows = document.getElementsByTagName("tr");
|
||||
var trs = [];
|
||||
for (var i = 0; i < rows.length; i++)
|
||||
trs.push(rows[i]);
|
||||
trs.sort(function(a,b) {
|
||||
var akey = keyfn(a);
|
||||
var bkey = keyfn(b);
|
||||
return akey < bkey ? -1 : akey > bkey ? +1 : 0;
|
||||
});
|
||||
var parent = trs[0].parentElement;
|
||||
for (var i = 0; i < trs.length; i++)
|
||||
parent.removeChild(trs[i]);
|
||||
for (var i = 0; i < trs.length; i++)
|
||||
parent.appendChild(trs[i]);
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body onLoad="initPlots();">
|
||||
<h1 align=center>Puzzle generation-time benchmarks</h1>
|
||||
<p>Sort order:
|
||||
<button id="sort_orig">Original</button>
|
||||
<button id="sort_median">Median</button>
|
||||
<button id="sort_mean">Mean</button>
|
||||
<table>
|
||||
<tr><th>Preset</th><td><canvas width=700 height=30 data-points='"scale"' data-scale="$maxval"></td></tr>
|
||||
EOF
|
||||
|
||||
my $index = 0;
|
||||
for my $preset (@presets) {
|
||||
my @data = sort { $a <=> $b } @{$presets{$preset}};
|
||||
my $median = ($#data % 2 ?
|
||||
($data[($#data-1)/2]+$data[($#data+1)/2])/2 :
|
||||
$data[$#data/2]);
|
||||
my $mean = 0; map { $mean += $_ } @data; $mean /= @data;
|
||||
print "<tr data-index=\"$index\" data-mean=\"$mean\" data-median=\"$median\"><td>", &escape($preset), "</td><td><canvas width=700 height=15 data-points=\"[";
|
||||
print join ",", @data;
|
||||
print "]\" data-scale=\"$maxval\"></td></tr>\n";
|
||||
$index++;
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
sub escape {
|
||||
my ($text) = @_;
|
||||
$text =~ s/&/&/g;
|
||||
$text =~ s/</</g;
|
||||
$text =~ s/>/>/g;
|
||||
return $text;
|
||||
}
|
||||
27
apps/plugins/puzzles/src/benchmark.sh
Executable file
27
apps/plugins/puzzles/src/benchmark.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Run every puzzle in benchmarking mode, and generate a file of raw
|
||||
# data that benchmark.pl will format into a web page.
|
||||
|
||||
# If any arguments are provided, use those as the list of games to
|
||||
# benchmark. Otherwise, read the full list from gamedesc.txt.
|
||||
if test $# = 0; then
|
||||
set -- $(cut -f1 -d: < gamedesc.txt)
|
||||
fi
|
||||
|
||||
failures=false
|
||||
|
||||
for game in "$@"; do
|
||||
# Use 'env -i' to suppress any environment variables that might
|
||||
# change the preset list for a puzzle (e.g. user-defined extras)
|
||||
presets=$(env -i ./$game --list-presets | cut -f1 -d' ')
|
||||
for preset in $presets; do
|
||||
if ! env -i ./$game --test-solve --time-generation \
|
||||
--generate 100 $preset;
|
||||
then
|
||||
echo "${game} ${preset} failed to generate" >&2
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if $failures; then exit 1; fi
|
||||
19
apps/plugins/puzzles/src/blackbox.R
Normal file
19
apps/plugins/puzzles/src/blackbox.R
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
blackbox : [X] GTK COMMON blackbox blackbox-icon|no-icon
|
||||
|
||||
blackbox : [G] WINDOWS COMMON blackbox blackbox.res|noicon.res
|
||||
|
||||
ALL += blackbox[COMBINED]
|
||||
|
||||
!begin am gtk
|
||||
GAMES += blackbox
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(blackbox) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
blackbox:blackbox.exe:Black Box:Ball-finding puzzle:Find the hidden balls in the box by bouncing laser beams off them.
|
||||
!end
|
||||
1543
apps/plugins/puzzles/src/blackbox.c
Normal file
1543
apps/plugins/puzzles/src/blackbox.c
Normal file
File diff suppressed because it is too large
Load diff
125
apps/plugins/puzzles/src/blackbox.html
Normal file
125
apps/plugins/puzzles/src/blackbox.html
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Black Box</title>
|
||||
<link rel="previous" href="untangle.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="slant.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="untangle.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="slant.html">Next</a></p>
|
||||
<h1><a name="C19"></a>Chapter 19: <a name="i0"></a>Black Box</h1>
|
||||
<p>
|
||||
A number of balls are hidden in a rectangular arena. You have to deduce the positions of the balls by firing lasers positioned at the edges of the arena and observing how their beams are deflected.
|
||||
</p>
|
||||
<p>
|
||||
Beams will travel straight from their origin until they hit the opposite side of the arena (at which point they emerge), unless affected by balls in one of the following ways:
|
||||
</p>
|
||||
<ul><li>
|
||||
A beam that hits a ball head-on is absorbed and will never re-emerge. This includes beams that meet a ball on the first rank of the arena.
|
||||
</li>
|
||||
<li>
|
||||
A beam with a ball in its front-left square and no ball ahead of it gets deflected 90 degrees to the right.
|
||||
</li>
|
||||
<li>
|
||||
A beam with a ball in its front-right square and no ball ahead of it gets similarly deflected to the left.
|
||||
</li>
|
||||
<li>
|
||||
A beam that would re-emerge from its entry location is considered to be ‘reflected’.
|
||||
</li>
|
||||
<li>
|
||||
A beam which would get deflected before entering the arena by a ball to the front-left or front-right of its entry point is also considered to be ‘reflected’.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Beams that are reflected appear as a ‘R’; beams that hit balls head-on appear as ‘H’. Otherwise, a number appears at the firing point and the location where the beam emerges (this number is unique to that shot).
|
||||
</p>
|
||||
<p>
|
||||
You can place guesses as to the location of the balls, based on the entry and exit patterns of the beams; once you have placed enough balls a button appears enabling you to have your guesses checked.
|
||||
</p>
|
||||
<p>
|
||||
Here is a diagram showing how the positions of balls can create each of the beam behaviours shown above:
|
||||
</p>
|
||||
<pre><code> 1RHR----
|
||||
|..O.O...|
|
||||
2........3
|
||||
|........|
|
||||
|........|
|
||||
3........|
|
||||
|......O.|
|
||||
H........|
|
||||
|.....O..|
|
||||
12-RR---
|
||||
</code></pre>
|
||||
<p>
|
||||
As shown, it is possible for a beam to receive multiple reflections before re-emerging (see turn 3). Similarly, a beam may be reflected (possibly more than once) before receiving a hit (the ‘H’ on the left side of the example).
|
||||
</p>
|
||||
<p>
|
||||
Note that any layout with more than 4 balls may have a non-unique solution. The following diagram illustrates this; if you know the board contains 5 balls, it is impossible to determine where the fifth ball is (possible positions marked with an <code>x</code>):
|
||||
</p>
|
||||
<pre><code> --------
|
||||
|........|
|
||||
|........|
|
||||
|..O..O..|
|
||||
|...xx...|
|
||||
|...xx...|
|
||||
|..O..O..|
|
||||
|........|
|
||||
|........|
|
||||
--------
|
||||
</code></pre>
|
||||
<p>
|
||||
For this reason, when you have your guesses checked, the game will check that your solution <em>produces the same results</em> as the computer's, rather than that your solution is identical to the computer's. So in the above example, you could put the fifth ball at <em>any</em> of the locations marked with an <code>x</code>, and you would still win.
|
||||
</p>
|
||||
<p>
|
||||
Black Box was contributed to this collection by James Harvey.
|
||||
</p>
|
||||
<h2><a name="S19.1"></a>19.1 <a name="i1"></a>Black Box controls</h2>
|
||||
<p>
|
||||
To fire a laser beam, left-click in a square around the edge of the arena. The results will be displayed immediately. Clicking or holding the left button on one of these squares will highlight the current go (or a previous go) to confirm the exit point for that laser, if applicable.
|
||||
</p>
|
||||
<p>
|
||||
To guess the location of a ball, left-click within the arena and a black circle will appear marking the guess; click again to remove the guessed ball.
|
||||
</p>
|
||||
<p>
|
||||
Locations in the arena may be locked against modification by right-clicking; whole rows and columns may be similarly locked by right-clicking in the laser square above/below that column, or to the left/right of that row.
|
||||
</p>
|
||||
<p>
|
||||
The cursor keys may also be used to move around the grid. Pressing the Enter key will fire a laser or add a new ball-location guess, and pressing Space will lock a cell, row, or column.
|
||||
</p>
|
||||
<p>
|
||||
When an appropriate number of balls have been guessed, a button will appear at the top-left corner of the grid; clicking that (with mouse or cursor) will check your guesses.
|
||||
</p>
|
||||
<p>
|
||||
If you click the ‘check’ button and your guesses are not correct, the game will show you the minimum information necessary to demonstrate this to you, so you can try again. If your ball positions are not consistent with the beam paths you already know about, one beam path will be circled to indicate that it proves you wrong. If your positions match all the existing beam paths but are still wrong, one new beam path will be revealed (written in red) which is not consistent with your current guesses.
|
||||
</p>
|
||||
<p>
|
||||
If you decide to give up completely, you can select Solve to reveal the actual ball positions. At this point, correctly-placed balls will be displayed as filled black circles, incorrectly-placed balls as filled black circles with red crosses, and missing balls as filled red circles. In addition, a red circle marks any laser you had already fired which is not consistent with your ball layout (just as when you press the ‘check’ button), and red text marks any laser you <em>could</em> have fired in order to distinguish your ball layout from the correct one.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S19.2"></a>19.2 <a name="i2"></a>Black Box parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Width</em>, <em>Height</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Size of grid in squares. There are 2 × <em>Width</em> × <em>Height</em> lasers per grid, two per row and two per column.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>No. of balls</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Number of balls to place in the grid. This can be a single number, or a range (separated with a hyphen, like ‘2-6’), and determines the number of balls to place on the grid. The ‘reveal’ button is only enabled if you have guessed an appropriate number of balls; a guess using a different number to the original solution is still acceptable, if all the beam inputs and outputs match.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
21
apps/plugins/puzzles/src/bridges.R
Normal file
21
apps/plugins/puzzles/src/bridges.R
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
BRIDGES_EXTRA = dsf findloop
|
||||
|
||||
bridges : [X] GTK COMMON bridges BRIDGES_EXTRA bridges-icon|no-icon
|
||||
|
||||
bridges : [G] WINDOWS COMMON bridges BRIDGES_EXTRA bridges.res|noicon.res
|
||||
|
||||
ALL += bridges[COMBINED] BRIDGES_EXTRA
|
||||
|
||||
!begin am gtk
|
||||
GAMES += bridges
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(bridges) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
bridges:bridges.exe:Bridges:Bridge-placing puzzle:Connect all the islands with a network of bridges.
|
||||
!end
|
||||
3262
apps/plugins/puzzles/src/bridges.c
Normal file
3262
apps/plugins/puzzles/src/bridges.c
Normal file
File diff suppressed because it is too large
Load diff
135
apps/plugins/puzzles/src/bridges.html
Normal file
135
apps/plugins/puzzles/src/bridges.html
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Bridges</title>
|
||||
<link rel="previous" href="tents.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="unequal.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="tents.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="unequal.html">Next</a></p>
|
||||
<h1><a name="C26"></a>Chapter 26: <a name="i0"></a>Bridges</h1>
|
||||
<p>
|
||||
You have a set of islands distributed across the playing area. Each island contains a number. Your aim is to connect the islands together with bridges, in such a way that:
|
||||
</p>
|
||||
<ul><li>
|
||||
Bridges run horizontally or vertically.
|
||||
</li>
|
||||
<li>
|
||||
The number of bridges terminating at any island is equal to the number written in that island.
|
||||
</li>
|
||||
<li>
|
||||
Two bridges may run in parallel between the same two islands, but no more than two may do so.
|
||||
</li>
|
||||
<li>
|
||||
No bridge crosses another bridge.
|
||||
</li>
|
||||
<li>
|
||||
All the islands are connected together.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
There are some configurable alternative modes, which involve changing the parallel-bridge limit to something other than 2, and introducing the additional constraint that no sequence of bridges may form a loop from one island back to the same island. The rules stated above are the default ones.
|
||||
</p>
|
||||
<p>
|
||||
Credit for this puzzle goes to <a name="i1"></a>Nikoli <a href="#p0">[12]</a>.
|
||||
</p>
|
||||
<p>
|
||||
Bridges was contributed to this collection by James Harvey.
|
||||
</p>
|
||||
<p><a name="p0"></a>
|
||||
[12] <a href="http://www.nikoli.co.jp/en/puzzles/hashiwokakero.html"><code>http://www.nikoli.co.jp/en/puzzles/hashiwokakero.html</code></a> (beware of Flash)
|
||||
</p>
|
||||
<h2><a name="S26.1"></a>26.1 <a name="i2"></a>Bridges controls</h2>
|
||||
<p>
|
||||
To place a bridge between two islands, click the mouse down on one island and drag it towards the other. You do not need to drag all the way to the other island; you only need to move the mouse far enough for the intended bridge direction to be unambiguous. (So you can keep the mouse near the starting island and conveniently throw bridges out from it in many directions.)
|
||||
</p>
|
||||
<p>
|
||||
Doing this again when a bridge is already present will add another parallel bridge. If there are already as many bridges between the two islands as permitted by the current game rules (i.e. two by default), the same dragging action will remove all of them.
|
||||
</p>
|
||||
<p>
|
||||
If you want to remind yourself that two islands definitely <em>do not</em> have a bridge between them, you can right-drag between them in the same way to draw a ‘non-bridge’ marker.
|
||||
</p>
|
||||
<p>
|
||||
If you think you have finished with an island (i.e. you have placed all its bridges and are confident that they are in the right places), you can mark the island as finished by left-clicking on it. This will highlight it and all the bridges connected to it, and you will be prevented from accidentally modifying any of those bridges in future. Left-clicking again on a highlighted island will unmark it and restore your ability to modify it.
|
||||
</p>
|
||||
<p>
|
||||
You can also use the cursor keys to move around the grid: if possible the cursor will always move orthogonally, otherwise it will move towards the nearest island to the indicated direction. Holding Control and pressing a cursor key will lay a bridge in that direction (if available); Shift and a cursor key will lay a ‘non-bridge’ marker. Pressing the return key followed by a cursor key will also lay a bridge in that direction.
|
||||
</p>
|
||||
<p>
|
||||
You can mark an island as finished by pressing the space bar or by pressing the return key twice.
|
||||
</p>
|
||||
<p>
|
||||
By pressing a number key, you can jump to the nearest island with that number. Letters ‘a’, ..., ‘f’ count as 10, ..., 15 and ‘0’ as 16.
|
||||
</p>
|
||||
<p>
|
||||
Violations of the puzzle rules will be marked in red:
|
||||
</p>
|
||||
<ul><li>
|
||||
An island with too many bridges will be highlighted in red.
|
||||
</li>
|
||||
<li>
|
||||
An island with too few bridges will be highlighted in red if it is definitely an error (as opposed to merely not being finished yet): if adding enough bridges would involve having to cross another bridge or remove a non-bridge marker, or if the island has been highlighted as complete.
|
||||
</li>
|
||||
<li>
|
||||
A group of islands and bridges may be highlighted in red if it is a closed subset of the puzzle with no way to connect it to the rest of the islands. For example, if you directly connect two 1s together with a bridge and they are not the only two islands on the grid, they will light up red to indicate that such a group cannot be contained in any valid solution.
|
||||
</li>
|
||||
<li>
|
||||
If you have selected the (non-default) option to disallow loops in the solution, a group of bridges which forms a loop will be highlighted.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S26.2"></a>26.2 <a name="i3"></a>Bridges parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Width</em>, <em>Height</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Size of grid in squares.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Difficulty</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Difficulty level of puzzle.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Allow loops</em>
|
||||
</dt>
|
||||
<dd>
|
||||
This is set by default. If cleared, puzzles will be generated in such a way that they are always soluble without creating a loop, and solutions which do involve a loop will be disallowed.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Max. bridges per direction</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Maximum number of bridges in any particular direction. The default is 2, but you can change it to 1, 3 or 4. In general, fewer is easier.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>%age of island squares</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Gives a rough percentage of islands the generator will try and lay before finishing the puzzle. Certain layouts will not manage to lay enough islands; this is an upper bound.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Expansion factor (%age)</em>
|
||||
</dt>
|
||||
<dd>
|
||||
The grid generator works by picking an existing island at random (after first creating an initial island somewhere). It then decides on a direction (at random), and then works out how far it could extend before creating another island. This parameter determines how likely it is to extend as far as it can, rather than choosing somewhere closer.
|
||||
<p>
|
||||
High expansion factors usually mean easier puzzles with fewer possible islands; low expansion factors can create lots of tightly-packed islands.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
21
apps/plugins/puzzles/src/chm.but
Normal file
21
apps/plugins/puzzles/src/chm.but
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
\# File containing the magic HTML configuration directives to create
|
||||
\# an MS HTML Help project. We put this on the end of the Puzzles
|
||||
\# docs build command line to build the HHP and friends.
|
||||
|
||||
\cfg{html-leaf-level}{infinite}
|
||||
\cfg{html-leaf-contains-contents}{false}
|
||||
\cfg{html-suppress-navlinks}{true}
|
||||
\cfg{html-suppress-address}{true}
|
||||
|
||||
\cfg{html-contents-filename}{index.html}
|
||||
\cfg{html-template-filename}{%k.html}
|
||||
\cfg{html-template-fragment}{%k}
|
||||
|
||||
\cfg{html-mshtmlhelp-chm}{puzzles.chm}
|
||||
\cfg{html-mshtmlhelp-project}{puzzles.hhp}
|
||||
\cfg{html-mshtmlhelp-contents}{puzzles.hhc}
|
||||
\cfg{html-mshtmlhelp-index}{puzzles.hhk}
|
||||
|
||||
\cfg{html-body-end}{}
|
||||
|
||||
\cfg{html-head-end}{<link rel="stylesheet" type="text/css" href="chm.css">}
|
||||
7
apps/plugins/puzzles/src/chm.css
Normal file
7
apps/plugins/puzzles/src/chm.css
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/* Stylesheet for a Windows .CHM help file */
|
||||
|
||||
body { font-size: 75%; font-family: Verdana, Arial, Helvetica, Sans-Serif; }
|
||||
|
||||
h1 { font-weight: bold; font-size: 150%; }
|
||||
h2 { font-weight: bold; font-size: 130%; }
|
||||
h3 { font-weight: bold; font-size: 120%; }
|
||||
110
apps/plugins/puzzles/src/combi.c
Normal file
110
apps/plugins/puzzles/src/combi.c
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "puzzles.h"
|
||||
|
||||
/* horrific and doesn't check overflow. */
|
||||
static long factx(long x, long y)
|
||||
{
|
||||
long acc = 1, i;
|
||||
|
||||
for (i = y; i <= x; i++)
|
||||
acc *= i;
|
||||
return acc;
|
||||
}
|
||||
|
||||
void reset_combi(combi_ctx *combi)
|
||||
{
|
||||
int i;
|
||||
combi->nleft = combi->total;
|
||||
for (i = 0; i < combi->r; i++)
|
||||
combi->a[i] = i;
|
||||
}
|
||||
|
||||
combi_ctx *new_combi(int r, int n)
|
||||
{
|
||||
long nfr, nrf;
|
||||
combi_ctx *combi;
|
||||
|
||||
assert(r <= n);
|
||||
assert(n >= 1);
|
||||
|
||||
combi = snew(combi_ctx);
|
||||
memset(combi, 0, sizeof(combi_ctx));
|
||||
combi->r = r;
|
||||
combi->n = n;
|
||||
|
||||
combi->a = snewn(r, int);
|
||||
memset(combi->a, 0, r * sizeof(int));
|
||||
|
||||
nfr = factx(n, r+1);
|
||||
nrf = factx(n-r, 1);
|
||||
combi->total = (int)(nfr / nrf);
|
||||
|
||||
reset_combi(combi);
|
||||
return combi;
|
||||
}
|
||||
|
||||
/* returns NULL when we're done otherwise returns input. */
|
||||
combi_ctx *next_combi(combi_ctx *combi)
|
||||
{
|
||||
int i = combi->r - 1, j;
|
||||
|
||||
if (combi->nleft == combi->total)
|
||||
goto done;
|
||||
else if (combi->nleft <= 0)
|
||||
return NULL;
|
||||
|
||||
while (combi->a[i] == combi->n - combi->r + i)
|
||||
i--;
|
||||
combi->a[i] += 1;
|
||||
for (j = i+1; j < combi->r; j++)
|
||||
combi->a[j] = combi->a[i] + j - i;
|
||||
|
||||
done:
|
||||
combi->nleft--;
|
||||
return combi;
|
||||
}
|
||||
|
||||
void free_combi(combi_ctx *combi)
|
||||
{
|
||||
sfree(combi->a);
|
||||
sfree(combi);
|
||||
}
|
||||
|
||||
/* compile this with:
|
||||
* gcc -o combi.exe -DSTANDALONE_COMBI_TEST combi.c malloc.c
|
||||
*/
|
||||
#ifdef STANDALONE_COMBI_TEST
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void fatal(char *fmt, ...)
|
||||
{
|
||||
abort();
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
combi_ctx *c;
|
||||
int i, r, n;
|
||||
|
||||
if (argc < 3) {
|
||||
fprintf(stderr, "Usage: combi R N\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
r = atoi(argv[1]); n = atoi(argv[2]);
|
||||
c = new_combi(r, n);
|
||||
printf("combi %d of %d, %d elements.\n", c->r, c->n, c->total);
|
||||
|
||||
while (next_combi(c)) {
|
||||
for (i = 0; i < c->r; i++) {
|
||||
printf("%d ", c->a[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
free_combi(c);
|
||||
}
|
||||
|
||||
#endif
|
||||
285
apps/plugins/puzzles/src/common.html
Normal file
285
apps/plugins/puzzles/src/common.html
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Common features</title>
|
||||
<link rel="previous" href="intro.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="net.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="intro.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="net.html">Next</a></p>
|
||||
|
||||
<ul>
|
||||
<li><a href="#C2">Chapter 2: Common features</a>
|
||||
<ul>
|
||||
<li><a href="#S2.1">2.1 Common actions</a></li>
|
||||
<li><a href="#S2.2">2.2 Specifying games with the game ID</a></li>
|
||||
<li><a href="#S2.3">2.3 The ‘Type’ menu</a></li>
|
||||
<li><a href="#S2.4">2.4 Specifying game parameters on the command line</a></li>
|
||||
<li><a href="#S2.5">2.5 Unix command-line options</a></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
<h1><a name="C2"></a>Chapter 2: <a name="i0"></a>Common features</h1>
|
||||
<p>
|
||||
This chapter describes features that are common to all the games.
|
||||
</p>
|
||||
<h2><a name="S2.1"></a>2.1 <a name="i1"></a>Common actions</h2>
|
||||
<p>
|
||||
These actions are all available from the <a name="i2"></a>‘Game’ menu and via <a name="i3"></a>keyboard shortcuts, in addition to any game-specific actions.
|
||||
</p>
|
||||
<p>
|
||||
(On <a name="i4"></a>Mac OS X, to conform with local user interface standards, these actions are situated on the <a name="i5"></a>‘File’ and <a name="i6"></a>‘Edit’ menus instead.)
|
||||
</p>
|
||||
<dl><dt>
|
||||
<a name="i7"></a><em>New game</em> (‘N’, Ctrl+‘N’)
|
||||
</dt>
|
||||
<dd>
|
||||
Starts a new game, with a random initial state.
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i8"></a><em>Restart game</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Resets the current game to its initial state. (This can be undone.)
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i9"></a><em>Load</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Loads a saved game from a file on disk.
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i10"></a><em>Save</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Saves the current state of your game to a file on disk.
|
||||
<p>
|
||||
The Load and Save operations preserve your entire game history (so you can save, reload, and still Undo and Redo things you had done before saving).
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i11"></a><em>Print</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Where supported (currently only on Windows), brings up a dialog allowing you to print an arbitrary number of puzzles randomly generated from the current parameters, optionally including the current puzzle. (Only for puzzles which make sense to print, of course – it's hard to think of a sensible printable representation of Fifteen!)
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i12"></a><em>Undo</em> (‘U’, Ctrl+‘Z’, Ctrl+‘_’)
|
||||
</dt>
|
||||
<dd>
|
||||
Undoes a single move. (You can undo moves back to the start of the session.)
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i13"></a><em>Redo</em> (‘R’, Ctrl+‘R’)
|
||||
</dt>
|
||||
<dd>
|
||||
Redoes a previously undone move.
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i14"></a><em>Copy</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Copies the current state of your game to the clipboard in text format, so that you can paste it into (say) an e-mail client or a web message board if you're discussing the game with someone else. (Not all games support this feature.)
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i15"></a><em>Solve</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Transforms the puzzle instantly into its solved state. For some games (Cube) this feature is not supported at all because it is of no particular use. For other games (such as Pattern), the solved state can be used to give you information, if you can't see how a solution can exist at all or you want to know where you made a mistake. For still other games (such as Sixteen), automatic solution tells you nothing about how to <em>get</em> to the solution, but it does provide a useful way to get there quickly so that you can experiment with set-piece moves and transformations.
|
||||
<p>
|
||||
Some games (such as Solo) are capable of solving a game ID you have typed in from elsewhere. Other games (such as Rectangles) cannot solve a game ID they didn't invent themself, but when they did invent the game ID they know what the solution is already. Still other games (Pattern) can solve <em>some</em> external game IDs, but only if they aren't too difficult.
|
||||
</p>
|
||||
<p>
|
||||
The ‘Solve’ command adds the solved state to the end of the undo chain for the puzzle. In other words, if you want to go back to solving it yourself after seeing the answer, you can just press Undo.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i16"></a><a name="i17"></a><em>Quit</em> (‘Q’, Ctrl+‘Q’)
|
||||
</dt>
|
||||
<dd>
|
||||
Closes the application entirely.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2><a name="S2.2"></a>2.2 Specifying games with the <a name="i18"></a>game ID</h2>
|
||||
<p>
|
||||
There are two ways to save a game specification out of a puzzle and recreate it later, or recreate it in somebody else's copy of the same puzzle.
|
||||
</p>
|
||||
<p>
|
||||
The ‘<a name="i19"></a>Specific’ and ‘<a name="i20"></a>Random Seed’ options from the <a name="i21"></a>‘Game’ menu (or the ‘File’ menu, on <a name="i22"></a>Mac OS X) each show a piece of text (a ‘game ID’) which is sufficient to reconstruct precisely the same game at a later date.
|
||||
</p>
|
||||
<p>
|
||||
You can enter either of these pieces of text back into the program (via the same ‘Specific’ or ‘Random Seed’ menu options) at a later point, and it will recreate the same game. You can also use either one as a <a name="i23"></a>command line argument (on Windows or Unix); see <a href="#S2.4">section 2.4</a> for more detail.
|
||||
</p>
|
||||
<p>
|
||||
The difference between the two forms is that a descriptive game ID is a literal <em>description</em> of the <a name="i24"></a>initial state of the game, whereas a random seed is just a piece of arbitrary text which was provided as input to the random number generator used to create the puzzle. This means that:
|
||||
</p>
|
||||
<ul><li>
|
||||
Descriptive game IDs tend to be longer in many puzzles (although some, such as Cube (<a href="cube.html#C4">chapter 4</a>), only need very short descriptions). So a random seed is often a <em>quicker</em> way to note down the puzzle you're currently playing, or to tell it to somebody else so they can play the same one as you.
|
||||
</li>
|
||||
<li>
|
||||
Any text at all is a valid random seed. The automatically generated ones are fifteen-digit numbers, but anything will do; you can type in your full name, or a word you just made up, and a valid puzzle will be generated from it. This provides a way for two or more people to race to complete the same puzzle: you think of a random seed, then everybody types it in at the same time, and nobody has an advantage due to having seen the generated puzzle before anybody else.
|
||||
</li>
|
||||
<li>
|
||||
It is often possible to convert puzzles from other sources (such as ‘nonograms’ or ‘sudoku’ from newspapers) into descriptive game IDs suitable for use with these programs.
|
||||
</li>
|
||||
<li>
|
||||
Random seeds are not guaranteed to produce the same result if you use them with a different <a name="i25"></a><em>version</em> of the puzzle program. This is because the generation algorithm might have been improved or modified in later versions of the code, and will therefore produce a different result when given the same sequence of random numbers. Use a descriptive game ID if you aren't sure that it will be used on the same version of the program as yours.
|
||||
<p>
|
||||
(Use the ‘About’ menu option to find out the version number of the program. Programs with the same version number running on different platforms should still be random-seed compatible.)
|
||||
</p>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<a name="i26"></a>A descriptive game ID starts with a piece of text which encodes the <a name="i27"></a><em>parameters</em> of the current game (such as grid size). Then there is a colon, and after that is the description of the game's initial state. A random seed starts with a similar string of parameters, but then it contains a hash sign followed by arbitrary data.
|
||||
</p>
|
||||
<p>
|
||||
If you enter a descriptive game ID, the program will not be able to show you the random seed which generated it, since it wasn't generated <em>from</em> a random seed. If you <em>enter</em> a random seed, however, the program will be able to show you the descriptive game ID derived from that random seed.
|
||||
</p>
|
||||
<p>
|
||||
Note that the game parameter strings are not always identical between the two forms. For some games, there will be parameter data provided with the random seed which is not included in the descriptive game ID. This is because that parameter information is only relevant when <em>generating</em> puzzle grids, and is not important when playing them. Thus, for example, the difficulty level in Solo (<a href="solo.html#C11">chapter 11</a>) is not mentioned in the descriptive game ID.
|
||||
</p>
|
||||
<p>
|
||||
These additional parameters are also not set permanently if you type in a game ID. For example, suppose you have Solo set to ‘Advanced’ difficulty level, and then a friend wants your help with a ‘Trivial’ puzzle; so the friend reads out a random seed specifying ‘Trivial’ difficulty, and you type it in. The program will generate you the same ‘Trivial’ grid which your friend was having trouble with, but once you have finished playing it, when you ask for a new game it will automatically go back to the ‘Advanced’ difficulty which it was previously set on.
|
||||
</p>
|
||||
<h2><a name="S2.3"></a>2.3 The ‘Type’ menu</h2>
|
||||
<p>
|
||||
The <a name="i28"></a>‘Type’ menu, if present, may contain a list of <a name="i29"></a>preset game settings. Selecting one of these will start a new random game with the parameters specified.
|
||||
</p>
|
||||
<p>
|
||||
The ‘Type’ menu may also contain a ‘<a name="i30"></a>Custom’ option which allows you to fine-tune game <a name="i31"></a>parameters. The parameters available are specific to each game and are described in the following sections.
|
||||
</p>
|
||||
<h2><a name="S2.4"></a>2.4 Specifying game parameters on the <a name="i32"></a>command line</h2>
|
||||
<p>
|
||||
(This section does not apply to the <a name="i33"></a>Mac OS X version.)
|
||||
</p>
|
||||
<p>
|
||||
The games in this collection deliberately do not ever save information on to the computer they run on: they have no high score tables and no saved preferences. (This is because I expect at least some people to play them at work, and those people will probably appreciate leaving as little evidence as possible!)
|
||||
</p>
|
||||
<p>
|
||||
However, if you do want to arrange for one of these games to <a name="i34"></a>default to a particular set of parameters, you can specify them on the command line.
|
||||
</p>
|
||||
<p>
|
||||
The easiest way to do this is to set up the parameters you want using the ‘Type’ menu (see <a href="#S2.3">section 2.3</a>), and then to select ‘Random Seed’ from the ‘Game’ or ‘File’ menu (see <a href="#S2.2">section 2.2</a>). The text in the ‘Game ID’ box will be composed of two parts, separated by a hash. The first of these parts represents the game parameters (the size of the playing area, for example, and anything else you set using the ‘Type’ menu).
|
||||
</p>
|
||||
<p>
|
||||
If you run the game with just that parameter text on the command line, it will start up with the settings you specified.
|
||||
</p>
|
||||
<p>
|
||||
For example: if you run Cube (see <a href="cube.html#C4">chapter 4</a>), select ‘Octahedron’ from the ‘Type’ menu, and then go to the game ID selection, you will see a string of the form ‘<code>o2x2#338686542711620</code>’. Take only the part before the hash (‘<code>o2x2</code>’), and start Cube with that text on the command line: ‘<code>PREFIX-cube o2x2</code>’.
|
||||
</p>
|
||||
<p>
|
||||
If you copy the <em>entire</em> game ID on to the command line, the game will start up in the specific game that was described. This is occasionally a more convenient way to start a particular game ID than by pasting it into the game ID selection box.
|
||||
</p>
|
||||
<p>
|
||||
(You could also retrieve the encoded game parameters using the ‘Specific’ menu option instead of ‘Random Seed’, but if you do then some options, such as the difficulty level in Solo, will be missing. See <a href="#S2.2">section 2.2</a> for more details on this.)
|
||||
</p>
|
||||
<h2><a name="S2.5"></a>2.5 <a name="i35"></a>Unix <a name="i36"></a>command-line options</h2>
|
||||
<p>
|
||||
(This section only applies to the Unix port.)
|
||||
</p>
|
||||
<p>
|
||||
In addition to being able to specify game parameters on the command line (see <a href="#S2.4">section 2.4</a>), there are various other options:
|
||||
</p>
|
||||
<dl><dt>
|
||||
<code>--game</code>
|
||||
</dt>
|
||||
<dt>
|
||||
<code>--load</code>
|
||||
</dt>
|
||||
<dd>
|
||||
These options respectively determine whether the command-line argument is treated as specifying game parameters or a <a name="i37"></a>save file to <a name="i38"></a>load. Only one should be specified. If neither of these options is specified, a guess is made based on the format of the argument.
|
||||
</dd>
|
||||
<dt>
|
||||
<code>--generate </code><em>n</em>
|
||||
</dt>
|
||||
<dd>
|
||||
If this option is specified, instead of a puzzle being displayed, a number of descriptive game IDs will be <a name="i39"></a>invented and printed on standard output. This is useful for gaining access to the game generation algorithms without necessarily using the frontend.
|
||||
<p>
|
||||
If game parameters are specified on the command-line, they will be used to generate the game IDs; otherwise a default set of parameters will be used.
|
||||
</p>
|
||||
<p>
|
||||
The most common use of this option is in conjunction with <code>--print</code>, in which case its behaviour is slightly different; see below.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<a name="i40"></a><code>--print </code><em>w</em><code>x</code><em>h</em>
|
||||
</dt>
|
||||
<dd>
|
||||
If this option is specified, instead of a puzzle being displayed, a printed representation of one or more unsolved puzzles is sent to standard output, in <a name="i41"></a>PostScript format.
|
||||
<p>
|
||||
On each page of puzzles, there will be <em>w</em> across and <em>h</em> down. If there are more puzzles than <em>w</em>×<em>h</em>, more than one page will be printed.
|
||||
</p>
|
||||
<p>
|
||||
If <code>--generate</code> has also been specified, the invented game IDs will be used to generate the printed output. Otherwise, a list of game IDs is expected on standard input (which can be descriptive or random seeds; see <a href="#S2.2">section 2.2</a>), in the same format produced by <code>--generate</code>.
|
||||
</p>
|
||||
<p>
|
||||
For example:
|
||||
</p>
|
||||
<pre><code>PREFIX-net --generate 12 --print 2x3 7x7w | lpr
|
||||
</code></pre>
|
||||
<p>
|
||||
will generate two pages of printed Net puzzles (each of which will have a 7×7 wrapping grid), and pipe the output to the <code>lpr</code> command, which on many systems will send them to an actual printer.
|
||||
</p>
|
||||
<p>
|
||||
There are various other options which affect printing; see below.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<code>--save </code><em>file-prefix</em> [ <code>--save-suffix </code><em>file-suffix</em> ]
|
||||
</dt>
|
||||
<dd>
|
||||
If this option is specified, instead of a puzzle being displayed, saved-game files for one or more unsolved puzzles are written to files constructed from the supplied prefix and/or suffix.
|
||||
<p>
|
||||
If <code>--generate</code> has also been specified, the invented game IDs will be used to generate the printed output. Otherwise, a list of game IDs is expected on standard input (which can be descriptive or random seeds; see <a href="#S2.2">section 2.2</a>), in the same format produced by <code>--generate</code>.
|
||||
</p>
|
||||
<p>
|
||||
For example:
|
||||
</p>
|
||||
<pre><code>PREFIX-net --generate 12 --save game --save-suffix .sav
|
||||
</code></pre>
|
||||
<p>
|
||||
will generate twelve Net saved-game files with the names <code>game0.sav</code> to <code>game11.sav</code>.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<code>--version</code>
|
||||
</dt>
|
||||
<dd>
|
||||
Prints version information about the game, and then quits.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
The following options are only meaningful if <code>--print</code> is also specified:
|
||||
</p>
|
||||
<dl><dt>
|
||||
<code>--with-solutions</code>
|
||||
</dt>
|
||||
<dd>
|
||||
The set of pages filled with unsolved puzzles will be followed by the solutions to those puzzles.
|
||||
</dd>
|
||||
<dt>
|
||||
<code>--scale </code><em>n</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Adjusts how big each puzzle is when printed. Larger numbers make puzzles bigger; the default is 1.0.
|
||||
</dd>
|
||||
<dt>
|
||||
<code>--colour</code>
|
||||
</dt>
|
||||
<dd>
|
||||
Puzzles will be printed in colour, rather than in black and white (if supported by the puzzle).
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
347
apps/plugins/puzzles/src/compile
Executable file
347
apps/plugins/puzzles/src/compile
Executable file
|
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
135
apps/plugins/puzzles/src/config.log
Normal file
135
apps/plugins/puzzles/src/config.log
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by puzzles configure 6.66, which was
|
||||
generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
$ ./configure
|
||||
|
||||
## --------- ##
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = alpha
|
||||
uname -m = x86_64
|
||||
uname -r = 4.8.4-1-ARCH
|
||||
uname -s = Linux
|
||||
uname -v = #1 SMP PREEMPT Sat Oct 22 18:26:57 CEST 2016
|
||||
|
||||
/usr/bin/uname -p = unknown
|
||||
/bin/uname -X = unknown
|
||||
|
||||
/bin/arch = unknown
|
||||
/usr/bin/arch -k = unknown
|
||||
/usr/convex/getsysinfo = unknown
|
||||
/usr/bin/hostinfo = unknown
|
||||
/bin/machine = unknown
|
||||
/usr/bin/oslevel = unknown
|
||||
/bin/universe = unknown
|
||||
|
||||
PATH: /usr/local/sbin
|
||||
PATH: /usr/local/bin
|
||||
PATH: /usr/bin
|
||||
PATH: /opt/cuda/bin
|
||||
PATH: /usr/lib/jvm/default/bin
|
||||
PATH: /opt/kde/bin
|
||||
PATH: /usr/bin/site_perl
|
||||
PATH: /usr/bin/vendor_perl
|
||||
PATH: /usr/bin/core_perl
|
||||
|
||||
|
||||
## ----------- ##
|
||||
## Core tests. ##
|
||||
## ----------- ##
|
||||
|
||||
|
||||
## ---------------- ##
|
||||
## Cache variables. ##
|
||||
## ---------------- ##
|
||||
|
||||
ac_cv_env_CC_set=
|
||||
ac_cv_env_CC_value=
|
||||
ac_cv_env_CFLAGS_set=
|
||||
ac_cv_env_CFLAGS_value=
|
||||
ac_cv_env_CPPFLAGS_set=
|
||||
ac_cv_env_CPPFLAGS_value=
|
||||
ac_cv_env_LDFLAGS_set=
|
||||
ac_cv_env_LDFLAGS_value=
|
||||
ac_cv_env_LIBS_set=
|
||||
ac_cv_env_LIBS_value=
|
||||
ac_cv_env_build_alias_set=
|
||||
ac_cv_env_build_alias_value=
|
||||
ac_cv_env_host_alias_set=
|
||||
ac_cv_env_host_alias_value=
|
||||
ac_cv_env_target_alias_set=
|
||||
ac_cv_env_target_alias_value=
|
||||
|
||||
## ----------------- ##
|
||||
## Output variables. ##
|
||||
## ----------------- ##
|
||||
|
||||
CC=''
|
||||
CFLAGS=''
|
||||
CPPFLAGS=''
|
||||
DEFS=''
|
||||
ECHO_C=''
|
||||
ECHO_N='-n'
|
||||
ECHO_T=''
|
||||
EXEEXT=''
|
||||
INSTALL_DATA=''
|
||||
INSTALL_PROGRAM=''
|
||||
INSTALL_SCRIPT=''
|
||||
LDFLAGS=''
|
||||
LIBOBJS=''
|
||||
LIBS=''
|
||||
LTLIBOBJS=''
|
||||
OBJEXT=''
|
||||
PACKAGE_BUGREPORT='anakin@pobox.com'
|
||||
PACKAGE_NAME='puzzles'
|
||||
PACKAGE_STRING='puzzles 6.66'
|
||||
PACKAGE_TARNAME='puzzles'
|
||||
PACKAGE_URL=''
|
||||
PACKAGE_VERSION='6.66'
|
||||
PATH_SEPARATOR=':'
|
||||
RANLIB=''
|
||||
SHELL='/bin/sh'
|
||||
ac_ct_CC=''
|
||||
bindir='${exec_prefix}/bin'
|
||||
build_alias=''
|
||||
datadir='${datarootdir}'
|
||||
datarootdir='${prefix}/share'
|
||||
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
|
||||
dvidir='${docdir}'
|
||||
exec_prefix='NONE'
|
||||
host_alias=''
|
||||
htmldir='${docdir}'
|
||||
includedir='${prefix}/include'
|
||||
infodir='${datarootdir}/info'
|
||||
libdir='${exec_prefix}/lib'
|
||||
libexecdir='${exec_prefix}/libexec'
|
||||
localedir='${datarootdir}/locale'
|
||||
localstatedir='${prefix}/var'
|
||||
mandir='${datarootdir}/man'
|
||||
oldincludedir='/usr/include'
|
||||
pdfdir='${docdir}'
|
||||
prefix='NONE'
|
||||
program_transform_name='s,x,x,'
|
||||
psdir='${docdir}'
|
||||
sbindir='${exec_prefix}/sbin'
|
||||
sharedstatedir='${prefix}/com'
|
||||
sysconfdir='${prefix}/etc'
|
||||
target_alias=''
|
||||
|
||||
## ----------- ##
|
||||
## confdefs.h. ##
|
||||
## ----------- ##
|
||||
|
||||
/* confdefs.h */
|
||||
#define PACKAGE_NAME "puzzles"
|
||||
#define PACKAGE_TARNAME "puzzles"
|
||||
#define PACKAGE_VERSION "6.66"
|
||||
#define PACKAGE_STRING "puzzles 6.66"
|
||||
#define PACKAGE_BUGREPORT "anakin@pobox.com"
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
configure: exit 2
|
||||
5739
apps/plugins/puzzles/src/configure
vendored
Executable file
5739
apps/plugins/puzzles/src/configure
vendored
Executable file
File diff suppressed because it is too large
Load diff
85
apps/plugins/puzzles/src/configure.ac
Normal file
85
apps/plugins/puzzles/src/configure.ac
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
dnl Configure script for the Unix GTK build of puzzles.
|
||||
|
||||
AC_INIT([puzzles], [6.66], [anakin@pobox.com])
|
||||
AC_CONFIG_SRCDIR([midend.c])
|
||||
AM_INIT_AUTOMAKE([foreign])
|
||||
AC_PROG_CC
|
||||
|
||||
AC_ARG_WITH([gtk],
|
||||
[AS_HELP_STRING([--with-gtk=VER],
|
||||
[specify GTK version to use (`2' or `3')])],
|
||||
[gtk_version_desired="$withval"],
|
||||
[gtk_version_desired="any"])
|
||||
|
||||
case "$gtk_version_desired" in
|
||||
2 | 3 | any) ;;
|
||||
yes) gtk_version_desired="any" ;;
|
||||
*) AC_ERROR([Invalid GTK version specified])
|
||||
esac
|
||||
|
||||
gtk=none
|
||||
|
||||
case "$gtk_version_desired:$gtk" in
|
||||
3:none | any:none)
|
||||
ifdef([AM_PATH_GTK_3_0],[
|
||||
AM_PATH_GTK_3_0([3.0.0], [gtk=3], [])
|
||||
],[AC_WARNING([generating configure script without GTK 3 autodetection])])
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$gtk_version_desired:$gtk" in
|
||||
2:none | any:none)
|
||||
ifdef([AM_PATH_GTK_2_0],[
|
||||
AM_PATH_GTK_2_0([2.0.0], [gtk=2], [])
|
||||
],[AC_WARNING([generating configure script without GTK 2 autodetection])])
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$gtk" = "none"; then
|
||||
AC_MSG_ERROR([cannot build without GTK 2 or GTK 3])
|
||||
fi
|
||||
|
||||
if test "x$GCC" = "xyes"; then
|
||||
AC_MSG_CHECKING([for usable gcc warning flags])
|
||||
gccwarningflags=
|
||||
for flag in -Wall -Werror -std=c89 -pedantic; do
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS$gccwarningflags $flag $GTK_CFLAGS"
|
||||
LIBS="$GTK_LIBS $LIBS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkkeysyms.h>
|
||||
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include <gdk/gdkx.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
],[
|
||||
return 0;
|
||||
])], [gccwarningflags="$gccwarningflags $flag"], [])
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
LIBS="$ac_save_LIBS"
|
||||
done
|
||||
AC_MSG_RESULT($gccwarningflags)
|
||||
CFLAGS="$CFLAGS$gccwarningflags"
|
||||
fi
|
||||
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AC_OUTPUT
|
||||
19
apps/plugins/puzzles/src/cube.R
Normal file
19
apps/plugins/puzzles/src/cube.R
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
cube : [X] GTK COMMON cube cube-icon|no-icon
|
||||
|
||||
cube : [G] WINDOWS COMMON cube cube.res|noicon.res
|
||||
|
||||
ALL += cube[COMBINED]
|
||||
|
||||
!begin am gtk
|
||||
GAMES += cube
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(cube) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
cube:cube.exe:Cube:Rolling cube puzzle:Pick up all the blue squares by rolling the cube over them.
|
||||
!end
|
||||
1773
apps/plugins/puzzles/src/cube.c
Normal file
1773
apps/plugins/puzzles/src/cube.c
Normal file
File diff suppressed because it is too large
Load diff
57
apps/plugins/puzzles/src/cube.html
Normal file
57
apps/plugins/puzzles/src/cube.html
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Cube</title>
|
||||
<link rel="previous" href="net.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="fifteen.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="net.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="fifteen.html">Next</a></p>
|
||||
<h1><a name="C4"></a>Chapter 4: <a name="i0"></a>Cube</h1>
|
||||
<p>
|
||||
This is another one I originally saw as a web game. This one was a Java game <a href="#p0">[2]</a>, by Paul Scott. You have a grid of 16 squares, six of which are blue; on one square rests a cube. Your move is to use the arrow keys to roll the cube through 90 degrees so that it moves to an adjacent square. If you roll the cube on to a blue square, the blue square is picked up on one face of the cube; if you roll a blue face of the cube on to a non-blue square, the blueness is put down again. (In general, whenever you roll the cube, the two faces that come into contact swap colours.) Your job is to get all six blue squares on to the six faces of the cube at the same time. Count your moves and try to do it in as few as possible.
|
||||
</p>
|
||||
<p>
|
||||
Unlike the original Java game, my version has an additional feature: once you've mastered the game with a cube rolling on a square grid, you can change to a triangular grid and roll any of a tetrahedron, an octahedron or an icosahedron.
|
||||
</p>
|
||||
<p><a name="p0"></a>
|
||||
[2] <a href="http://www3.sympatico.ca/paulscott/cube/cube.htm"><code>http://www3.sympatico.ca/paulscott/cube/cube.htm</code></a>
|
||||
</p>
|
||||
<h2><a name="S4.1"></a>4.1 <a name="i1"></a>Cube controls</h2>
|
||||
<p>
|
||||
This game can be played with either the keyboard or the mouse.
|
||||
</p>
|
||||
<p>
|
||||
Left-clicking anywhere on the window will move the cube (or other solid) towards the mouse pointer.
|
||||
</p>
|
||||
<p>
|
||||
The arrow keys can also used to roll the cube on its square grid in the four cardinal directions. On the triangular grids, the mapping of arrow keys to directions is more approximate. Vertical movement is disallowed where it doesn't make sense. The four keys surrounding the arrow keys on the numeric keypad (‘7’, ‘9’, ‘1’, ‘3’) can be used for diagonal movement.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S4.2"></a>4.2 <a name="i2"></a>Cube parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Type of solid</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Selects the solid to roll (and hence the shape of the grid): tetrahedron, cube, octahedron, or icosahedron.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Width / top</em>, <em>Height / bottom</em>
|
||||
</dt>
|
||||
<dd>
|
||||
On a square grid, horizontal and vertical dimensions. On a triangular grid, the number of triangles on the top and bottom rows respectively.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
791
apps/plugins/puzzles/src/depcomp
Executable file
791
apps/plugins/puzzles/src/depcomp
Executable file
|
|
@ -0,0 +1,791 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
52
apps/plugins/puzzles/src/desktop.pl
Executable file
52
apps/plugins/puzzles/src/desktop.pl
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Make .desktop files for the puzzles.
|
||||
#
|
||||
# At present, this script is intended for developer usage: if you're
|
||||
# working on the puzzles and want to play your bleeding-edge locally
|
||||
# modified and compiled versions, run this script and it will create a
|
||||
# collection of desktop files in ~/.local/share/applications where
|
||||
# XFCE can pick them up and add them to its main menu. (Be sure to run
|
||||
# 'xfdesktop --reload' after running this.)
|
||||
#
|
||||
# (If you don't use XFCE, patches to support other desktop
|
||||
# environments are welcome :-)
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Cwd 'abs_path';
|
||||
|
||||
die "usage: desktop.pl [<outdir> [<bindir> <icondir>]]\n"
|
||||
unless @ARGV == 0 or @ARGV == 1 or @ARGV == 3;
|
||||
|
||||
my ($outdir, $bindir, $icondir) = @ARGV;
|
||||
$outdir = $ENV{'HOME'}."/.local/share/applications" unless defined $outdir;
|
||||
$bindir = "." unless defined $bindir;
|
||||
$icondir = "./icons" unless defined $icondir;
|
||||
$bindir = abs_path($bindir);
|
||||
$icondir = abs_path($icondir);
|
||||
|
||||
open my $desc, "<", "gamedesc.txt"
|
||||
or die "gamedesc.txt: open: $!\n";
|
||||
|
||||
while (<$desc>) {
|
||||
chomp;
|
||||
my ($id, $win, $displayname, $description, $summary) = split /:/, $_;
|
||||
|
||||
open my $desktop, ">", "$outdir/$id.desktop"
|
||||
or die "$outdir/$id.desktop: open: $!\n";
|
||||
|
||||
print $desktop "[Desktop Entry]\n";
|
||||
print $desktop "Version=1.0\n";
|
||||
print $desktop "Type=Application\n";
|
||||
print $desktop "Name=$displayname\n";
|
||||
print $desktop "Comment=$description\n";
|
||||
print $desktop "Exec=$bindir/$id\n";
|
||||
print $desktop "Icon=$icondir/$id-48d24.png\n";
|
||||
print $desktop "StartupNotify=false\n";
|
||||
print $desktop "Categories=Game;\n";
|
||||
print $desktop "Terminal=false\n";
|
||||
|
||||
close $desktop
|
||||
or die "$outdir/$id.desktop: close: $!\n";
|
||||
}
|
||||
4895
apps/plugins/puzzles/src/devel.but
Normal file
4895
apps/plugins/puzzles/src/devel.but
Normal file
File diff suppressed because it is too large
Load diff
781
apps/plugins/puzzles/src/divvy.c
Normal file
781
apps/plugins/puzzles/src/divvy.c
Normal file
|
|
@ -0,0 +1,781 @@
|
|||
/*
|
||||
* Library code to divide up a rectangle into a number of equally
|
||||
* sized ominoes, in a random fashion.
|
||||
*
|
||||
* Could use this for generating solved grids of
|
||||
* http://www.nikoli.co.jp/ja/puzzles/block_puzzle/
|
||||
* or for generating the playfield for Jigsaw Sudoku.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This code is restricted to simply connected solutions: that is,
|
||||
* no single polyomino may completely surround another (not even
|
||||
* with a corner visible to the outside world, in the sense that a
|
||||
* 7-omino can `surround' a single square).
|
||||
*
|
||||
* It's tempting to think that this is a natural consequence of
|
||||
* all the ominoes being the same size - after all, a division of
|
||||
* anything into 7-ominoes must necessarily have all of them
|
||||
* simply connected, because if one was not then the 1-square
|
||||
* space in the middle could not be part of any 7-omino - but in
|
||||
* fact, for sufficiently large k, it is perfectly possible for a
|
||||
* k-omino to completely surround another k-omino. A simple
|
||||
* example is this one with two 25-ominoes:
|
||||
*
|
||||
* +--+--+--+--+--+--+--+
|
||||
* | |
|
||||
* + +--+--+--+--+--+ +
|
||||
* | | | |
|
||||
* + + + +
|
||||
* | | | |
|
||||
* + + + +--+
|
||||
* | | | |
|
||||
* + + + +--+
|
||||
* | | | |
|
||||
* + + + +
|
||||
* | | | |
|
||||
* + +--+--+--+--+--+ +
|
||||
* | |
|
||||
* +--+--+--+--+--+--+--+
|
||||
*
|
||||
* I claim the smallest k which can manage this is 23. More
|
||||
* formally:
|
||||
*
|
||||
* If a k-omino P is completely surrounded by another k-omino Q,
|
||||
* such that every edge of P borders on Q, then k >= 23.
|
||||
*
|
||||
* Proof:
|
||||
*
|
||||
* It's relatively simple to find the largest _rectangle_ a
|
||||
* k-omino can enclose. So I'll construct my proof in two parts:
|
||||
* firstly, show that no 22-omino or smaller can enclose a
|
||||
* rectangle as large as itself, and secondly, show that no
|
||||
* polyomino can enclose a larger non-rectangle than a rectangle.
|
||||
*
|
||||
* The first of those claims:
|
||||
*
|
||||
* To surround an m x n rectangle, a polyomino must have 2m
|
||||
* squares along the two m-sides of the rectangle, 2n squares
|
||||
* along the two n-sides, and must fill in at least three of the
|
||||
* corners in order to be connected. Thus, 2(m+n)+3 <= k. We wish
|
||||
* to find the largest value of mn subject to that constraint, and
|
||||
* it's clear that this is achieved when m and n are as close to
|
||||
* equal as possible. (If they aren't, WLOG suppose m < n; then
|
||||
* (m+1)(n-1) = mn + n - m - 1 >= mn, with equality only when
|
||||
* m=n-1.)
|
||||
*
|
||||
* So the area of the largest rectangle which can be enclosed by a
|
||||
* k-omino is given by floor(k'/2) * ceil(k'/2), where k' =
|
||||
* (k-3)/2. This is a monotonic function in k, so there will be a
|
||||
* unique point at which it goes from being smaller than k to
|
||||
* being larger than k. That point is between 22 (maximum area 20)
|
||||
* and 23 (maximum area 25).
|
||||
*
|
||||
* The second claim:
|
||||
*
|
||||
* Suppose we have an inner polyomino P surrounded by an outer
|
||||
* polyomino Q. I seek to show that if P is non-rectangular, then
|
||||
* P is also non-maximal, in the sense that we can transform P and
|
||||
* Q into a new pair of polyominoes in which P is larger and Q is
|
||||
* at most the same size.
|
||||
*
|
||||
* Consider walking along the boundary of P in a clockwise
|
||||
* direction. (We may assume, of course, that there is only _one_
|
||||
* boundary of P, i.e. P has no hole in the middle. If it does
|
||||
* have a hole in the middle, it's _trivially_ non-maximal because
|
||||
* we can just fill the hole in!) Our walk will take us along many
|
||||
* edges between squares; sometimes we might turn left, and
|
||||
* certainly sometimes we will turn right. Always there will be a
|
||||
* square of P on our right, and a square of Q on our left.
|
||||
*
|
||||
* The net angle through which we turn during the entire walk must
|
||||
* add up to 360 degrees rightwards. So if there are no left
|
||||
* turns, then we must turn right exactly four times, meaning we
|
||||
* have described a rectangle. Hence, if P is _not_ rectangular,
|
||||
* then there must have been a left turn at some point. A left
|
||||
* turn must mean we walk along two edges of the same square of Q.
|
||||
*
|
||||
* Thus, there is some square X in Q which is adjacent to two
|
||||
* diagonally separated squares in P. Let us call those two
|
||||
* squares N and E; let us refer to the other two neighbours of X
|
||||
* as S and W; let us refer to the other mutual neighbour of S and
|
||||
* W as D; and let us refer to the other mutual neighbour of S and
|
||||
* E as Y. In other words, we have named seven squares, arranged
|
||||
* thus:
|
||||
*
|
||||
* N
|
||||
* W X E
|
||||
* D S Y
|
||||
*
|
||||
* where N and E are in P, and X is in Q.
|
||||
*
|
||||
* Clearly at least one of W and S must be in Q (because otherwise
|
||||
* X would not be connected to any other square in Q, and would
|
||||
* hence have to be the whole of Q; and evidently if Q were a
|
||||
* 1-omino it could not enclose _anything_). So we divide into
|
||||
* cases:
|
||||
*
|
||||
* If both W and S are in Q, then we take X out of Q and put it in
|
||||
* P, which does not expose any edge of P. If this disconnects Q,
|
||||
* then we can reconnect it by adding D to Q.
|
||||
*
|
||||
* If only one of W and S is in Q, then wlog let it be W. If S is
|
||||
* in _P_, then we have a particularly easy case: we can simply
|
||||
* take X out of Q and add it to P, and this cannot disconnect X
|
||||
* since X was a leaf square of Q.
|
||||
*
|
||||
* Our remaining case is that W is in Q and S is in neither P nor
|
||||
* Q. Again we take X out of Q and put it in P; we also add S to
|
||||
* Q. This ensures we do not expose an edge of P, but we must now
|
||||
* prove that S is adjacent to some other existing square of Q so
|
||||
* that we haven't disconnected Q by adding it.
|
||||
*
|
||||
* To do this, we recall that we walked along the edge XE, and
|
||||
* then turned left to walk along XN. So just before doing all
|
||||
* that, we must have reached the corner XSE, and we must have
|
||||
* done it by walking along one of the three edges meeting at that
|
||||
* corner which are _not_ XE. It can't have been SY, since S would
|
||||
* then have been on our left and it isn't in Q; and it can't have
|
||||
* been XS, since S would then have been on our right and it isn't
|
||||
* in P. So it must have been YE, in which case Y was on our left,
|
||||
* and hence is in Q.
|
||||
*
|
||||
* So in all cases we have shown that we can take X out of Q and
|
||||
* add it to P, and add at most one square to Q to restore the
|
||||
* containment and connectedness properties. Hence, we can keep
|
||||
* doing this until we run out of left turns and P becomes
|
||||
* rectangular. []
|
||||
*
|
||||
* ------------
|
||||
*
|
||||
* Anyway, that entire proof was a bit of a sidetrack. The point
|
||||
* is, although constructions of this type are possible for
|
||||
* sufficiently large k, divvy_rectangle() will never generate
|
||||
* them. This could be considered a weakness for some purposes, in
|
||||
* the sense that we can't generate all possible divisions.
|
||||
* However, there are many divisions which we are highly unlikely
|
||||
* to generate anyway, so in practice it probably isn't _too_ bad.
|
||||
*
|
||||
* If I wanted to fix this issue, I would have to make the rules
|
||||
* more complicated for determining when a square can safely be
|
||||
* _removed_ from a polyomino. Adding one becomes easier (a square
|
||||
* may be added to a polyomino iff it is 4-adjacent to any square
|
||||
* currently part of the polyomino, and the current test for loop
|
||||
* formation may be dispensed with), but to determine which
|
||||
* squares may be removed we must now resort to analysis of the
|
||||
* overall structure of the polyomino rather than the simple local
|
||||
* properties we can currently get away with measuring.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Possible improvements which might cut the fail rate:
|
||||
*
|
||||
* - instead of picking one omino to extend in an iteration, try
|
||||
* them all in succession (in a randomised order)
|
||||
*
|
||||
* - (for real rigour) instead of bfsing over ominoes, bfs over
|
||||
* the space of possible _removed squares_. That way we aren't
|
||||
* limited to randomly choosing a single square to remove from
|
||||
* an omino and failing if that particular square doesn't
|
||||
* happen to work.
|
||||
*
|
||||
* However, I don't currently think it's necessary to do either of
|
||||
* these, because the failure rate is already low enough to be
|
||||
* easily tolerable, under all circumstances I've been able to
|
||||
* think of.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "puzzles.h"
|
||||
|
||||
/*
|
||||
* Subroutine which implements a function used in computing both
|
||||
* whether a square can safely be added to an omino, and whether
|
||||
* it can safely be removed.
|
||||
*
|
||||
* We enumerate the eight squares 8-adjacent to this one, in
|
||||
* cyclic order. We go round that loop and count the number of
|
||||
* times we find a square owned by the target omino next to one
|
||||
* not owned by it. We then return success iff that count is 2.
|
||||
*
|
||||
* When adding a square to an omino, this is precisely the
|
||||
* criterion which tells us that adding the square won't leave a
|
||||
* hole in the middle of the omino. (If it did, then things get
|
||||
* more complicated; see above.)
|
||||
*
|
||||
* When removing a square from an omino, the _same_ criterion
|
||||
* tells us that removing the square won't disconnect the omino.
|
||||
* (This only works _because_ we've ensured the omino is simply
|
||||
* connected.)
|
||||
*/
|
||||
static int addremcommon(int w, int h, int x, int y, int *own, int val)
|
||||
{
|
||||
int neighbours[8];
|
||||
int dir, count;
|
||||
|
||||
for (dir = 0; dir < 8; dir++) {
|
||||
int dx = ((dir & 3) == 2 ? 0 : dir > 2 && dir < 6 ? +1 : -1);
|
||||
int dy = ((dir & 3) == 0 ? 0 : dir < 4 ? -1 : +1);
|
||||
int sx = x+dx, sy = y+dy;
|
||||
|
||||
if (sx < 0 || sx >= w || sy < 0 || sy >= h)
|
||||
neighbours[dir] = -1; /* outside the grid */
|
||||
else
|
||||
neighbours[dir] = own[sy*w+sx];
|
||||
}
|
||||
|
||||
/*
|
||||
* To begin with, check 4-adjacency.
|
||||
*/
|
||||
if (neighbours[0] != val && neighbours[2] != val &&
|
||||
neighbours[4] != val && neighbours[6] != val)
|
||||
return FALSE;
|
||||
|
||||
count = 0;
|
||||
|
||||
for (dir = 0; dir < 8; dir++) {
|
||||
int next = (dir + 1) & 7;
|
||||
int gotthis = (neighbours[dir] == val);
|
||||
int gotnext = (neighbours[next] == val);
|
||||
|
||||
if (gotthis != gotnext)
|
||||
count++;
|
||||
}
|
||||
|
||||
return (count == 2);
|
||||
}
|
||||
|
||||
/*
|
||||
* w and h are the dimensions of the rectangle.
|
||||
*
|
||||
* k is the size of the required ominoes. (So k must divide w*h,
|
||||
* of course.)
|
||||
*
|
||||
* The returned result is a w*h-sized dsf.
|
||||
*
|
||||
* In both of the above suggested use cases, the user would
|
||||
* probably want w==h==k, but that isn't a requirement.
|
||||
*/
|
||||
static int *divvy_internal(int w, int h, int k, random_state *rs)
|
||||
{
|
||||
int *order, *queue, *tmp, *own, *sizes, *addable, *removable, *retdsf;
|
||||
int wh = w*h;
|
||||
int i, j, n, x, y, qhead, qtail;
|
||||
|
||||
n = wh / k;
|
||||
assert(wh == k*n);
|
||||
|
||||
order = snewn(wh, int);
|
||||
tmp = snewn(wh, int);
|
||||
own = snewn(wh, int);
|
||||
sizes = snewn(n, int);
|
||||
queue = snewn(n, int);
|
||||
addable = snewn(wh*4, int);
|
||||
removable = snewn(wh, int);
|
||||
|
||||
/*
|
||||
* Permute the grid squares into a random order, which will be
|
||||
* used for iterating over the grid whenever we need to search
|
||||
* for something. This prevents directional bias and arranges
|
||||
* for the answer to be non-deterministic.
|
||||
*/
|
||||
for (i = 0; i < wh; i++)
|
||||
order[i] = i;
|
||||
shuffle(order, wh, sizeof(*order), rs);
|
||||
|
||||
/*
|
||||
* Begin by choosing a starting square at random for each
|
||||
* omino.
|
||||
*/
|
||||
for (i = 0; i < wh; i++) {
|
||||
own[i] = -1;
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
own[order[i]] = i;
|
||||
sizes[i] = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now repeatedly pick a random omino which isn't already at
|
||||
* the target size, and find a way to expand it by one. This
|
||||
* may involve stealing a square from another omino, in which
|
||||
* case we then re-expand that omino, forming a chain of
|
||||
* square-stealing which terminates in an as yet unclaimed
|
||||
* square. Hence every successful iteration around this loop
|
||||
* causes the number of unclaimed squares to drop by one, and
|
||||
* so the process is bounded in duration.
|
||||
*/
|
||||
while (1) {
|
||||
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
{
|
||||
int x, y;
|
||||
printf("Top of loop. Current grid:\n");
|
||||
for (y = 0; y < h; y++) {
|
||||
for (x = 0; x < w; x++)
|
||||
printf("%3d", own[y*w+x]);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Go over the grid and figure out which squares can
|
||||
* safely be added to, or removed from, each omino. We
|
||||
* don't take account of other ominoes in this process, so
|
||||
* we will often end up knowing that a square can be
|
||||
* poached from one omino by another.
|
||||
*
|
||||
* For each square, there may be up to four ominoes to
|
||||
* which it can be added (those to which it is
|
||||
* 4-adjacent).
|
||||
*/
|
||||
for (y = 0; y < h; y++) {
|
||||
for (x = 0; x < w; x++) {
|
||||
int yx = y*w+x;
|
||||
int curr = own[yx];
|
||||
int dir;
|
||||
|
||||
if (curr < 0) {
|
||||
removable[yx] = FALSE; /* can't remove if not owned! */
|
||||
} else if (sizes[curr] == 1) {
|
||||
removable[yx] = TRUE; /* can always remove a singleton */
|
||||
} else {
|
||||
/*
|
||||
* See if this square can be removed from its
|
||||
* omino without disconnecting it.
|
||||
*/
|
||||
removable[yx] = addremcommon(w, h, x, y, own, curr);
|
||||
}
|
||||
|
||||
for (dir = 0; dir < 4; dir++) {
|
||||
int dx = (dir == 0 ? -1 : dir == 1 ? +1 : 0);
|
||||
int dy = (dir == 2 ? -1 : dir == 3 ? +1 : 0);
|
||||
int sx = x + dx, sy = y + dy;
|
||||
int syx = sy*w+sx;
|
||||
|
||||
addable[yx*4+dir] = -1;
|
||||
|
||||
if (sx < 0 || sx >= w || sy < 0 || sy >= h)
|
||||
continue; /* no omino here! */
|
||||
if (own[syx] < 0)
|
||||
continue; /* also no omino here */
|
||||
if (own[syx] == own[yx])
|
||||
continue; /* we already got one */
|
||||
if (!addremcommon(w, h, x, y, own, own[syx]))
|
||||
continue; /* would non-simply connect the omino */
|
||||
|
||||
addable[yx*4+dir] = own[syx];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = j = 0; i < n; i++)
|
||||
if (sizes[i] < k)
|
||||
tmp[j++] = i;
|
||||
if (j == 0)
|
||||
break; /* all ominoes are complete! */
|
||||
j = tmp[random_upto(rs, j)];
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
printf("Trying to extend %d\n", j);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* So we're trying to expand omino j. We breadth-first
|
||||
* search out from j across the space of ominoes.
|
||||
*
|
||||
* For bfs purposes, we use two elements of tmp per omino:
|
||||
* tmp[2*i+0] tells us which omino we got to i from, and
|
||||
* tmp[2*i+1] numbers the grid square that omino stole
|
||||
* from us.
|
||||
*
|
||||
* This requires that wh (the size of tmp) is at least 2n,
|
||||
* i.e. k is at least 2. There would have been nothing to
|
||||
* stop a user calling this function with k=1, but if they
|
||||
* did then we wouldn't have got to _here_ in the code -
|
||||
* we would have noticed above that all ominoes were
|
||||
* already at their target sizes, and terminated :-)
|
||||
*/
|
||||
assert(wh >= 2*n);
|
||||
for (i = 0; i < n; i++)
|
||||
tmp[2*i] = tmp[2*i+1] = -1;
|
||||
qhead = qtail = 0;
|
||||
queue[qtail++] = j;
|
||||
tmp[2*j] = tmp[2*j+1] = -2; /* special value: `starting point' */
|
||||
|
||||
while (qhead < qtail) {
|
||||
int tmpsq;
|
||||
|
||||
j = queue[qhead];
|
||||
|
||||
/*
|
||||
* We wish to expand omino j. However, we might have
|
||||
* got here by omino j having a square stolen from it,
|
||||
* so first of all we must temporarily mark that
|
||||
* square as not belonging to j, so that our adjacency
|
||||
* calculations don't assume j _does_ belong to us.
|
||||
*/
|
||||
tmpsq = tmp[2*j+1];
|
||||
if (tmpsq >= 0) {
|
||||
assert(own[tmpsq] == j);
|
||||
own[tmpsq] = -3;
|
||||
}
|
||||
|
||||
/*
|
||||
* OK. Now begin by seeing if we can find any
|
||||
* unclaimed square into which we can expand omino j.
|
||||
* If we find one, the entire bfs terminates.
|
||||
*/
|
||||
for (i = 0; i < wh; i++) {
|
||||
int dir;
|
||||
|
||||
if (own[order[i]] != -1)
|
||||
continue; /* this square is claimed */
|
||||
|
||||
/*
|
||||
* Special case: if our current omino was size 1
|
||||
* and then had a square stolen from it, it's now
|
||||
* size zero, which means it's valid to `expand'
|
||||
* it into _any_ unclaimed square.
|
||||
*/
|
||||
if (sizes[j] == 1 && tmpsq >= 0)
|
||||
break; /* got one */
|
||||
|
||||
/*
|
||||
* Failing that, we must do the full test for
|
||||
* addability.
|
||||
*/
|
||||
for (dir = 0; dir < 4; dir++)
|
||||
if (addable[order[i]*4+dir] == j) {
|
||||
/*
|
||||
* We know this square is addable to this
|
||||
* omino with the grid in the state it had
|
||||
* at the top of the loop. However, we
|
||||
* must now check that it's _still_
|
||||
* addable to this omino when the omino is
|
||||
* missing a square. To do this it's only
|
||||
* necessary to re-check addremcommon.
|
||||
*/
|
||||
if (!addremcommon(w, h, order[i]%w, order[i]/w,
|
||||
own, j))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (dir == 4)
|
||||
continue; /* we can't add this square to j */
|
||||
|
||||
break; /* got one! */
|
||||
}
|
||||
if (i < wh) {
|
||||
i = order[i];
|
||||
|
||||
/*
|
||||
* Restore the temporarily removed square _before_
|
||||
* we start shifting ownerships about.
|
||||
*/
|
||||
if (tmpsq >= 0)
|
||||
own[tmpsq] = j;
|
||||
|
||||
/*
|
||||
* We are done. We can add square i to omino j,
|
||||
* and then backtrack along the trail in tmp
|
||||
* moving squares between ominoes, ending up
|
||||
* expanding our starting omino by one.
|
||||
*/
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
printf("(%d,%d)", i%w, i/w);
|
||||
#endif
|
||||
while (1) {
|
||||
own[i] = j;
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
printf(" -> %d", j);
|
||||
#endif
|
||||
if (tmp[2*j] == -2)
|
||||
break;
|
||||
i = tmp[2*j+1];
|
||||
j = tmp[2*j];
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
printf("; (%d,%d)", i%w, i/w);
|
||||
#endif
|
||||
}
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
printf("\n");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Increment the size of the starting omino.
|
||||
*/
|
||||
sizes[j]++;
|
||||
|
||||
/*
|
||||
* Terminate the bfs loop.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we get here, we haven't been able to expand
|
||||
* omino j into an unclaimed square. So now we begin
|
||||
* to investigate expanding it into squares which are
|
||||
* claimed by ominoes the bfs has not yet visited.
|
||||
*/
|
||||
for (i = 0; i < wh; i++) {
|
||||
int dir, nj;
|
||||
|
||||
nj = own[order[i]];
|
||||
if (nj < 0 || tmp[2*nj] != -1)
|
||||
continue; /* unclaimed, or owned by wrong omino */
|
||||
if (!removable[order[i]])
|
||||
continue; /* its omino won't let it go */
|
||||
|
||||
for (dir = 0; dir < 4; dir++)
|
||||
if (addable[order[i]*4+dir] == j) {
|
||||
/*
|
||||
* As above, re-check addremcommon.
|
||||
*/
|
||||
if (!addremcommon(w, h, order[i]%w, order[i]/w,
|
||||
own, j))
|
||||
continue;
|
||||
|
||||
/*
|
||||
* We have found a square we can use to
|
||||
* expand omino j, at the expense of the
|
||||
* as-yet unvisited omino nj. So add this
|
||||
* to the bfs queue.
|
||||
*/
|
||||
assert(qtail < n);
|
||||
queue[qtail++] = nj;
|
||||
tmp[2*nj] = j;
|
||||
tmp[2*nj+1] = order[i];
|
||||
|
||||
/*
|
||||
* Now terminate the loop over dir, to
|
||||
* ensure we don't accidentally add the
|
||||
* same omino twice to the queue.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore the temporarily removed square.
|
||||
*/
|
||||
if (tmpsq >= 0)
|
||||
own[tmpsq] = j;
|
||||
|
||||
/*
|
||||
* Advance the queue head.
|
||||
*/
|
||||
qhead++;
|
||||
}
|
||||
|
||||
if (qhead == qtail) {
|
||||
/*
|
||||
* We have finished the bfs and not found any way to
|
||||
* expand omino j. Panic, and return failure.
|
||||
*
|
||||
* FIXME: or should we loop over all ominoes before we
|
||||
* give up?
|
||||
*/
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
printf("FAIL!\n");
|
||||
#endif
|
||||
retdsf = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DIVVY_DIAGNOSTICS
|
||||
{
|
||||
int x, y;
|
||||
printf("SUCCESS! Final grid:\n");
|
||||
for (y = 0; y < h; y++) {
|
||||
for (x = 0; x < w; x++)
|
||||
printf("%3d", own[y*w+x]);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Construct the output dsf.
|
||||
*/
|
||||
for (i = 0; i < wh; i++) {
|
||||
assert(own[i] >= 0 && own[i] < n);
|
||||
tmp[own[i]] = i;
|
||||
}
|
||||
retdsf = snew_dsf(wh);
|
||||
for (i = 0; i < wh; i++) {
|
||||
dsf_merge(retdsf, i, tmp[own[i]]);
|
||||
}
|
||||
|
||||
/*
|
||||
* Construct the output dsf a different way, to verify that
|
||||
* the ominoes really are k-ominoes and we haven't
|
||||
* accidentally split one into two disconnected pieces.
|
||||
*/
|
||||
dsf_init(tmp, wh);
|
||||
for (y = 0; y < h; y++)
|
||||
for (x = 0; x+1 < w; x++)
|
||||
if (own[y*w+x] == own[y*w+(x+1)])
|
||||
dsf_merge(tmp, y*w+x, y*w+(x+1));
|
||||
for (x = 0; x < w; x++)
|
||||
for (y = 0; y+1 < h; y++)
|
||||
if (own[y*w+x] == own[(y+1)*w+x])
|
||||
dsf_merge(tmp, y*w+x, (y+1)*w+x);
|
||||
for (i = 0; i < wh; i++) {
|
||||
j = dsf_canonify(retdsf, i);
|
||||
assert(dsf_canonify(tmp, j) == dsf_canonify(tmp, i));
|
||||
}
|
||||
|
||||
cleanup:
|
||||
|
||||
/*
|
||||
* Free our temporary working space.
|
||||
*/
|
||||
sfree(order);
|
||||
sfree(tmp);
|
||||
sfree(own);
|
||||
sfree(sizes);
|
||||
sfree(queue);
|
||||
sfree(addable);
|
||||
sfree(removable);
|
||||
|
||||
/*
|
||||
* And we're done.
|
||||
*/
|
||||
return retdsf;
|
||||
}
|
||||
|
||||
#ifdef TESTMODE
|
||||
static int fail_counter = 0;
|
||||
#endif
|
||||
|
||||
int *divvy_rectangle(int w, int h, int k, random_state *rs)
|
||||
{
|
||||
int *ret;
|
||||
|
||||
do {
|
||||
ret = divvy_internal(w, h, k, rs);
|
||||
|
||||
#ifdef TESTMODE
|
||||
if (!ret)
|
||||
fail_counter++;
|
||||
#endif
|
||||
|
||||
} while (!ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef TESTMODE
|
||||
|
||||
/*
|
||||
* gcc -g -O0 -DTESTMODE -I.. -o divvy divvy.c ../random.c ../malloc.c ../dsf.c ../misc.c ../nullfe.c
|
||||
*
|
||||
* or to debug
|
||||
*
|
||||
* gcc -g -O0 -DDIVVY_DIAGNOSTICS -DTESTMODE -I.. -o divvy divvy.c ../random.c ../malloc.c ../dsf.c ../misc.c ../nullfe.c
|
||||
*/
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int *dsf;
|
||||
int i;
|
||||
int w = 9, h = 4, k = 6, tries = 100;
|
||||
random_state *rs;
|
||||
|
||||
rs = random_new("123456", 6);
|
||||
|
||||
if (argc > 1)
|
||||
w = atoi(argv[1]);
|
||||
if (argc > 2)
|
||||
h = atoi(argv[2]);
|
||||
if (argc > 3)
|
||||
k = atoi(argv[3]);
|
||||
if (argc > 4)
|
||||
tries = atoi(argv[4]);
|
||||
|
||||
for (i = 0; i < tries; i++) {
|
||||
int x, y;
|
||||
|
||||
dsf = divvy_rectangle(w, h, k, rs);
|
||||
assert(dsf);
|
||||
|
||||
for (y = 0; y <= 2*h; y++) {
|
||||
for (x = 0; x <= 2*w; x++) {
|
||||
int miny = y/2 - 1, maxy = y/2;
|
||||
int minx = x/2 - 1, maxx = x/2;
|
||||
int classes[4], tx, ty;
|
||||
for (ty = 0; ty < 2; ty++)
|
||||
for (tx = 0; tx < 2; tx++) {
|
||||
int cx = minx+tx, cy = miny+ty;
|
||||
if (cx < 0 || cx >= w || cy < 0 || cy >= h)
|
||||
classes[ty*2+tx] = -1;
|
||||
else
|
||||
classes[ty*2+tx] = dsf_canonify(dsf, cy*w+cx);
|
||||
}
|
||||
switch (y%2 * 2 + x%2) {
|
||||
case 0: /* corner */
|
||||
/*
|
||||
* Cases for the corner:
|
||||
*
|
||||
* - if all four surrounding squares belong
|
||||
* to the same omino, we print a space.
|
||||
*
|
||||
* - if the top two are the same and the
|
||||
* bottom two are the same, we print a
|
||||
* horizontal line.
|
||||
*
|
||||
* - if the left two are the same and the
|
||||
* right two are the same, we print a
|
||||
* vertical line.
|
||||
*
|
||||
* - otherwise, we print a cross.
|
||||
*/
|
||||
if (classes[0] == classes[1] &&
|
||||
classes[1] == classes[2] &&
|
||||
classes[2] == classes[3])
|
||||
printf(" ");
|
||||
else if (classes[0] == classes[1] &&
|
||||
classes[2] == classes[3])
|
||||
printf("-");
|
||||
else if (classes[0] == classes[2] &&
|
||||
classes[1] == classes[3])
|
||||
printf("|");
|
||||
else
|
||||
printf("+");
|
||||
break;
|
||||
case 1: /* horiz edge */
|
||||
if (classes[1] == classes[3])
|
||||
printf(" ");
|
||||
else
|
||||
printf("--");
|
||||
break;
|
||||
case 2: /* vert edge */
|
||||
if (classes[2] == classes[3])
|
||||
printf(" ");
|
||||
else
|
||||
printf("|");
|
||||
break;
|
||||
case 3: /* square centre */
|
||||
printf(" ");
|
||||
break;
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n");
|
||||
sfree(dsf);
|
||||
}
|
||||
|
||||
printf("%d retries needed for %d successes\n", fail_counter, tries);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
217
apps/plugins/puzzles/src/docindex.html
Normal file
217
apps/plugins/puzzles/src/docindex.html
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title></title>
|
||||
<link rel="previous" href="licence.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="licence.html">Previous</a> | <a href="index.html">Contents</a> | Index | Next</p>
|
||||
<h1><a name="Index"></a>Index</h1><p>
|
||||
Black Box: <a href="blackbox.html#i0">Chapter 19</a><br>
|
||||
Bridges: <a href="bridges.html#i0">Chapter 26</a><br>
|
||||
bugs: <a href="intro.html#i7">Chapter 1</a><br>
|
||||
command line: <a href="common.html#i23">Section 2.2</a>, <a href="common.html#i32">Section 2.4</a>, <a href="common.html#i36">Section 2.5</a><br>
|
||||
common features: <a href="common.html#i0">Chapter 2</a><br>
|
||||
controls: <a href="common.html#i1">Section 2.1</a><br>
|
||||
controls, for Black Box: <a href="blackbox.html#i1">Section 19.1</a><br>
|
||||
controls, for Bridges: <a href="bridges.html#i2">Section 26.1</a><br>
|
||||
controls, for Cube: <a href="cube.html#i1">Section 4.1</a><br>
|
||||
controls, for Dominosa: <a href="dominosa.html#i1">Section 17.1</a><br>
|
||||
controls, for Fifteen: <a href="fifteen.html#i2">Section 5.1</a><br>
|
||||
controls, for Filling: <a href="filling.html#i2">Section 29.1</a><br>
|
||||
controls, for Flip: <a href="flip.html#i1">Section 14.1</a><br>
|
||||
controls, for Flood: <a href="flood.html#i1">Section 39.1</a><br>
|
||||
controls, for Galaxies: <a href="galaxies.html#i2">Section 28.1</a><br>
|
||||
controls, for Guess: <a href="guess.html#i2">Section 15.1</a><br>
|
||||
controls, for Inertia: <a href="inertia.html#i1">Section 24.1</a><br>
|
||||
controls, for Keen: <a href="keen.html#i2">Section 30.1</a><br>
|
||||
controls, for Light Up: <a href="lightup.html#i2">Section 21.1</a><br>
|
||||
controls, for Loopy: <a href="loopy.html#i2">Section 23.1</a><br>
|
||||
controls, for Magnets: <a href="magnets.html#i2">Section 33.1</a><br>
|
||||
controls, for Map: <a href="map.html#i2">Section 22.1</a><br>
|
||||
controls, for Mines: <a href="mines.html#i1">Section 12.1</a><br>
|
||||
controls, for Net: <a href="net.html#i5">Section 3.1</a><br>
|
||||
controls, for Netslide: <a href="netslide.html#i1">Chapter 9</a><br>
|
||||
controls, for Palisade: <a href="palisade.html#i2">Section 41.1</a><br>
|
||||
controls, for Pattern: <a href="pattern.html#i2">Section 10.1</a><br>
|
||||
controls, for Pearl: <a href="pearl.html#i2">Section 36.1</a><br>
|
||||
controls, for Pegs: <a href="pegs.html#i2">Section 16.1</a><br>
|
||||
controls, for Range: <a href="range.html#i2">Section 35.1</a><br>
|
||||
controls, for Rectangles: <a href="rect.html#i3">Section 8.1</a><br>
|
||||
controls, for Same Game: <a href="samegame.html#i1">Section 13.1</a><br>
|
||||
controls, for Signpost: <a href="signpost.html#i2">Section 34.1</a><br>
|
||||
controls, for Singles: <a href="singles.html#i3">Section 32.1</a><br>
|
||||
controls, for Sixteen: <a href="sixteen.html#i1">Section 6.1</a><br>
|
||||
controls, for Slant: <a href="slant.html#i2">Section 20.1</a><br>
|
||||
controls, for Solo: <a href="solo.html#i2">Section 11.1</a><br>
|
||||
controls, for Tents: <a href="tents.html#i1">Section 25.1</a><br>
|
||||
controls, for Towers: <a href="towers.html#i2">Section 31.1</a><br>
|
||||
controls, for Tracks: <a href="tracks.html#i1">Section 40.1</a><br>
|
||||
controls, for Twiddle: <a href="twiddle.html#i1">Section 7.1</a><br>
|
||||
controls, for Undead: <a href="undead.html#i1">Section 37.1</a><br>
|
||||
controls, for Unequal: <a href="unequal.html#i3">Section 27.1</a><br>
|
||||
controls, for Unruly: <a href="unruly.html#i1">Section 38.1</a><br>
|
||||
controls, for Untangle: <a href="untangle.html#i2">Section 18.1</a><br>
|
||||
copy: <a href="common.html#i14">Section 2.1</a><br>
|
||||
copyright: <a href="licence.html#i2">Appendix A</a><br>
|
||||
Cube: <a href="cube.html#i0">Chapter 4</a><br>
|
||||
‘Custom’, menu option: <a href="common.html#i30">Section 2.3</a><br>
|
||||
default parameters, specifying: <a href="common.html#i34">Section 2.4</a><br>
|
||||
Dominosa: <a href="dominosa.html#i0">Chapter 17</a><br>
|
||||
Edit menu: <a href="common.html#i6">Section 2.1</a><br>
|
||||
exit: <a href="common.html#i16">Section 2.1</a><br>
|
||||
feedback: <a href="intro.html#i6">Chapter 1</a><br>
|
||||
Fifteen: <a href="fifteen.html#i0">Chapter 5</a><br>
|
||||
File menu: <a href="common.html#i5">Section 2.1</a><br>
|
||||
Filling: <a href="filling.html#i0">Chapter 29</a><br>
|
||||
Flip: <a href="flip.html#i0">Chapter 14</a><br>
|
||||
Flood: <a href="flood.html#i0">Chapter 39</a><br>
|
||||
format, ID: <a href="common.html#i26">Section 2.2</a><br>
|
||||
four-colouring: <a href="map.html#i1">Chapter 22</a><br>
|
||||
FreeNet: <a href="net.html#i3">Chapter 3</a><br>
|
||||
Futoshiki: <a href="unequal.html#i2">Chapter 27</a><br>
|
||||
Galaxies: <a href="galaxies.html#i0">Chapter 28</a><br>
|
||||
game ID: <a href="common.html#i18">Section 2.2</a><br>
|
||||
game ID, format: <a href="common.html#i26">Section 2.2</a><br>
|
||||
game ID, generating: <a href="common.html#i39">Section 2.5</a><br>
|
||||
Game menu: <a href="common.html#i2">Section 2.1</a>, <a href="common.html#i21">Section 2.2</a><br>
|
||||
generating game IDs: <a href="common.html#i39">Section 2.5</a><br>
|
||||
Guess: <a href="guess.html#i0">Chapter 15</a><br>
|
||||
Hitori: <a href="singles.html#i2">Chapter 32</a><br>
|
||||
ID format: <a href="common.html#i26">Section 2.2</a><br>
|
||||
ID, game: <a href="common.html#i18">Section 2.2</a><br>
|
||||
Inertia: <a href="inertia.html#i0">Chapter 24</a><br>
|
||||
initial state: <a href="common.html#i24">Section 2.2</a><br>
|
||||
Janko: <a href="magnets.html#i1">Chapter 33</a>, <a href="signpost.html#i1">Chapter 34</a><br>
|
||||
Keen: <a href="keen.html#i0">Chapter 30</a><br>
|
||||
KenKen: <a href="keen.html#i1">Chapter 30</a><br>
|
||||
keys: <a href="common.html#i3">Section 2.1</a><br>
|
||||
keys, for Black Box: <a href="blackbox.html#i1">Section 19.1</a><br>
|
||||
keys, for Cube: <a href="cube.html#i1">Section 4.1</a><br>
|
||||
keys, for Fifteen: <a href="fifteen.html#i2">Section 5.1</a><br>
|
||||
keys, for Flip: <a href="flip.html#i1">Section 14.1</a><br>
|
||||
keys, for Guess: <a href="guess.html#i2">Section 15.1</a><br>
|
||||
keys, for Inertia: <a href="inertia.html#i1">Section 24.1</a><br>
|
||||
keys, for Net: <a href="net.html#i5">Section 3.1</a><br>
|
||||
keys, for Same Game: <a href="samegame.html#i1">Section 13.1</a><br>
|
||||
Latin square: <a href="unequal.html#i1">Chapter 27</a><br>
|
||||
licence: <a href="licence.html#i1">Appendix A</a><br>
|
||||
licence, MIT: <a href="intro.html#i3">Chapter 1</a>, <a href="licence.html#i0">Appendix A</a><br>
|
||||
Light Up: <a href="lightup.html#i0">Chapter 21</a><br>
|
||||
Linux: <a href="intro.html#i0">Chapter 1</a>, <a href="common.html#i35">Section 2.5</a><br>
|
||||
load: <a href="common.html#i9">Section 2.1</a>, <a href="common.html#i38">Section 2.5</a><br>
|
||||
Loopy: <a href="loopy.html#i0">Chapter 23</a><br>
|
||||
Mac OS X: <a href="intro.html#i2">Chapter 1</a>, <a href="common.html#i4">Section 2.1</a>, <a href="common.html#i22">Section 2.2</a>, <a href="common.html#i33">Section 2.4</a><br>
|
||||
Magnets: <a href="magnets.html#i0">Chapter 33</a><br>
|
||||
Map: <a href="map.html#i0">Chapter 22</a><br>
|
||||
Mastermind: <a href="guess.html#i1">Chapter 15</a><br>
|
||||
Mines: <a href="mines.html#i0">Chapter 12</a><br>
|
||||
MIT licence: <a href="intro.html#i3">Chapter 1</a>, <a href="licence.html#i0">Appendix A</a><br>
|
||||
Net: <a href="net.html#i0">Chapter 3</a><br>
|
||||
<code>NETGAME.EXE</code>: <a href="net.html#i2">Chapter 3</a><br>
|
||||
Netslide: <a href="netslide.html#i0">Chapter 9</a><br>
|
||||
NetWalk: <a href="net.html#i4">Chapter 3</a><br>
|
||||
new game: <a href="common.html#i7">Section 2.1</a><br>
|
||||
Nikoli: <a href="rect.html#i1">Chapter 8</a>, <a href="solo.html#i1">Chapter 11</a>, <a href="slant.html#i1">Chapter 20</a>, <a href="lightup.html#i1">Chapter 21</a>, <a href="loopy.html#i1">Chapter 23</a>, <a href="bridges.html#i1">Chapter 26</a>, <a href="galaxies.html#i1">Chapter 28</a>, <a href="filling.html#i1">Chapter 29</a>, <a href="singles.html#i1">Chapter 32</a>, <a href="range.html#i1">Chapter 35</a>, <a href="pearl.html#i1">Chapter 36</a>, <a href="palisade.html#i1">Chapter 41</a><br>
|
||||
nonograms: <a href="pattern.html#i1">Chapter 10</a><br>
|
||||
Palisade: <a href="palisade.html#i0">Chapter 41</a><br>
|
||||
parameters: <a href="common.html#i27">Section 2.2</a>, <a href="common.html#i31">Section 2.3</a><br>
|
||||
parameters, for Black Box: <a href="blackbox.html#i2">Section 19.2</a><br>
|
||||
parameters, for Bridges: <a href="bridges.html#i3">Section 26.2</a><br>
|
||||
parameters, for Cube: <a href="cube.html#i2">Section 4.2</a><br>
|
||||
parameters, for Dominosa: <a href="dominosa.html#i2">Section 17.2</a><br>
|
||||
parameters, for Fifteen: <a href="fifteen.html#i3">Section 5.2</a><br>
|
||||
parameters, for Filling: <a href="filling.html#i3">Section 29.2</a><br>
|
||||
parameters, for flip: <a href="flip.html#i2">Section 14.2</a><br>
|
||||
parameters, for Flood: <a href="flood.html#i2">Section 39.2</a><br>
|
||||
parameters, for Galaxies: <a href="galaxies.html#i3">Section 28.2</a><br>
|
||||
parameters, for Guess: <a href="guess.html#i3">Section 15.2</a><br>
|
||||
parameters, for Inertia: <a href="inertia.html#i2">Section 24.2</a><br>
|
||||
parameters, for Keen: <a href="keen.html#i3">Section 30.2</a><br>
|
||||
parameters, for Light Up: <a href="lightup.html#i3">Section 21.2</a><br>
|
||||
parameters, for Loopy: <a href="loopy.html#i3">Section 23.2</a><br>
|
||||
parameters, for Magnets: <a href="magnets.html#i3">Section 33.2</a><br>
|
||||
parameters, for Map: <a href="map.html#i3">Section 22.2</a><br>
|
||||
parameters, for Mines: <a href="mines.html#i2">Section 12.2</a><br>
|
||||
parameters, for Net: <a href="net.html#i6">Section 3.2</a><br>
|
||||
parameters, for Netslide: <a href="netslide.html#i2">Chapter 9</a><br>
|
||||
parameters, for Palisade: <a href="palisade.html#i3">Section 41.2</a><br>
|
||||
parameters, for Pattern: <a href="pattern.html#i3">Section 10.2</a><br>
|
||||
parameters, for Pearl: <a href="pearl.html#i3">Section 36.2</a><br>
|
||||
parameters, for Pegs: <a href="pegs.html#i3">Section 16.2</a><br>
|
||||
parameters, for Range: <a href="range.html#i3">Section 35.2</a><br>
|
||||
parameters, for Rectangles: <a href="rect.html#i4">Section 8.2</a><br>
|
||||
parameters, for Same Game: <a href="samegame.html#i2">Section 13.2</a><br>
|
||||
parameters, for Signpost: <a href="signpost.html#i3">Section 34.2</a><br>
|
||||
parameters, for Singles: <a href="singles.html#i4">Section 32.2</a><br>
|
||||
parameters, for Sixteen: <a href="sixteen.html#i2">Section 6.2</a><br>
|
||||
parameters, for Slant: <a href="slant.html#i3">Section 20.2</a><br>
|
||||
parameters, for Solo: <a href="solo.html#i3">Section 11.2</a><br>
|
||||
parameters, for Tents: <a href="tents.html#i2">Section 25.2</a><br>
|
||||
parameters, for Towers: <a href="towers.html#i3">Section 31.2</a><br>
|
||||
parameters, for Tracks: <a href="tracks.html#i2">Section 40.2</a><br>
|
||||
parameters, for Twiddle: <a href="twiddle.html#i2">Section 7.2</a><br>
|
||||
parameters, for Undead: <a href="undead.html#i2">Section 37.2</a><br>
|
||||
parameters, for Unequal: <a href="unequal.html#i4">Section 27.2</a><br>
|
||||
parameters, for Unruly: <a href="unruly.html#i2">Section 38.2</a><br>
|
||||
parameters, for Untangle: <a href="untangle.html#i3">Section 18.2</a><br>
|
||||
patches: <a href="intro.html#i8">Chapter 1</a><br>
|
||||
Pattern: <a href="pattern.html#i0">Chapter 10</a><br>
|
||||
Pearl: <a href="pearl.html#i0">Chapter 36</a><br>
|
||||
Pegs: <a href="pegs.html#i0">Chapter 16</a><br>
|
||||
Planarity: <a href="untangle.html#i1">Chapter 18</a><br>
|
||||
PostScript: <a href="common.html#i41">Section 2.5</a><br>
|
||||
preferences, specifying default: <a href="common.html#i34">Section 2.4</a><br>
|
||||
preset: <a href="common.html#i29">Section 2.3</a><br>
|
||||
printing, on Unix: <a href="common.html#i40">Section 2.5</a><br>
|
||||
printing, on Windows: <a href="common.html#i11">Section 2.1</a><br>
|
||||
15-puzzle: <a href="fifteen.html#i1">Chapter 5</a><br>
|
||||
Puzzle Palace: <a href="rect.html#i2">Chapter 8</a><br>
|
||||
quit: <a href="common.html#i17">Section 2.1</a><br>
|
||||
Random Seed: <a href="common.html#i20">Section 2.2</a><br>
|
||||
Range: <a href="range.html#i0">Chapter 35</a><br>
|
||||
Rectangles: <a href="rect.html#i0">Chapter 8</a><br>
|
||||
redo: <a href="common.html#i13">Section 2.1</a><br>
|
||||
restart game: <a href="common.html#i8">Section 2.1</a><br>
|
||||
Same Game: <a href="samegame.html#i0">Chapter 13</a><br>
|
||||
save: <a href="common.html#i10">Section 2.1</a>, <a href="common.html#i37">Section 2.5</a><br>
|
||||
shortcuts (keyboard): <a href="common.html#i3">Section 2.1</a><br>
|
||||
shortcuts (keyboard), for Black Box: <a href="blackbox.html#i1">Section 19.1</a><br>
|
||||
shortcuts (keyboard), for Cube: <a href="cube.html#i1">Section 4.1</a><br>
|
||||
shortcuts (keyboard), for Fifteen: <a href="fifteen.html#i2">Section 5.1</a><br>
|
||||
shortcuts (keyboard), for Flip: <a href="flip.html#i1">Section 14.1</a><br>
|
||||
shortcuts (keyboard), for Guess: <a href="guess.html#i2">Section 15.1</a><br>
|
||||
shortcuts (keyboard), for Inertia: <a href="inertia.html#i1">Section 24.1</a><br>
|
||||
shortcuts (keyboard), for Net: <a href="net.html#i5">Section 3.1</a><br>
|
||||
shortcuts (keyboard), for Same Game: <a href="samegame.html#i1">Section 13.1</a><br>
|
||||
Signpost: <a href="signpost.html#i0">Chapter 34</a><br>
|
||||
Singles: <a href="singles.html#i0">Chapter 32</a><br>
|
||||
Sixteen: <a href="sixteen.html#i0">Chapter 6</a><br>
|
||||
Skyscrapers: <a href="towers.html#i1">Chapter 31</a><br>
|
||||
Slant: <a href="slant.html#i0">Chapter 20</a><br>
|
||||
Solitaire, Peg: <a href="pegs.html#i1">Chapter 16</a><br>
|
||||
Solo: <a href="solo.html#i0">Chapter 11</a><br>
|
||||
solve: <a href="common.html#i15">Section 2.1</a><br>
|
||||
source code: <a href="intro.html#i4">Chapter 1</a><br>
|
||||
‘Specific’, menu option: <a href="common.html#i19">Section 2.2</a><br>
|
||||
state, initial: <a href="common.html#i24">Section 2.2</a><br>
|
||||
Tents: <a href="tents.html#i0">Chapter 25</a><br>
|
||||
Towers: <a href="towers.html#i0">Chapter 31</a><br>
|
||||
Tracks: <a href="tracks.html#i0">Chapter 40</a><br>
|
||||
Twiddle: <a href="twiddle.html#i0">Chapter 7</a><br>
|
||||
Type menu: <a href="common.html#i28">Section 2.3</a><br>
|
||||
Undead: <a href="undead.html#i0">Chapter 37</a><br>
|
||||
undo: <a href="common.html#i12">Section 2.1</a><br>
|
||||
Unequal: <a href="unequal.html#i0">Chapter 27</a><br>
|
||||
Unix: <a href="intro.html#i0">Chapter 1</a>, <a href="common.html#i35">Section 2.5</a><br>
|
||||
Unruly: <a href="unruly.html#i0">Chapter 38</a><br>
|
||||
Untangle: <a href="untangle.html#i0">Chapter 18</a><br>
|
||||
version: <a href="common.html#i25">Section 2.2</a><br>
|
||||
website: <a href="intro.html#i5">Chapter 1</a><br>
|
||||
Windows: <a href="intro.html#i1">Chapter 1</a>, <a href="net.html#i1">Chapter 3</a></p>
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
21
apps/plugins/puzzles/src/dominosa.R
Normal file
21
apps/plugins/puzzles/src/dominosa.R
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
DOMINOSA_EXTRA = laydomino
|
||||
|
||||
dominosa : [X] GTK COMMON dominosa DOMINOSA_EXTRA dominosa-icon|no-icon
|
||||
|
||||
dominosa : [G] WINDOWS COMMON dominosa DOMINOSA_EXTRA dominosa.res|noicon.res
|
||||
|
||||
ALL += dominosa[COMBINED] DOMINOSA_EXTRA
|
||||
|
||||
!begin am gtk
|
||||
GAMES += dominosa
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(dominosa) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
dominosa:dominosa.exe:Dominosa:Domino tiling puzzle:Tile the rectangle with a full set of dominoes.
|
||||
!end
|
||||
1748
apps/plugins/puzzles/src/dominosa.c
Normal file
1748
apps/plugins/puzzles/src/dominosa.c
Normal file
File diff suppressed because it is too large
Load diff
57
apps/plugins/puzzles/src/dominosa.html
Normal file
57
apps/plugins/puzzles/src/dominosa.html
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Dominosa</title>
|
||||
<link rel="previous" href="pegs.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="untangle.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="pegs.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="untangle.html">Next</a></p>
|
||||
<h1><a name="C17"></a>Chapter 17: <a name="i0"></a>Dominosa</h1>
|
||||
<p>
|
||||
A normal set of dominoes – that is, one instance of every (unordered) pair of numbers from 0 to 6 – has been arranged irregularly into a rectangle; then the number in each square has been written down and the dominoes themselves removed. Your task is to reconstruct the pattern by arranging the set of dominoes to match the provided array of numbers.
|
||||
</p>
|
||||
<p>
|
||||
This puzzle is widely credited to O. S. Adler, and takes part of its name from those initials.
|
||||
</p>
|
||||
<h2><a name="S17.1"></a>17.1 <a name="i1"></a>Dominosa controls</h2>
|
||||
<p>
|
||||
Left-clicking between any two adjacent numbers places a domino covering them, or removes one if it is already present. Trying to place a domino which overlaps existing dominoes will remove the ones it overlaps.
|
||||
</p>
|
||||
<p>
|
||||
Right-clicking between two adjacent numbers draws a line between them, which you can use to remind yourself that you know those two numbers are <em>not</em> covered by a single domino. Right-clicking again removes the line.
|
||||
</p>
|
||||
<p>
|
||||
You can also use the cursor keys to move a cursor around the grid. When the cursor is half way between two adjacent numbers, pressing the return key will place a domino covering those numbers, or pressing the space bar will lay a line between the two squares. Repeating either action removes the domino or line.
|
||||
</p>
|
||||
<p>
|
||||
Pressing a number key will highlight all occurrences of that number. Pressing that number again will clear the highlighting. Up to two different numbers can be highlighted at any given time.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S17.2"></a>17.2 <a name="i2"></a>Dominosa parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Maximum number on dominoes</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Controls the size of the puzzle, by controlling the size of the set of dominoes used to make it. Dominoes with numbers going up to N will give rise to an (N+2) × (N+1) rectangle; so, in particular, the default value of 6 gives an 8×7 grid.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Ensure unique solution</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Normally, Dominosa will make sure that the puzzles it presents have only one solution. Puzzles with ambiguous sections can be more difficult and sometimes more subtle, so if you like you can turn off this feature. Also, finding <em>all</em> the possible solutions can be an additional challenge for an advanced player. Turning off this option can also speed up puzzle generation.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
351
apps/plugins/puzzles/src/drawing.c
Normal file
351
apps/plugins/puzzles/src/drawing.c
Normal file
|
|
@ -0,0 +1,351 @@
|
|||
/*
|
||||
* drawing.c: Intermediary between the drawing interface as
|
||||
* presented to the back end, and that implemented by the front
|
||||
* end.
|
||||
*
|
||||
* Mostly just looks up calls in a vtable and passes them through
|
||||
* unchanged. However, on the printing side it tracks print colours
|
||||
* so the front end API doesn't have to.
|
||||
*
|
||||
* FIXME:
|
||||
*
|
||||
* - I'd _like_ to do automatic draw_updates, but it's a pain for
|
||||
* draw_text in particular. I'd have to invent a front end API
|
||||
* which retrieved the text bounds.
|
||||
* + that might allow me to do the alignment centrally as well?
|
||||
* * perhaps not, because PS can't return this information,
|
||||
* so there would have to be a special case for it.
|
||||
* + however, that at least doesn't stand in the way of using
|
||||
* the text bounds for draw_update, because PS doesn't need
|
||||
* draw_update since it's printing-only. Any _interactive_
|
||||
* drawing API couldn't get away with refusing to tell you
|
||||
* what parts of the screen a text draw had covered, because
|
||||
* you would inevitably need to erase it later on.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "puzzles.h"
|
||||
|
||||
struct print_colour {
|
||||
int hatch;
|
||||
int hatch_when; /* 0=never 1=only-in-b&w 2=always */
|
||||
float r, g, b;
|
||||
float grey;
|
||||
};
|
||||
|
||||
struct drawing {
|
||||
const drawing_api *api;
|
||||
void *handle;
|
||||
struct print_colour *colours;
|
||||
int ncolours, coloursize;
|
||||
float scale;
|
||||
/* `me' is only used in status_bar(), so print-oriented instances of
|
||||
* this may set it to NULL. */
|
||||
midend *me;
|
||||
char *laststatus;
|
||||
};
|
||||
|
||||
drawing *drawing_new(const drawing_api *api, midend *me, void *handle)
|
||||
{
|
||||
drawing *dr = snew(drawing);
|
||||
dr->api = api;
|
||||
dr->handle = handle;
|
||||
dr->colours = NULL;
|
||||
dr->ncolours = dr->coloursize = 0;
|
||||
dr->scale = 1.0F;
|
||||
dr->me = me;
|
||||
dr->laststatus = NULL;
|
||||
return dr;
|
||||
}
|
||||
|
||||
void drawing_free(drawing *dr)
|
||||
{
|
||||
sfree(dr->laststatus);
|
||||
sfree(dr->colours);
|
||||
sfree(dr);
|
||||
}
|
||||
|
||||
void draw_text(drawing *dr, int x, int y, int fonttype, int fontsize,
|
||||
int align, int colour, char *text)
|
||||
{
|
||||
dr->api->draw_text(dr->handle, x, y, fonttype, fontsize, align,
|
||||
colour, text);
|
||||
}
|
||||
|
||||
void draw_rect(drawing *dr, int x, int y, int w, int h, int colour)
|
||||
{
|
||||
dr->api->draw_rect(dr->handle, x, y, w, h, colour);
|
||||
}
|
||||
|
||||
void draw_line(drawing *dr, int x1, int y1, int x2, int y2, int colour)
|
||||
{
|
||||
dr->api->draw_line(dr->handle, x1, y1, x2, y2, colour);
|
||||
}
|
||||
|
||||
void draw_thick_line(drawing *dr, float thickness,
|
||||
float x1, float y1, float x2, float y2, int colour)
|
||||
{
|
||||
if (dr->api->draw_thick_line) {
|
||||
dr->api->draw_thick_line(dr->handle, thickness,
|
||||
x1, y1, x2, y2, colour);
|
||||
} else {
|
||||
/* We'll fake it up with a filled polygon. The tweak to the
|
||||
* thickness empirically compensates for rounding errors, because
|
||||
* polygon rendering uses integer coordinates.
|
||||
*/
|
||||
float len = sqrt((x2 - x1)*(x2 - x1) + (y2 - y1)*(y2 - y1));
|
||||
float tvhatx = (x2 - x1)/len * (thickness/2 - 0.2);
|
||||
float tvhaty = (y2 - y1)/len * (thickness/2 - 0.2);
|
||||
int p[8];
|
||||
|
||||
p[0] = x1 - tvhaty;
|
||||
p[1] = y1 + tvhatx;
|
||||
p[2] = x2 - tvhaty;
|
||||
p[3] = y2 + tvhatx;
|
||||
p[4] = x2 + tvhaty;
|
||||
p[5] = y2 - tvhatx;
|
||||
p[6] = x1 + tvhaty;
|
||||
p[7] = y1 - tvhatx;
|
||||
dr->api->draw_polygon(dr->handle, p, 4, colour, colour);
|
||||
}
|
||||
}
|
||||
|
||||
void draw_polygon(drawing *dr, int *coords, int npoints,
|
||||
int fillcolour, int outlinecolour)
|
||||
{
|
||||
dr->api->draw_polygon(dr->handle, coords, npoints, fillcolour,
|
||||
outlinecolour);
|
||||
}
|
||||
|
||||
void draw_circle(drawing *dr, int cx, int cy, int radius,
|
||||
int fillcolour, int outlinecolour)
|
||||
{
|
||||
dr->api->draw_circle(dr->handle, cx, cy, radius, fillcolour,
|
||||
outlinecolour);
|
||||
}
|
||||
|
||||
void draw_update(drawing *dr, int x, int y, int w, int h)
|
||||
{
|
||||
if (dr->api->draw_update)
|
||||
dr->api->draw_update(dr->handle, x, y, w, h);
|
||||
}
|
||||
|
||||
void clip(drawing *dr, int x, int y, int w, int h)
|
||||
{
|
||||
dr->api->clip(dr->handle, x, y, w, h);
|
||||
}
|
||||
|
||||
void unclip(drawing *dr)
|
||||
{
|
||||
dr->api->unclip(dr->handle);
|
||||
}
|
||||
|
||||
void start_draw(drawing *dr)
|
||||
{
|
||||
dr->api->start_draw(dr->handle);
|
||||
}
|
||||
|
||||
void end_draw(drawing *dr)
|
||||
{
|
||||
dr->api->end_draw(dr->handle);
|
||||
}
|
||||
|
||||
char *text_fallback(drawing *dr, const char *const *strings, int nstrings)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* If the drawing implementation provides one of these, use it.
|
||||
*/
|
||||
if (dr && dr->api->text_fallback)
|
||||
return dr->api->text_fallback(dr->handle, strings, nstrings);
|
||||
|
||||
/*
|
||||
* Otherwise, do the simple thing and just pick the first string
|
||||
* that fits in plain ASCII. It will then need no translation
|
||||
* out of UTF-8.
|
||||
*/
|
||||
for (i = 0; i < nstrings; i++) {
|
||||
const char *p;
|
||||
|
||||
for (p = strings[i]; *p; p++)
|
||||
if (*p & 0x80)
|
||||
break;
|
||||
if (!*p)
|
||||
return dupstr(strings[i]);
|
||||
}
|
||||
|
||||
/*
|
||||
* The caller was responsible for making sure _some_ string in
|
||||
* the list was in plain ASCII.
|
||||
*/
|
||||
assert(!"Should never get here");
|
||||
return NULL; /* placate optimiser */
|
||||
}
|
||||
|
||||
void status_bar(drawing *dr, char *text)
|
||||
{
|
||||
char *rewritten;
|
||||
|
||||
if (!dr->api->status_bar)
|
||||
return;
|
||||
|
||||
assert(dr->me);
|
||||
|
||||
rewritten = midend_rewrite_statusbar(dr->me, text);
|
||||
if (!dr->laststatus || strcmp(rewritten, dr->laststatus)) {
|
||||
dr->api->status_bar(dr->handle, rewritten);
|
||||
sfree(dr->laststatus);
|
||||
dr->laststatus = rewritten;
|
||||
} else {
|
||||
sfree(rewritten);
|
||||
}
|
||||
}
|
||||
|
||||
blitter *blitter_new(drawing *dr, int w, int h)
|
||||
{
|
||||
return dr->api->blitter_new(dr->handle, w, h);
|
||||
}
|
||||
|
||||
void blitter_free(drawing *dr, blitter *bl)
|
||||
{
|
||||
dr->api->blitter_free(dr->handle, bl);
|
||||
}
|
||||
|
||||
void blitter_save(drawing *dr, blitter *bl, int x, int y)
|
||||
{
|
||||
dr->api->blitter_save(dr->handle, bl, x, y);
|
||||
}
|
||||
|
||||
void blitter_load(drawing *dr, blitter *bl, int x, int y)
|
||||
{
|
||||
dr->api->blitter_load(dr->handle, bl, x, y);
|
||||
}
|
||||
|
||||
void print_begin_doc(drawing *dr, int pages)
|
||||
{
|
||||
dr->api->begin_doc(dr->handle, pages);
|
||||
}
|
||||
|
||||
void print_begin_page(drawing *dr, int number)
|
||||
{
|
||||
dr->api->begin_page(dr->handle, number);
|
||||
}
|
||||
|
||||
void print_begin_puzzle(drawing *dr, float xm, float xc,
|
||||
float ym, float yc, int pw, int ph, float wmm,
|
||||
float scale)
|
||||
{
|
||||
dr->scale = scale;
|
||||
dr->ncolours = 0;
|
||||
dr->api->begin_puzzle(dr->handle, xm, xc, ym, yc, pw, ph, wmm);
|
||||
}
|
||||
|
||||
void print_end_puzzle(drawing *dr)
|
||||
{
|
||||
dr->api->end_puzzle(dr->handle);
|
||||
dr->scale = 1.0F;
|
||||
}
|
||||
|
||||
void print_end_page(drawing *dr, int number)
|
||||
{
|
||||
dr->api->end_page(dr->handle, number);
|
||||
}
|
||||
|
||||
void print_end_doc(drawing *dr)
|
||||
{
|
||||
dr->api->end_doc(dr->handle);
|
||||
}
|
||||
|
||||
void print_get_colour(drawing *dr, int colour, int printing_in_colour,
|
||||
int *hatch, float *r, float *g, float *b)
|
||||
{
|
||||
assert(colour >= 0 && colour < dr->ncolours);
|
||||
if (dr->colours[colour].hatch_when == 2 ||
|
||||
(dr->colours[colour].hatch_when == 1 && !printing_in_colour)) {
|
||||
*hatch = dr->colours[colour].hatch;
|
||||
} else {
|
||||
*hatch = -1;
|
||||
if (printing_in_colour) {
|
||||
*r = dr->colours[colour].r;
|
||||
*g = dr->colours[colour].g;
|
||||
*b = dr->colours[colour].b;
|
||||
} else {
|
||||
*r = *g = *b = dr->colours[colour].grey;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int print_generic_colour(drawing *dr, float r, float g, float b,
|
||||
float grey, int hatch, int hatch_when)
|
||||
{
|
||||
if (dr->ncolours >= dr->coloursize) {
|
||||
dr->coloursize = dr->ncolours + 16;
|
||||
dr->colours = sresize(dr->colours, dr->coloursize,
|
||||
struct print_colour);
|
||||
}
|
||||
dr->colours[dr->ncolours].hatch = hatch;
|
||||
dr->colours[dr->ncolours].hatch_when = hatch_when;
|
||||
dr->colours[dr->ncolours].r = r;
|
||||
dr->colours[dr->ncolours].g = g;
|
||||
dr->colours[dr->ncolours].b = b;
|
||||
dr->colours[dr->ncolours].grey = grey;
|
||||
return dr->ncolours++;
|
||||
}
|
||||
|
||||
int print_mono_colour(drawing *dr, int grey)
|
||||
{
|
||||
return print_generic_colour(dr, grey, grey, grey, grey, -1, 0);
|
||||
}
|
||||
|
||||
int print_grey_colour(drawing *dr, float grey)
|
||||
{
|
||||
return print_generic_colour(dr, grey, grey, grey, grey, -1, 0);
|
||||
}
|
||||
|
||||
int print_hatched_colour(drawing *dr, int hatch)
|
||||
{
|
||||
return print_generic_colour(dr, 0, 0, 0, 0, hatch, 2);
|
||||
}
|
||||
|
||||
int print_rgb_mono_colour(drawing *dr, float r, float g, float b, int grey)
|
||||
{
|
||||
return print_generic_colour(dr, r, g, b, grey, -1, 0);
|
||||
}
|
||||
|
||||
int print_rgb_grey_colour(drawing *dr, float r, float g, float b, float grey)
|
||||
{
|
||||
return print_generic_colour(dr, r, g, b, grey, -1, 0);
|
||||
}
|
||||
|
||||
int print_rgb_hatched_colour(drawing *dr, float r, float g, float b, int hatch)
|
||||
{
|
||||
return print_generic_colour(dr, r, g, b, 0, hatch, 1);
|
||||
}
|
||||
|
||||
void print_line_width(drawing *dr, int width)
|
||||
{
|
||||
/*
|
||||
* I don't think it's entirely sensible to have line widths be
|
||||
* entirely relative to the puzzle size; there is a point
|
||||
* beyond which lines are just _stupidly_ thick. On the other
|
||||
* hand, absolute line widths aren't particularly nice either
|
||||
* because they start to feel a bit feeble at really large
|
||||
* scales.
|
||||
*
|
||||
* My experimental answer is to scale line widths as the
|
||||
* _square root_ of the main puzzle scale. Double the puzzle
|
||||
* size, and the line width multiplies by 1.4.
|
||||
*/
|
||||
dr->api->line_width(dr->handle, (float)sqrt(dr->scale) * width);
|
||||
}
|
||||
|
||||
void print_line_dotted(drawing *dr, int dotted)
|
||||
{
|
||||
dr->api->line_dotted(dr->handle, dotted);
|
||||
}
|
||||
192
apps/plugins/puzzles/src/dsf.c
Normal file
192
apps/plugins/puzzles/src/dsf.c
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
* dsf.c: some functions to handle a disjoint set forest,
|
||||
* which is a data structure useful in any solver which has to
|
||||
* worry about avoiding closed loops.
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "puzzles.h"
|
||||
|
||||
/*void print_dsf(int *dsf, int size)
|
||||
{
|
||||
int *printed_elements = snewn(size, int);
|
||||
int *equal_elements = snewn(size, int);
|
||||
int *inverse_elements = snewn(size, int);
|
||||
int printed_count = 0, equal_count, inverse_count;
|
||||
int i, n, inverse;
|
||||
|
||||
memset(printed_elements, -1, sizeof(int) * size);
|
||||
|
||||
while (1) {
|
||||
equal_count = 0;
|
||||
inverse_count = 0;
|
||||
for (i = 0; i < size; ++i) {
|
||||
if (!memchr(printed_elements, i, sizeof(int) * size))
|
||||
break;
|
||||
}
|
||||
if (i == size)
|
||||
goto done;
|
||||
|
||||
i = dsf_canonify(dsf, i);
|
||||
|
||||
for (n = 0; n < size; ++n) {
|
||||
if (edsf_canonify(dsf, n, &inverse) == i) {
|
||||
if (inverse)
|
||||
inverse_elements[inverse_count++] = n;
|
||||
else
|
||||
equal_elements[equal_count++] = n;
|
||||
}
|
||||
}
|
||||
|
||||
for (n = 0; n < equal_count; ++n) {
|
||||
fprintf(stderr, "%d ", equal_elements[n]);
|
||||
printed_elements[printed_count++] = equal_elements[n];
|
||||
}
|
||||
if (inverse_count) {
|
||||
fprintf(stderr, "!= ");
|
||||
for (n = 0; n < inverse_count; ++n) {
|
||||
fprintf(stderr, "%d ", inverse_elements[n]);
|
||||
printed_elements[printed_count++] = inverse_elements[n];
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
done:
|
||||
|
||||
sfree(printed_elements);
|
||||
sfree(equal_elements);
|
||||
sfree(inverse_elements);
|
||||
}*/
|
||||
|
||||
void dsf_init(int *dsf, int size)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < size; i++) dsf[i] = 6;
|
||||
/* Bottom bit of each element of this array stores whether that
|
||||
* element is opposite to its parent, which starts off as
|
||||
* false. Second bit of each element stores whether that element
|
||||
* is the root of its tree or not. If it's not the root, the
|
||||
* remaining 30 bits are the parent, otherwise the remaining 30
|
||||
* bits are the number of elements in the tree. */
|
||||
}
|
||||
|
||||
int *snew_dsf(int size)
|
||||
{
|
||||
int *ret;
|
||||
|
||||
ret = snewn(size, int);
|
||||
dsf_init(ret, size);
|
||||
|
||||
/*print_dsf(ret, size); */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int dsf_canonify(int *dsf, int index)
|
||||
{
|
||||
return edsf_canonify(dsf, index, NULL);
|
||||
}
|
||||
|
||||
void dsf_merge(int *dsf, int v1, int v2)
|
||||
{
|
||||
edsf_merge(dsf, v1, v2, FALSE);
|
||||
}
|
||||
|
||||
int dsf_size(int *dsf, int index) {
|
||||
return dsf[dsf_canonify(dsf, index)] >> 2;
|
||||
}
|
||||
|
||||
int edsf_canonify(int *dsf, int index, int *inverse_return)
|
||||
{
|
||||
int start_index = index, canonical_index;
|
||||
int inverse = 0;
|
||||
|
||||
/* fprintf(stderr, "dsf = %p\n", dsf); */
|
||||
/* fprintf(stderr, "Canonify %2d\n", index); */
|
||||
|
||||
assert(index >= 0);
|
||||
|
||||
/* Find the index of the canonical element of the 'equivalence class' of
|
||||
* which start_index is a member, and figure out whether start_index is the
|
||||
* same as or inverse to that. */
|
||||
while ((dsf[index] & 2) == 0) {
|
||||
inverse ^= (dsf[index] & 1);
|
||||
index = dsf[index] >> 2;
|
||||
/* fprintf(stderr, "index = %2d, ", index); */
|
||||
/* fprintf(stderr, "inverse = %d\n", inverse); */
|
||||
}
|
||||
canonical_index = index;
|
||||
|
||||
if (inverse_return)
|
||||
*inverse_return = inverse;
|
||||
|
||||
/* Update every member of this 'equivalence class' to point directly at the
|
||||
* canonical member. */
|
||||
index = start_index;
|
||||
while (index != canonical_index) {
|
||||
int nextindex = dsf[index] >> 2;
|
||||
int nextinverse = inverse ^ (dsf[index] & 1);
|
||||
dsf[index] = (canonical_index << 2) | inverse;
|
||||
inverse = nextinverse;
|
||||
index = nextindex;
|
||||
}
|
||||
|
||||
assert(inverse == 0);
|
||||
|
||||
/* fprintf(stderr, "Return %2d\n", index); */
|
||||
|
||||
return index;
|
||||
}
|
||||
|
||||
void edsf_merge(int *dsf, int v1, int v2, int inverse)
|
||||
{
|
||||
int i1, i2;
|
||||
|
||||
/* fprintf(stderr, "dsf = %p\n", dsf); */
|
||||
/* fprintf(stderr, "Merge [%2d,%2d], %d\n", v1, v2, inverse); */
|
||||
|
||||
v1 = edsf_canonify(dsf, v1, &i1);
|
||||
assert(dsf[v1] & 2);
|
||||
inverse ^= i1;
|
||||
v2 = edsf_canonify(dsf, v2, &i2);
|
||||
assert(dsf[v2] & 2);
|
||||
inverse ^= i2;
|
||||
|
||||
/* fprintf(stderr, "Doing [%2d,%2d], %d\n", v1, v2, inverse); */
|
||||
|
||||
if (v1 == v2)
|
||||
assert(!inverse);
|
||||
else {
|
||||
assert(inverse == 0 || inverse == 1);
|
||||
/*
|
||||
* We always make the smaller of v1 and v2 the new canonical
|
||||
* element. This ensures that the canonical element of any
|
||||
* class in this structure is always the first element in
|
||||
* it. 'Keen' depends critically on this property.
|
||||
*
|
||||
* (Jonas Koelker previously had this code choosing which
|
||||
* way round to connect the trees by examining the sizes of
|
||||
* the classes being merged, so that the root of the
|
||||
* larger-sized class became the new root. This gives better
|
||||
* asymptotic performance, but I've changed it to do it this
|
||||
* way because I like having a deterministic canonical
|
||||
* element.)
|
||||
*/
|
||||
if (v1 > v2) {
|
||||
int v3 = v1;
|
||||
v1 = v2;
|
||||
v2 = v3;
|
||||
}
|
||||
dsf[v1] += (dsf[v2] >> 2) << 2;
|
||||
dsf[v2] = (v1 << 2) | !!inverse;
|
||||
}
|
||||
|
||||
v2 = edsf_canonify(dsf, v2, &i2);
|
||||
assert(v2 == v1);
|
||||
assert(i2 == inverse);
|
||||
|
||||
/* fprintf(stderr, "dsf[%2d] = %2d\n", v2, dsf[v2]); */
|
||||
}
|
||||
876
apps/plugins/puzzles/src/emcc.c
Normal file
876
apps/plugins/puzzles/src/emcc.c
Normal file
|
|
@ -0,0 +1,876 @@
|
|||
/*
|
||||
* emcc.c: the C component of an Emscripten-based web/Javascript front
|
||||
* end for Puzzles.
|
||||
*
|
||||
* The Javascript parts of this system live in emcclib.js and
|
||||
* emccpre.js. It also depends on being run in the context of a web
|
||||
* page containing an appropriate collection of bits and pieces (a
|
||||
* canvas, some buttons and links etc), which is generated for each
|
||||
* puzzle by the script html/jspage.pl.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Further thoughts on possible enhancements:
|
||||
*
|
||||
* - I think it might be feasible to have these JS puzzles permit
|
||||
* loading and saving games in disk files. Saving would be done by
|
||||
* constructing a data: URI encapsulating the save file, and then
|
||||
* telling the browser to visit that URI with the effect that it
|
||||
* would naturally pop up a 'where would you like to save this'
|
||||
* dialog box. Loading, more or less similarly, might be feasible
|
||||
* by using the DOM File API to ask the user to select a file and
|
||||
* permit us to see its contents.
|
||||
*
|
||||
* - I should think about whether these webified puzzles can support
|
||||
* touchscreen-based tablet browsers (assuming there are any that
|
||||
* can cope with the reasonably modern JS and run it fast enough to
|
||||
* be worthwhile).
|
||||
*
|
||||
* - think about making use of localStorage. It might be useful to
|
||||
* let the user save games into there as an alternative to disk
|
||||
* files - disk files are all very well for getting the save right
|
||||
* out of your browser to (e.g.) email to me as a bug report, but
|
||||
* for just resuming a game you were in the middle of, you'd
|
||||
* probably rather have a nice simple 'quick save' and 'quick load'
|
||||
* button pair. Also, that might be a useful place to store
|
||||
* preferences, if I ever get round to writing a preferences UI.
|
||||
*
|
||||
* - some CSS to make the button bar and configuration dialogs a
|
||||
* little less ugly would probably not go amiss.
|
||||
*
|
||||
* - this is a downright silly idea, but it does occur to me that if
|
||||
* I were to write a PDF output driver for the Puzzles printing
|
||||
* API, then I might be able to implement a sort of 'printing'
|
||||
* feature in this front end, using data: URIs again. (Ask the user
|
||||
* exactly what they want printed, then construct an appropriate
|
||||
* PDF and embed it in a gigantic data: URI. Then they can print
|
||||
* that using whatever they normally use to print PDFs!)
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "puzzles.h"
|
||||
|
||||
/*
|
||||
* Extern references to Javascript functions provided in emcclib.js.
|
||||
*/
|
||||
extern void js_debug(const char *);
|
||||
extern void js_error_box(const char *message);
|
||||
extern void js_remove_type_dropdown(void);
|
||||
extern void js_remove_solve_button(void);
|
||||
extern void js_add_preset(int menuid, const char *name, int value);
|
||||
extern int js_add_preset_submenu(int menuid, const char *name);
|
||||
extern int js_get_selected_preset(void);
|
||||
extern void js_select_preset(int n);
|
||||
extern void js_get_date_64(unsigned *p);
|
||||
extern void js_update_permalinks(const char *desc, const char *seed);
|
||||
extern void js_enable_undo_redo(int undo, int redo);
|
||||
extern void js_activate_timer();
|
||||
extern void js_deactivate_timer();
|
||||
extern void js_canvas_start_draw(void);
|
||||
extern void js_canvas_draw_update(int x, int y, int w, int h);
|
||||
extern void js_canvas_end_draw(void);
|
||||
extern void js_canvas_draw_rect(int x, int y, int w, int h,
|
||||
const char *colour);
|
||||
extern void js_canvas_clip_rect(int x, int y, int w, int h);
|
||||
extern void js_canvas_unclip(void);
|
||||
extern void js_canvas_draw_line(float x1, float y1, float x2, float y2,
|
||||
int width, const char *colour);
|
||||
extern void js_canvas_draw_poly(int *points, int npoints,
|
||||
const char *fillcolour,
|
||||
const char *outlinecolour);
|
||||
extern void js_canvas_draw_circle(int x, int y, int r,
|
||||
const char *fillcolour,
|
||||
const char *outlinecolour);
|
||||
extern int js_canvas_find_font_midpoint(int height, const char *fontptr);
|
||||
extern void js_canvas_draw_text(int x, int y, int halign,
|
||||
const char *colptr, const char *fontptr,
|
||||
const char *text);
|
||||
extern int js_canvas_new_blitter(int w, int h);
|
||||
extern void js_canvas_free_blitter(int id);
|
||||
extern void js_canvas_copy_to_blitter(int id, int x, int y, int w, int h);
|
||||
extern void js_canvas_copy_from_blitter(int id, int x, int y, int w, int h);
|
||||
extern void js_canvas_make_statusbar(void);
|
||||
extern void js_canvas_set_statusbar(const char *text);
|
||||
extern void js_canvas_set_size(int w, int h);
|
||||
|
||||
extern void js_dialog_init(const char *title);
|
||||
extern void js_dialog_string(int i, const char *title, const char *initvalue);
|
||||
extern void js_dialog_choices(int i, const char *title, const char *choicelist,
|
||||
int initvalue);
|
||||
extern void js_dialog_boolean(int i, const char *title, int initvalue);
|
||||
extern void js_dialog_launch(void);
|
||||
extern void js_dialog_cleanup(void);
|
||||
extern void js_focus_canvas(void);
|
||||
|
||||
/*
|
||||
* Call JS to get the date, and use that to initialise our random
|
||||
* number generator to invent the first game seed.
|
||||
*/
|
||||
void get_random_seed(void **randseed, int *randseedsize)
|
||||
{
|
||||
unsigned *ret = snewn(2, unsigned);
|
||||
js_get_date_64(ret);
|
||||
*randseed = ret;
|
||||
*randseedsize = 2*sizeof(unsigned);
|
||||
}
|
||||
|
||||
/*
|
||||
* Fatal error, called in cases of complete despair such as when
|
||||
* malloc() has returned NULL.
|
||||
*/
|
||||
void fatal(char *fmt, ...)
|
||||
{
|
||||
char buf[512];
|
||||
va_list ap;
|
||||
|
||||
strcpy(buf, "puzzle fatal error: ");
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
js_error_box(buf);
|
||||
}
|
||||
|
||||
void debug_printf(char *fmt, ...)
|
||||
{
|
||||
char buf[512];
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
va_end(ap);
|
||||
js_debug(buf);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function that makes it easy to test strings that might be
|
||||
* NULL.
|
||||
*/
|
||||
int strnullcmp(const char *a, const char *b)
|
||||
{
|
||||
if (a == NULL || b == NULL)
|
||||
return a != NULL ? +1 : b != NULL ? -1 : 0;
|
||||
return strcmp(a, b);
|
||||
}
|
||||
|
||||
/*
|
||||
* HTMLish names for the colours allocated by the puzzle.
|
||||
*/
|
||||
char **colour_strings;
|
||||
int ncolours;
|
||||
|
||||
/*
|
||||
* The global midend object.
|
||||
*/
|
||||
midend *me;
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Timing functions.
|
||||
*/
|
||||
int timer_active = FALSE;
|
||||
void deactivate_timer(frontend *fe)
|
||||
{
|
||||
js_deactivate_timer();
|
||||
timer_active = FALSE;
|
||||
}
|
||||
void activate_timer(frontend *fe)
|
||||
{
|
||||
if (!timer_active) {
|
||||
js_activate_timer();
|
||||
timer_active = TRUE;
|
||||
}
|
||||
}
|
||||
void timer_callback(double tplus)
|
||||
{
|
||||
if (timer_active)
|
||||
midend_timer(me, tplus);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Helper functions to resize the canvas, and variables to remember
|
||||
* its size for other functions (e.g. trimming blitter rectangles).
|
||||
*/
|
||||
static int canvas_w, canvas_h;
|
||||
|
||||
/* Called when we resize as a result of changing puzzle settings */
|
||||
static void resize(void)
|
||||
{
|
||||
int w, h;
|
||||
w = h = INT_MAX;
|
||||
midend_size(me, &w, &h, FALSE);
|
||||
js_canvas_set_size(w, h);
|
||||
canvas_w = w;
|
||||
canvas_h = h;
|
||||
}
|
||||
|
||||
/* Called from JS when the user uses the resize handle */
|
||||
void resize_puzzle(int w, int h)
|
||||
{
|
||||
midend_size(me, &w, &h, TRUE);
|
||||
if (canvas_w != w || canvas_h != h) {
|
||||
js_canvas_set_size(w, h);
|
||||
canvas_w = w;
|
||||
canvas_h = h;
|
||||
midend_force_redraw(me);
|
||||
}
|
||||
}
|
||||
|
||||
/* Called from JS when the user uses the restore button */
|
||||
void restore_puzzle_size(int w, int h)
|
||||
{
|
||||
midend_reset_tilesize(me);
|
||||
resize();
|
||||
midend_force_redraw(me);
|
||||
}
|
||||
|
||||
/*
|
||||
* HTML doesn't give us a default frontend colour of its own, so we
|
||||
* just make up a lightish grey ourselves.
|
||||
*/
|
||||
void frontend_default_colour(frontend *fe, float *output)
|
||||
{
|
||||
output[0] = output[1] = output[2] = 0.9F;
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function called from all over the place to ensure the undo
|
||||
* and redo buttons get properly enabled and disabled after every move
|
||||
* or undo or new-game event.
|
||||
*/
|
||||
static void update_undo_redo(void)
|
||||
{
|
||||
js_enable_undo_redo(midend_can_undo(me), midend_can_redo(me));
|
||||
}
|
||||
|
||||
/*
|
||||
* Mouse event handlers called from JS.
|
||||
*/
|
||||
void mousedown(int x, int y, int button)
|
||||
{
|
||||
button = (button == 0 ? LEFT_BUTTON :
|
||||
button == 1 ? MIDDLE_BUTTON : RIGHT_BUTTON);
|
||||
midend_process_key(me, x, y, button);
|
||||
update_undo_redo();
|
||||
}
|
||||
|
||||
void mouseup(int x, int y, int button)
|
||||
{
|
||||
button = (button == 0 ? LEFT_RELEASE :
|
||||
button == 1 ? MIDDLE_RELEASE : RIGHT_RELEASE);
|
||||
midend_process_key(me, x, y, button);
|
||||
update_undo_redo();
|
||||
}
|
||||
|
||||
void mousemove(int x, int y, int buttons)
|
||||
{
|
||||
int button = (buttons & 2 ? MIDDLE_DRAG :
|
||||
buttons & 4 ? RIGHT_DRAG : LEFT_DRAG);
|
||||
midend_process_key(me, x, y, button);
|
||||
update_undo_redo();
|
||||
}
|
||||
|
||||
/*
|
||||
* Keyboard handler called from JS.
|
||||
*/
|
||||
void key(int keycode, int charcode, const char *key, const char *chr,
|
||||
int shift, int ctrl)
|
||||
{
|
||||
int keyevent = -1;
|
||||
|
||||
if (!strnullcmp(key, "Backspace") || !strnullcmp(key, "Del") ||
|
||||
keycode == 8 || keycode == 46) {
|
||||
keyevent = 127; /* Backspace / Delete */
|
||||
} else if (!strnullcmp(key, "Enter") || keycode == 13) {
|
||||
keyevent = 13; /* return */
|
||||
} else if (!strnullcmp(key, "Left") || keycode == 37) {
|
||||
keyevent = CURSOR_LEFT;
|
||||
} else if (!strnullcmp(key, "Up") || keycode == 38) {
|
||||
keyevent = CURSOR_UP;
|
||||
} else if (!strnullcmp(key, "Right") || keycode == 39) {
|
||||
keyevent = CURSOR_RIGHT;
|
||||
} else if (!strnullcmp(key, "Down") || keycode == 40) {
|
||||
keyevent = CURSOR_DOWN;
|
||||
} else if (!strnullcmp(key, "End") || keycode == 35) {
|
||||
/*
|
||||
* We interpret Home, End, PgUp and PgDn as numeric keypad
|
||||
* controls regardless of whether they're the ones on the
|
||||
* numeric keypad (since we can't tell). The effect of
|
||||
* this should only be that the non-numeric-pad versions
|
||||
* of those keys generate directions in 8-way movement
|
||||
* puzzles like Cube and Inertia.
|
||||
*/
|
||||
keyevent = MOD_NUM_KEYPAD | '1';
|
||||
} else if (!strnullcmp(key, "PageDown") || keycode==34) {
|
||||
keyevent = MOD_NUM_KEYPAD | '3';
|
||||
} else if (!strnullcmp(key, "Home") || keycode==36) {
|
||||
keyevent = MOD_NUM_KEYPAD | '7';
|
||||
} else if (!strnullcmp(key, "PageUp") || keycode==33) {
|
||||
keyevent = MOD_NUM_KEYPAD | '9';
|
||||
} else if (chr && chr[0] && !chr[1]) {
|
||||
keyevent = chr[0] & 0xFF;
|
||||
} else if (keycode >= 96 && keycode < 106) {
|
||||
keyevent = MOD_NUM_KEYPAD | ('0' + keycode - 96);
|
||||
} else if (keycode >= 65 && keycode <= 90) {
|
||||
keyevent = keycode + (shift ? 0 : 32);
|
||||
} else if (keycode >= 48 && keycode <= 57) {
|
||||
keyevent = keycode;
|
||||
} else if (keycode == 32) { /* space / CURSOR_SELECT2 */
|
||||
keyevent = keycode;
|
||||
}
|
||||
|
||||
if (keyevent >= 0) {
|
||||
if (shift && keyevent >= 0x100)
|
||||
keyevent |= MOD_SHFT;
|
||||
|
||||
if (ctrl) {
|
||||
if (keyevent >= 0x100)
|
||||
keyevent |= MOD_CTRL;
|
||||
else
|
||||
keyevent &= 0x1F;
|
||||
}
|
||||
|
||||
midend_process_key(me, 0, 0, keyevent);
|
||||
update_undo_redo();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function called from several places to update the permalinks
|
||||
* whenever a new game is created.
|
||||
*/
|
||||
static void update_permalinks(void)
|
||||
{
|
||||
char *desc, *seed;
|
||||
desc = midend_get_game_id(me);
|
||||
seed = midend_get_random_seed(me);
|
||||
js_update_permalinks(desc, seed);
|
||||
sfree(desc);
|
||||
sfree(seed);
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback from the midend when the game ids change, so we can update
|
||||
* the permalinks.
|
||||
*/
|
||||
static void ids_changed(void *ignored)
|
||||
{
|
||||
update_permalinks();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Implementation of the drawing API by calling Javascript canvas
|
||||
* drawing functions. (Well, half of it; the other half is on the JS
|
||||
* side.)
|
||||
*/
|
||||
static void js_start_draw(void *handle)
|
||||
{
|
||||
js_canvas_start_draw();
|
||||
}
|
||||
|
||||
static void js_clip(void *handle, int x, int y, int w, int h)
|
||||
{
|
||||
js_canvas_clip_rect(x, y, w, h);
|
||||
}
|
||||
|
||||
static void js_unclip(void *handle)
|
||||
{
|
||||
js_canvas_unclip();
|
||||
}
|
||||
|
||||
static void js_draw_text(void *handle, int x, int y, int fonttype,
|
||||
int fontsize, int align, int colour, char *text)
|
||||
{
|
||||
char fontstyle[80];
|
||||
int halign;
|
||||
|
||||
sprintf(fontstyle, "%dpx %s", fontsize,
|
||||
fonttype == FONT_FIXED ? "monospace" : "sans-serif");
|
||||
|
||||
if (align & ALIGN_VCENTRE)
|
||||
y += js_canvas_find_font_midpoint(fontsize, fontstyle);
|
||||
|
||||
if (align & ALIGN_HCENTRE)
|
||||
halign = 1;
|
||||
else if (align & ALIGN_HRIGHT)
|
||||
halign = 2;
|
||||
else
|
||||
halign = 0;
|
||||
|
||||
js_canvas_draw_text(x, y, halign, colour_strings[colour], fontstyle, text);
|
||||
}
|
||||
|
||||
static void js_draw_rect(void *handle, int x, int y, int w, int h, int colour)
|
||||
{
|
||||
js_canvas_draw_rect(x, y, w, h, colour_strings[colour]);
|
||||
}
|
||||
|
||||
static void js_draw_line(void *handle, int x1, int y1, int x2, int y2,
|
||||
int colour)
|
||||
{
|
||||
js_canvas_draw_line(x1, y1, x2, y2, 1, colour_strings[colour]);
|
||||
}
|
||||
|
||||
static void js_draw_thick_line(void *handle, float thickness,
|
||||
float x1, float y1, float x2, float y2,
|
||||
int colour)
|
||||
{
|
||||
js_canvas_draw_line(x1, y1, x2, y2, thickness, colour_strings[colour]);
|
||||
}
|
||||
|
||||
static void js_draw_poly(void *handle, int *coords, int npoints,
|
||||
int fillcolour, int outlinecolour)
|
||||
{
|
||||
js_canvas_draw_poly(coords, npoints,
|
||||
fillcolour >= 0 ? colour_strings[fillcolour] : NULL,
|
||||
colour_strings[outlinecolour]);
|
||||
}
|
||||
|
||||
static void js_draw_circle(void *handle, int cx, int cy, int radius,
|
||||
int fillcolour, int outlinecolour)
|
||||
{
|
||||
js_canvas_draw_circle(cx, cy, radius,
|
||||
fillcolour >= 0 ? colour_strings[fillcolour] : NULL,
|
||||
colour_strings[outlinecolour]);
|
||||
}
|
||||
|
||||
struct blitter {
|
||||
int id; /* allocated on the js side */
|
||||
int w, h; /* easier to retain here */
|
||||
};
|
||||
|
||||
static blitter *js_blitter_new(void *handle, int w, int h)
|
||||
{
|
||||
blitter *bl = snew(blitter);
|
||||
bl->w = w;
|
||||
bl->h = h;
|
||||
bl->id = js_canvas_new_blitter(w, h);
|
||||
return bl;
|
||||
}
|
||||
|
||||
static void js_blitter_free(void *handle, blitter *bl)
|
||||
{
|
||||
js_canvas_free_blitter(bl->id);
|
||||
sfree(bl);
|
||||
}
|
||||
|
||||
static void trim_rect(int *x, int *y, int *w, int *h)
|
||||
{
|
||||
int x0, x1, y0, y1;
|
||||
|
||||
/*
|
||||
* Reduce the size of the copied rectangle to stop it going
|
||||
* outside the bounds of the canvas.
|
||||
*/
|
||||
|
||||
/* Transform from x,y,w,h form into coordinates of all edges */
|
||||
x0 = *x;
|
||||
y0 = *y;
|
||||
x1 = *x + *w;
|
||||
y1 = *y + *h;
|
||||
|
||||
/* Clip each coordinate at both extremes of the canvas */
|
||||
x0 = (x0 < 0 ? 0 : x0 > canvas_w ? canvas_w : x0);
|
||||
x1 = (x1 < 0 ? 0 : x1 > canvas_w ? canvas_w : x1);
|
||||
y0 = (y0 < 0 ? 0 : y0 > canvas_h ? canvas_h : y0);
|
||||
y1 = (y1 < 0 ? 0 : y1 > canvas_h ? canvas_h : y1);
|
||||
|
||||
/* Transform back into x,y,w,h to return */
|
||||
*x = x0;
|
||||
*y = y0;
|
||||
*w = x1 - x0;
|
||||
*h = y1 - y0;
|
||||
}
|
||||
|
||||
static void js_blitter_save(void *handle, blitter *bl, int x, int y)
|
||||
{
|
||||
int w = bl->w, h = bl->h;
|
||||
trim_rect(&x, &y, &w, &h);
|
||||
if (w > 0 && h > 0)
|
||||
js_canvas_copy_to_blitter(bl->id, x, y, w, h);
|
||||
}
|
||||
|
||||
static void js_blitter_load(void *handle, blitter *bl, int x, int y)
|
||||
{
|
||||
int w = bl->w, h = bl->h;
|
||||
trim_rect(&x, &y, &w, &h);
|
||||
if (w > 0 && h > 0)
|
||||
js_canvas_copy_from_blitter(bl->id, x, y, w, h);
|
||||
}
|
||||
|
||||
static void js_draw_update(void *handle, int x, int y, int w, int h)
|
||||
{
|
||||
trim_rect(&x, &y, &w, &h);
|
||||
if (w > 0 && h > 0)
|
||||
js_canvas_draw_update(x, y, w, h);
|
||||
}
|
||||
|
||||
static void js_end_draw(void *handle)
|
||||
{
|
||||
js_canvas_end_draw();
|
||||
}
|
||||
|
||||
static void js_status_bar(void *handle, char *text)
|
||||
{
|
||||
js_canvas_set_statusbar(text);
|
||||
}
|
||||
|
||||
static char *js_text_fallback(void *handle, const char *const *strings,
|
||||
int nstrings)
|
||||
{
|
||||
return dupstr(strings[0]); /* Emscripten has no trouble with UTF-8 */
|
||||
}
|
||||
|
||||
const struct drawing_api js_drawing = {
|
||||
js_draw_text,
|
||||
js_draw_rect,
|
||||
js_draw_line,
|
||||
js_draw_poly,
|
||||
js_draw_circle,
|
||||
js_draw_update,
|
||||
js_clip,
|
||||
js_unclip,
|
||||
js_start_draw,
|
||||
js_end_draw,
|
||||
js_status_bar,
|
||||
js_blitter_new,
|
||||
js_blitter_free,
|
||||
js_blitter_save,
|
||||
js_blitter_load,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, /* {begin,end}_{doc,page,puzzle} */
|
||||
NULL, NULL, /* line_width, line_dotted */
|
||||
js_text_fallback,
|
||||
js_draw_thick_line,
|
||||
};
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Presets and game-configuration dialog support.
|
||||
*/
|
||||
static game_params **presets;
|
||||
static int npresets;
|
||||
int have_presets_dropdown;
|
||||
|
||||
void populate_js_preset_menu(int menuid, struct preset_menu *menu)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < menu->n_entries; i++) {
|
||||
struct preset_menu_entry *entry = &menu->entries[i];
|
||||
if (entry->params) {
|
||||
presets[entry->id] = entry->params;
|
||||
js_add_preset(menuid, entry->title, entry->id);
|
||||
} else {
|
||||
int js_submenu = js_add_preset_submenu(menuid, entry->title);
|
||||
populate_js_preset_menu(js_submenu, entry->submenu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void select_appropriate_preset(void)
|
||||
{
|
||||
if (have_presets_dropdown) {
|
||||
int preset = midend_which_preset(me);
|
||||
js_select_preset(preset < 0 ? -1 : preset);
|
||||
}
|
||||
}
|
||||
|
||||
static config_item *cfg = NULL;
|
||||
static int cfg_which;
|
||||
|
||||
/*
|
||||
* Set up a dialog box. This is pretty easy on the C side; most of the
|
||||
* work is done in JS.
|
||||
*/
|
||||
static void cfg_start(int which)
|
||||
{
|
||||
char *title;
|
||||
int i;
|
||||
|
||||
cfg = midend_get_config(me, which, &title);
|
||||
cfg_which = which;
|
||||
|
||||
js_dialog_init(title);
|
||||
sfree(title);
|
||||
|
||||
for (i = 0; cfg[i].type != C_END; i++) {
|
||||
switch (cfg[i].type) {
|
||||
case C_STRING:
|
||||
js_dialog_string(i, cfg[i].name, cfg[i].sval);
|
||||
break;
|
||||
case C_BOOLEAN:
|
||||
js_dialog_boolean(i, cfg[i].name, cfg[i].ival);
|
||||
break;
|
||||
case C_CHOICES:
|
||||
js_dialog_choices(i, cfg[i].name, cfg[i].sval, cfg[i].ival);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
js_dialog_launch();
|
||||
}
|
||||
|
||||
/*
|
||||
* Callbacks from JS when the OK button is clicked, to return the
|
||||
* final state of each control.
|
||||
*/
|
||||
void dlg_return_sval(int index, const char *val)
|
||||
{
|
||||
sfree(cfg[index].sval);
|
||||
cfg[index].sval = dupstr(val);
|
||||
}
|
||||
void dlg_return_ival(int index, int val)
|
||||
{
|
||||
cfg[index].ival = val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Called when the user clicks OK or Cancel. use_results will be TRUE
|
||||
* or FALSE respectively, in those cases. We terminate the dialog box,
|
||||
* unless the user selected an invalid combination of parameters.
|
||||
*/
|
||||
static void cfg_end(int use_results)
|
||||
{
|
||||
if (use_results) {
|
||||
/*
|
||||
* User hit OK.
|
||||
*/
|
||||
char *err = midend_set_config(me, cfg_which, cfg);
|
||||
|
||||
if (err) {
|
||||
/*
|
||||
* The settings were unacceptable, so leave the config box
|
||||
* open for the user to adjust them and try again.
|
||||
*/
|
||||
js_error_box(err);
|
||||
} else {
|
||||
/*
|
||||
* New settings are fine; start a new game and close the
|
||||
* dialog.
|
||||
*/
|
||||
select_appropriate_preset();
|
||||
midend_new_game(me);
|
||||
resize();
|
||||
midend_redraw(me);
|
||||
free_cfg(cfg);
|
||||
js_dialog_cleanup();
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
* User hit Cancel. Close the dialog, but also we must still
|
||||
* reselect the right element of the dropdown list.
|
||||
*
|
||||
* (Because: imagine you have a preset selected, and then you
|
||||
* select Custom from the list, but change your mind and hit
|
||||
* Esc. The Custom option will now still be selected in the
|
||||
* list, whereas obviously it should show the preset you still
|
||||
* _actually_ have selected. Worse still, it'll be the visible
|
||||
* rather than invisible Custom option - see the comment in
|
||||
* js_add_preset in emcclib.js - so you won't even be able to
|
||||
* select Custom without a faffy workaround.)
|
||||
*/
|
||||
select_appropriate_preset();
|
||||
|
||||
free_cfg(cfg);
|
||||
js_dialog_cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Called from JS when a command is given to the puzzle by clicking a
|
||||
* button or control of some sort.
|
||||
*/
|
||||
void command(int n)
|
||||
{
|
||||
switch (n) {
|
||||
case 0: /* specific game ID */
|
||||
cfg_start(CFG_DESC);
|
||||
break;
|
||||
case 1: /* random game seed */
|
||||
cfg_start(CFG_SEED);
|
||||
break;
|
||||
case 2: /* game parameter dropdown changed */
|
||||
{
|
||||
int i = js_get_selected_preset();
|
||||
if (i < 0) {
|
||||
/*
|
||||
* The user selected 'Custom', so launch the config
|
||||
* box.
|
||||
*/
|
||||
if (thegame.can_configure) /* (double-check just in case) */
|
||||
cfg_start(CFG_SETTINGS);
|
||||
} else {
|
||||
/*
|
||||
* The user selected a preset, so just switch straight
|
||||
* to that.
|
||||
*/
|
||||
assert(i < npresets);
|
||||
midend_set_params(me, presets[i]);
|
||||
midend_new_game(me);
|
||||
resize();
|
||||
midend_redraw(me);
|
||||
update_undo_redo();
|
||||
js_focus_canvas();
|
||||
select_appropriate_preset();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3: /* OK clicked in a config box */
|
||||
cfg_end(TRUE);
|
||||
update_undo_redo();
|
||||
break;
|
||||
case 4: /* Cancel clicked in a config box */
|
||||
cfg_end(FALSE);
|
||||
update_undo_redo();
|
||||
break;
|
||||
case 5: /* New Game */
|
||||
midend_process_key(me, 0, 0, 'n');
|
||||
update_undo_redo();
|
||||
js_focus_canvas();
|
||||
break;
|
||||
case 6: /* Restart */
|
||||
midend_restart_game(me);
|
||||
update_undo_redo();
|
||||
js_focus_canvas();
|
||||
break;
|
||||
case 7: /* Undo */
|
||||
midend_process_key(me, 0, 0, 'u');
|
||||
update_undo_redo();
|
||||
js_focus_canvas();
|
||||
break;
|
||||
case 8: /* Redo */
|
||||
midend_process_key(me, 0, 0, 'r');
|
||||
update_undo_redo();
|
||||
js_focus_canvas();
|
||||
break;
|
||||
case 9: /* Solve */
|
||||
if (thegame.can_solve) {
|
||||
char *msg = midend_solve(me);
|
||||
if (msg)
|
||||
js_error_box(msg);
|
||||
}
|
||||
update_undo_redo();
|
||||
js_focus_canvas();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Setup function called at page load time. It's called main() because
|
||||
* that's the most convenient thing in Emscripten, but it's not main()
|
||||
* in the usual sense of bounding the program's entire execution.
|
||||
* Instead, this function returns once the initial puzzle is set up
|
||||
* and working, and everything thereafter happens by means of JS event
|
||||
* handlers sending us callbacks.
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *param_err;
|
||||
float *colours;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Instantiate a midend.
|
||||
*/
|
||||
me = midend_new(NULL, &thegame, &js_drawing, NULL);
|
||||
|
||||
/*
|
||||
* Chuck in the HTML fragment ID if we have one (trimming the
|
||||
* leading # off the front first). If that's invalid, we retain
|
||||
* the error message and will display it at the end, after setting
|
||||
* up a random puzzle as usual.
|
||||
*/
|
||||
if (argc > 1 && argv[1][0] == '#' && argv[1][1] != '\0')
|
||||
param_err = midend_game_id(me, argv[1] + 1);
|
||||
else
|
||||
param_err = NULL;
|
||||
|
||||
/*
|
||||
* Create either a random game or the specified one, and set the
|
||||
* canvas size appropriately.
|
||||
*/
|
||||
midend_new_game(me);
|
||||
resize();
|
||||
|
||||
/*
|
||||
* Create a status bar, if needed.
|
||||
*/
|
||||
if (midend_wants_statusbar(me))
|
||||
js_canvas_make_statusbar();
|
||||
|
||||
/*
|
||||
* Set up the game-type dropdown with presets and/or the Custom
|
||||
* option.
|
||||
*/
|
||||
{
|
||||
struct preset_menu *menu = midend_get_presets(me, &npresets);
|
||||
presets = snewn(npresets, game_params *);
|
||||
for (i = 0; i < npresets; i++)
|
||||
presets[i] = NULL;
|
||||
|
||||
populate_js_preset_menu(0, menu);
|
||||
|
||||
if (thegame.can_configure)
|
||||
js_add_preset(0, "Custom", -1);
|
||||
|
||||
have_presets_dropdown = TRUE;
|
||||
|
||||
/*
|
||||
* Now ensure the appropriate element of the presets menu
|
||||
* starts off selected, in case it isn't the first one in the
|
||||
* list (e.g. Slant).
|
||||
*/
|
||||
select_appropriate_preset();
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the Solve button if the game doesn't support it.
|
||||
*/
|
||||
if (!thegame.can_solve)
|
||||
js_remove_solve_button();
|
||||
|
||||
/*
|
||||
* Retrieve the game's colours, and convert them into #abcdef type
|
||||
* hex ID strings.
|
||||
*/
|
||||
colours = midend_colours(me, &ncolours);
|
||||
colour_strings = snewn(ncolours, char *);
|
||||
for (i = 0; i < ncolours; i++) {
|
||||
char col[40];
|
||||
sprintf(col, "#%02x%02x%02x",
|
||||
(unsigned)(0.5 + 255 * colours[i*3+0]),
|
||||
(unsigned)(0.5 + 255 * colours[i*3+1]),
|
||||
(unsigned)(0.5 + 255 * colours[i*3+2]));
|
||||
colour_strings[i] = dupstr(col);
|
||||
}
|
||||
|
||||
/*
|
||||
* Request notification when the game ids change (e.g. if the user
|
||||
* presses 'n', and also when Mines supersedes its game
|
||||
* description), so that we can proactively update the permalink.
|
||||
*/
|
||||
midend_request_id_changes(me, ids_changed, NULL);
|
||||
|
||||
/*
|
||||
* Draw the puzzle's initial state, and set up the permalinks and
|
||||
* undo/redo greying out.
|
||||
*/
|
||||
midend_redraw(me);
|
||||
update_permalinks();
|
||||
update_undo_redo();
|
||||
|
||||
/*
|
||||
* If we were given an erroneous game ID in argv[1], now's the
|
||||
* time to put up the error box about it, after we've fully set up
|
||||
* a random puzzle. Then when the user clicks 'ok', we have a
|
||||
* puzzle for them.
|
||||
*/
|
||||
if (param_err)
|
||||
js_error_box(param_err);
|
||||
|
||||
/*
|
||||
* Done. Return to JS, and await callbacks!
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
752
apps/plugins/puzzles/src/emcclib.js
Normal file
752
apps/plugins/puzzles/src/emcclib.js
Normal file
|
|
@ -0,0 +1,752 @@
|
|||
/*
|
||||
* emcclib.js: one of the Javascript components of an Emscripten-based
|
||||
* web/Javascript front end for Puzzles.
|
||||
*
|
||||
* The other parts of this system live in emcc.c and emccpre.js. It
|
||||
* also depends on being run in the context of a web page containing
|
||||
* an appropriate collection of bits and pieces (a canvas, some
|
||||
* buttons and links etc), which is generated for each puzzle by the
|
||||
* script html/jspage.pl.
|
||||
*
|
||||
* This file contains a set of Javascript functions which we insert
|
||||
* into Emscripten's library object via the --js-library option; this
|
||||
* allows us to provide JS code which can be called from the
|
||||
* Emscripten-compiled C, mostly dealing with UI interaction of
|
||||
* various kinds.
|
||||
*/
|
||||
|
||||
mergeInto(LibraryManager.library, {
|
||||
/*
|
||||
* void js_debug(const char *message);
|
||||
*
|
||||
* A function to write a diagnostic to the Javascript console.
|
||||
* Unused in production, but handy in development.
|
||||
*/
|
||||
js_debug: function(ptr) {
|
||||
console.log(Pointer_stringify(ptr));
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_error_box(const char *message);
|
||||
*
|
||||
* A wrapper around Javascript's alert(), so the C code can print
|
||||
* simple error message boxes (e.g. when invalid data is entered
|
||||
* in a configuration dialog).
|
||||
*/
|
||||
js_error_box: function(ptr) {
|
||||
alert(Pointer_stringify(ptr));
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_remove_type_dropdown(void);
|
||||
*
|
||||
* Get rid of the drop-down list on the web page for selecting
|
||||
* game presets. Called at setup time if the game back end
|
||||
* provides neither presets nor configurability.
|
||||
*/
|
||||
js_remove_type_dropdown: function() {
|
||||
gametypelist.style.display = "none";
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_remove_solve_button(void);
|
||||
*
|
||||
* Get rid of the Solve button on the web page. Called at setup
|
||||
* time if the game doesn't support an in-game solve function.
|
||||
*/
|
||||
js_remove_solve_button: function() {
|
||||
document.getElementById("solve").style.display = "none";
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_add_preset(int menuid, const char *name, int value);
|
||||
*
|
||||
* Add a preset to the drop-down types menu, or to a submenu of
|
||||
* it. 'menuid' specifies an index into our array of submenus
|
||||
* where the item might be placed; 'value' specifies the number
|
||||
* that js_get_selected_preset() will return when this item is
|
||||
* clicked.
|
||||
*/
|
||||
js_add_preset: function(menuid, ptr, value) {
|
||||
var name = Pointer_stringify(ptr);
|
||||
var item = document.createElement("li");
|
||||
item.setAttribute("data-index", value);
|
||||
var tick = document.createElement("span");
|
||||
tick.appendChild(document.createTextNode("\u2713"));
|
||||
tick.style.color = "transparent";
|
||||
tick.style.paddingRight = "0.5em";
|
||||
item.appendChild(tick);
|
||||
item.appendChild(document.createTextNode(name));
|
||||
gametypesubmenus[menuid].appendChild(item);
|
||||
gametypeitems.push(item);
|
||||
|
||||
item.onclick = function(event) {
|
||||
if (dlg_dimmer === null) {
|
||||
gametypeselectedindex = value;
|
||||
command(2);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* int js_add_preset_submenu(int menuid, const char *name);
|
||||
*
|
||||
* Add a submenu in the presets menu hierarchy. Returns its index,
|
||||
* for passing as the 'menuid' argument in further calls to
|
||||
* js_add_preset or this function.
|
||||
*/
|
||||
js_add_preset_submenu: function(menuid, ptr, value) {
|
||||
var name = Pointer_stringify(ptr);
|
||||
var item = document.createElement("li");
|
||||
// We still create a transparent tick element, even though it
|
||||
// won't ever be selected, to make submenu titles line up
|
||||
// nicely with their neighbours.
|
||||
var tick = document.createElement("span");
|
||||
tick.appendChild(document.createTextNode("\u2713"));
|
||||
tick.style.color = "transparent";
|
||||
tick.style.paddingRight = "0.5em";
|
||||
item.appendChild(tick);
|
||||
item.appendChild(document.createTextNode(name));
|
||||
var submenu = document.createElement("ul");
|
||||
submenu.className = "left";
|
||||
item.appendChild(submenu);
|
||||
gametypesubmenus[menuid].appendChild(item);
|
||||
var toret = gametypesubmenus.length;
|
||||
gametypesubmenus.push(submenu);
|
||||
return toret;
|
||||
},
|
||||
|
||||
/*
|
||||
* int js_get_selected_preset(void);
|
||||
*
|
||||
* Return the index of the currently selected value in the type
|
||||
* dropdown.
|
||||
*/
|
||||
js_get_selected_preset: function() {
|
||||
return gametypeselectedindex;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_select_preset(int n);
|
||||
*
|
||||
* Cause a different value to be selected in the type dropdown
|
||||
* (for when the user selects values from the Custom configurer
|
||||
* which turn out to exactly match a preset).
|
||||
*/
|
||||
js_select_preset: function(n) {
|
||||
gametypeselectedindex = n;
|
||||
for (var i in gametypeitems) {
|
||||
var item = gametypeitems[i];
|
||||
var tick = item.firstChild;
|
||||
if (item.getAttribute("data-index") == n) {
|
||||
tick.style.color = "inherit";
|
||||
} else {
|
||||
tick.style.color = "transparent";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_get_date_64(unsigned *p);
|
||||
*
|
||||
* Return the current date, in milliseconds since the epoch
|
||||
* (Javascript's native format), as a 64-bit integer. Used to
|
||||
* invent an initial random seed for puzzle generation.
|
||||
*/
|
||||
js_get_date_64: function(ptr) {
|
||||
var d = (new Date()).valueOf();
|
||||
setValue(ptr, d, 'i64');
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_update_permalinks(const char *desc, const char *seed);
|
||||
*
|
||||
* Update the permalinks on the web page for a new game
|
||||
* description and optional random seed. desc can never be NULL,
|
||||
* but seed might be (if the game was generated by entering a
|
||||
* descriptive id by hand), in which case we suppress display of
|
||||
* the random seed permalink.
|
||||
*/
|
||||
js_update_permalinks: function(desc, seed) {
|
||||
desc = Pointer_stringify(desc);
|
||||
permalink_desc.href = "#" + desc;
|
||||
|
||||
if (seed == 0) {
|
||||
permalink_seed.style.display = "none";
|
||||
} else {
|
||||
seed = Pointer_stringify(seed);
|
||||
permalink_seed.href = "#" + seed;
|
||||
permalink_seed.style.display = "inline";
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_enable_undo_redo(int undo, int redo);
|
||||
*
|
||||
* Set the enabled/disabled states of the undo and redo buttons,
|
||||
* after a move.
|
||||
*/
|
||||
js_enable_undo_redo: function(undo, redo) {
|
||||
disable_menu_item(undo_button, (undo == 0));
|
||||
disable_menu_item(redo_button, (redo == 0));
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_activate_timer();
|
||||
*
|
||||
* Start calling the C timer_callback() function every 20ms.
|
||||
*/
|
||||
js_activate_timer: function() {
|
||||
if (timer === null) {
|
||||
timer_reference_date = (new Date()).valueOf();
|
||||
timer = setInterval(function() {
|
||||
var now = (new Date()).valueOf();
|
||||
timer_callback((now - timer_reference_date) / 1000.0);
|
||||
timer_reference_date = now;
|
||||
return true;
|
||||
}, 20);
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_deactivate_timer();
|
||||
*
|
||||
* Stop calling the C timer_callback() function every 20ms.
|
||||
*/
|
||||
js_deactivate_timer: function() {
|
||||
if (timer !== null) {
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_start_draw(void);
|
||||
*
|
||||
* Prepare to do some drawing on the canvas.
|
||||
*/
|
||||
js_canvas_start_draw: function() {
|
||||
ctx = offscreen_canvas.getContext('2d');
|
||||
update_xmin = update_xmax = update_ymin = update_ymax = undefined;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_draw_update(int x, int y, int w, int h);
|
||||
*
|
||||
* Mark a rectangle of the off-screen canvas as needing to be
|
||||
* copied to the on-screen one.
|
||||
*/
|
||||
js_canvas_draw_update: function(x, y, w, h) {
|
||||
/*
|
||||
* Currently we do this in a really simple way, just by taking
|
||||
* the smallest rectangle containing all updates so far. We
|
||||
* could instead keep the data in a richer form (e.g. retain
|
||||
* multiple smaller rectangles needing update, and only redraw
|
||||
* the whole thing beyond a certain threshold) but this will
|
||||
* do for now.
|
||||
*/
|
||||
if (update_xmin === undefined || update_xmin > x) update_xmin = x;
|
||||
if (update_ymin === undefined || update_ymin > y) update_ymin = y;
|
||||
if (update_xmax === undefined || update_xmax < x+w) update_xmax = x+w;
|
||||
if (update_ymax === undefined || update_ymax < y+h) update_ymax = y+h;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_end_draw(void);
|
||||
*
|
||||
* Finish the drawing, by actually copying the newly drawn stuff
|
||||
* to the on-screen canvas.
|
||||
*/
|
||||
js_canvas_end_draw: function() {
|
||||
if (update_xmin !== undefined) {
|
||||
var onscreen_ctx = onscreen_canvas.getContext('2d');
|
||||
onscreen_ctx.drawImage(offscreen_canvas,
|
||||
update_xmin, update_ymin,
|
||||
update_xmax - update_xmin,
|
||||
update_ymax - update_ymin,
|
||||
update_xmin, update_ymin,
|
||||
update_xmax - update_xmin,
|
||||
update_ymax - update_ymin);
|
||||
}
|
||||
ctx = null;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_draw_rect(int x, int y, int w, int h,
|
||||
* const char *colour);
|
||||
*
|
||||
* Draw a rectangle.
|
||||
*/
|
||||
js_canvas_draw_rect: function(x, y, w, h, colptr) {
|
||||
ctx.fillStyle = Pointer_stringify(colptr);
|
||||
ctx.fillRect(x, y, w, h);
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_clip_rect(int x, int y, int w, int h);
|
||||
*
|
||||
* Set a clipping rectangle.
|
||||
*/
|
||||
js_canvas_clip_rect: function(x, y, w, h) {
|
||||
ctx.save();
|
||||
ctx.beginPath();
|
||||
ctx.rect(x, y, w, h);
|
||||
ctx.clip();
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_unclip(void);
|
||||
*
|
||||
* Reset to no clipping.
|
||||
*/
|
||||
js_canvas_unclip: function() {
|
||||
ctx.restore();
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_draw_line(float x1, float y1, float x2, float y2,
|
||||
* int width, const char *colour);
|
||||
*
|
||||
* Draw a line. We must adjust the coordinates by 0.5 because
|
||||
* Javascript's canvas coordinates appear to be pixel corners,
|
||||
* whereas we want pixel centres. Also, we manually draw the pixel
|
||||
* at each end of the line, which our clients will expect but
|
||||
* Javascript won't reliably do by default (in common with other
|
||||
* Postscriptish drawing frameworks).
|
||||
*/
|
||||
js_canvas_draw_line: function(x1, y1, x2, y2, width, colour) {
|
||||
colour = Pointer_stringify(colour);
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x1 + 0.5, y1 + 0.5);
|
||||
ctx.lineTo(x2 + 0.5, y2 + 0.5);
|
||||
ctx.lineWidth = width;
|
||||
ctx.lineCap = 'round';
|
||||
ctx.lineJoin = 'round';
|
||||
ctx.strokeStyle = colour;
|
||||
ctx.stroke();
|
||||
ctx.fillStyle = colour;
|
||||
ctx.fillRect(x1, y1, 1, 1);
|
||||
ctx.fillRect(x2, y2, 1, 1);
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_draw_poly(int *points, int npoints,
|
||||
* const char *fillcolour,
|
||||
* const char *outlinecolour);
|
||||
*
|
||||
* Draw a polygon.
|
||||
*/
|
||||
js_canvas_draw_poly: function(pointptr, npoints, fill, outline) {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(getValue(pointptr , 'i32') + 0.5,
|
||||
getValue(pointptr+4, 'i32') + 0.5);
|
||||
for (var i = 1; i < npoints; i++)
|
||||
ctx.lineTo(getValue(pointptr+8*i , 'i32') + 0.5,
|
||||
getValue(pointptr+8*i+4, 'i32') + 0.5);
|
||||
ctx.closePath();
|
||||
if (fill != 0) {
|
||||
ctx.fillStyle = Pointer_stringify(fill);
|
||||
ctx.fill();
|
||||
}
|
||||
ctx.lineWidth = '1';
|
||||
ctx.lineCap = 'round';
|
||||
ctx.lineJoin = 'round';
|
||||
ctx.strokeStyle = Pointer_stringify(outline);
|
||||
ctx.stroke();
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_draw_circle(int x, int y, int r,
|
||||
* const char *fillcolour,
|
||||
* const char *outlinecolour);
|
||||
*
|
||||
* Draw a circle.
|
||||
*/
|
||||
js_canvas_draw_circle: function(x, y, r, fill, outline) {
|
||||
ctx.beginPath();
|
||||
ctx.arc(x + 0.5, y + 0.5, r, 0, 2*Math.PI);
|
||||
if (fill != 0) {
|
||||
ctx.fillStyle = Pointer_stringify(fill);
|
||||
ctx.fill();
|
||||
}
|
||||
ctx.lineWidth = '1';
|
||||
ctx.lineCap = 'round';
|
||||
ctx.lineJoin = 'round';
|
||||
ctx.strokeStyle = Pointer_stringify(outline);
|
||||
ctx.stroke();
|
||||
},
|
||||
|
||||
/*
|
||||
* int js_canvas_find_font_midpoint(int height, const char *fontptr);
|
||||
*
|
||||
* Return the adjustment required for text displayed using
|
||||
* ALIGN_VCENTRE. We want to place the midpoint between the
|
||||
* baseline and the cap-height at the specified position; so this
|
||||
* function returns the adjustment which, when added to the
|
||||
* desired centre point, returns the y-coordinate at which you
|
||||
* should put the baseline.
|
||||
*
|
||||
* There is no sensible method of querying this kind of font
|
||||
* metric in Javascript, so instead we render a piece of test text
|
||||
* to a throwaway offscreen canvas and then read the pixel data
|
||||
* back out to find the highest and lowest pixels. That's good
|
||||
* _enough_ (in that we only needed the answer to the nearest
|
||||
* pixel anyway), but rather disgusting!
|
||||
*
|
||||
* Since this is a very expensive operation, we cache the results
|
||||
* per (font,height) pair.
|
||||
*/
|
||||
js_canvas_find_font_midpoint: function(height, font) {
|
||||
font = Pointer_stringify(font);
|
||||
|
||||
// Reuse cached value if possible
|
||||
if (midpoint_cache[font] !== undefined)
|
||||
return midpoint_cache[font];
|
||||
|
||||
// Find the width of the string
|
||||
var ctx1 = onscreen_canvas.getContext('2d');
|
||||
ctx1.font = font;
|
||||
var width = (ctx1.measureText(midpoint_test_str).width + 1) | 0;
|
||||
|
||||
// Construct a test canvas of appropriate size, initialise it to
|
||||
// black, and draw the string on it in white
|
||||
var measure_canvas = document.createElement('canvas');
|
||||
var ctx2 = measure_canvas.getContext('2d');
|
||||
ctx2.canvas.width = width;
|
||||
ctx2.canvas.height = 2*height;
|
||||
ctx2.fillStyle = "#000000";
|
||||
ctx2.fillRect(0, 0, width, 2*height);
|
||||
var baseline = (1.5*height) | 0;
|
||||
ctx2.fillStyle = "#ffffff";
|
||||
ctx2.font = font;
|
||||
ctx2.fillText(midpoint_test_str, 0, baseline);
|
||||
|
||||
// Scan the contents of the test canvas to find the top and bottom
|
||||
// set pixels.
|
||||
var pixels = ctx2.getImageData(0, 0, width, 2*height).data;
|
||||
var ymin = 2*height, ymax = -1;
|
||||
for (var y = 0; y < 2*height; y++) {
|
||||
for (var x = 0; x < width; x++) {
|
||||
if (pixels[4*(y*width+x)] != 0) {
|
||||
if (ymin > y) ymin = y;
|
||||
if (ymax < y) ymax = y;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var ret = (baseline - (ymin + ymax) / 2) | 0;
|
||||
midpoint_cache[font] = ret;
|
||||
return ret;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_draw_text(int x, int y, int halign,
|
||||
* const char *colptr, const char *fontptr,
|
||||
* const char *text);
|
||||
*
|
||||
* Draw text. Vertical alignment has been taken care of on the C
|
||||
* side, by optionally calling the above function. Horizontal
|
||||
* alignment is handled here, since we can get the canvas draw
|
||||
* function to do it for us with almost no extra effort.
|
||||
*/
|
||||
js_canvas_draw_text: function(x, y, halign, colptr, fontptr, text) {
|
||||
ctx.font = Pointer_stringify(fontptr);
|
||||
ctx.fillStyle = Pointer_stringify(colptr);
|
||||
ctx.textAlign = (halign == 0 ? 'left' :
|
||||
halign == 1 ? 'center' : 'right');
|
||||
ctx.textBaseline = 'alphabetic';
|
||||
ctx.fillText(Pointer_stringify(text), x, y);
|
||||
},
|
||||
|
||||
/*
|
||||
* int js_canvas_new_blitter(int w, int h);
|
||||
*
|
||||
* Create a new blitter object, which is just an offscreen canvas
|
||||
* of the specified size.
|
||||
*/
|
||||
js_canvas_new_blitter: function(w, h) {
|
||||
var id = blittercount++;
|
||||
blitters[id] = document.createElement("canvas");
|
||||
blitters[id].width = w;
|
||||
blitters[id].height = h;
|
||||
return id;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_free_blitter(int id);
|
||||
*
|
||||
* Free a blitter (or rather, destroy our reference to it so JS
|
||||
* can garbage-collect it, and also enforce that we don't
|
||||
* accidentally use it again afterwards).
|
||||
*/
|
||||
js_canvas_free_blitter: function(id) {
|
||||
blitters[id] = null;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_copy_to_blitter(int id, int x, int y, int w, int h);
|
||||
*
|
||||
* Copy from the puzzle image to a blitter. The size is passed to
|
||||
* us, partly so we don't have to remember the size of each
|
||||
* blitter, but mostly so that the C side can adjust the copy
|
||||
* rectangle in the case where it partially overlaps the edge of
|
||||
* the screen.
|
||||
*/
|
||||
js_canvas_copy_to_blitter: function(id, x, y, w, h) {
|
||||
var blitter_ctx = blitters[id].getContext('2d');
|
||||
blitter_ctx.drawImage(offscreen_canvas,
|
||||
x, y, w, h,
|
||||
0, 0, w, h);
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_copy_from_blitter(int id, int x, int y, int w, int h);
|
||||
*
|
||||
* Copy from a blitter back to the puzzle image. As above, the
|
||||
* size of the copied rectangle is passed to us from the C side
|
||||
* and may already have been modified.
|
||||
*/
|
||||
js_canvas_copy_from_blitter: function(id, x, y, w, h) {
|
||||
ctx.drawImage(blitters[id],
|
||||
0, 0, w, h,
|
||||
x, y, w, h);
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_make_statusbar(void);
|
||||
*
|
||||
* Cause a status bar to exist. Called at setup time if the puzzle
|
||||
* back end turns out to want one.
|
||||
*/
|
||||
js_canvas_make_statusbar: function() {
|
||||
var statusholder = document.getElementById("statusbarholder");
|
||||
statusbar = document.createElement("div");
|
||||
statusbar.style.overflow = "hidden";
|
||||
statusbar.style.width = (onscreen_canvas.width - 4) + "px";
|
||||
statusholder.style.width = onscreen_canvas.width + "px";
|
||||
statusbar.style.height = "1.2em";
|
||||
statusbar.style.textAlign = "left";
|
||||
statusbar.style.background = "#d8d8d8";
|
||||
statusbar.style.borderLeft = '2px solid #c8c8c8';
|
||||
statusbar.style.borderTop = '2px solid #c8c8c8';
|
||||
statusbar.style.borderRight = '2px solid #e8e8e8';
|
||||
statusbar.style.borderBottom = '2px solid #e8e8e8';
|
||||
statusbar.appendChild(document.createTextNode(" "));
|
||||
statusholder.appendChild(statusbar);
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_set_statusbar(const char *text);
|
||||
*
|
||||
* Set the text in the status bar.
|
||||
*/
|
||||
js_canvas_set_statusbar: function(ptr) {
|
||||
var text = Pointer_stringify(ptr);
|
||||
statusbar.replaceChild(document.createTextNode(text),
|
||||
statusbar.lastChild);
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_canvas_set_size(int w, int h);
|
||||
*
|
||||
* Set the size of the puzzle canvas. Called at setup, and every
|
||||
* time the user picks new puzzle settings requiring a different
|
||||
* size.
|
||||
*/
|
||||
js_canvas_set_size: function(w, h) {
|
||||
onscreen_canvas.width = w;
|
||||
offscreen_canvas.width = w;
|
||||
if (statusbar !== null) {
|
||||
statusbar.style.width = (w - 4) + "px";
|
||||
document.getElementById("statusbarholder").style.width = w + "px";
|
||||
}
|
||||
resizable_div.style.width = w + "px";
|
||||
|
||||
onscreen_canvas.height = h;
|
||||
offscreen_canvas.height = h;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_dialog_init(const char *title);
|
||||
*
|
||||
* Begin constructing a 'dialog box' which will be popped up in an
|
||||
* overlay on top of the rest of the puzzle web page.
|
||||
*/
|
||||
js_dialog_init: function(titletext) {
|
||||
// Create an overlay on the page which darkens everything
|
||||
// beneath it.
|
||||
dlg_dimmer = document.createElement("div");
|
||||
dlg_dimmer.style.width = "100%";
|
||||
dlg_dimmer.style.height = "100%";
|
||||
dlg_dimmer.style.background = '#000000';
|
||||
dlg_dimmer.style.position = 'fixed';
|
||||
dlg_dimmer.style.opacity = 0.3;
|
||||
dlg_dimmer.style.top = dlg_dimmer.style.left = 0;
|
||||
dlg_dimmer.style["z-index"] = 99;
|
||||
|
||||
// Now create a form which sits on top of that in turn.
|
||||
dlg_form = document.createElement("form");
|
||||
dlg_form.style.width = (window.innerWidth * 2 / 3) + "px";
|
||||
dlg_form.style.opacity = 1;
|
||||
dlg_form.style.background = '#ffffff';
|
||||
dlg_form.style.color = '#000000';
|
||||
dlg_form.style.position = 'absolute';
|
||||
dlg_form.style.border = "2px solid black";
|
||||
dlg_form.style.padding = "20px";
|
||||
dlg_form.style.top = (window.innerHeight / 10) + "px";
|
||||
dlg_form.style.left = (window.innerWidth / 6) + "px";
|
||||
dlg_form.style["z-index"] = 100;
|
||||
|
||||
var title = document.createElement("p");
|
||||
title.style.marginTop = "0px";
|
||||
title.appendChild(document.createTextNode
|
||||
(Pointer_stringify(titletext)));
|
||||
dlg_form.appendChild(title);
|
||||
|
||||
dlg_return_funcs = [];
|
||||
dlg_next_id = 0;
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_dialog_string(int i, const char *title, const char *initvalue);
|
||||
*
|
||||
* Add a string control (that is, an edit box) to the dialog under
|
||||
* construction.
|
||||
*/
|
||||
js_dialog_string: function(index, title, initialtext) {
|
||||
dlg_form.appendChild(document.createTextNode(Pointer_stringify(title)));
|
||||
var editbox = document.createElement("input");
|
||||
editbox.type = "text";
|
||||
editbox.value = Pointer_stringify(initialtext);
|
||||
dlg_form.appendChild(editbox);
|
||||
dlg_form.appendChild(document.createElement("br"));
|
||||
|
||||
dlg_return_funcs.push(function() {
|
||||
dlg_return_sval(index, editbox.value);
|
||||
});
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_dialog_choices(int i, const char *title, const char *choicelist,
|
||||
* int initvalue);
|
||||
*
|
||||
* Add a choices control (i.e. a drop-down list) to the dialog
|
||||
* under construction. The 'choicelist' parameter is unchanged
|
||||
* from the way the puzzle back end will have supplied it: i.e.
|
||||
* it's still encoded as a single string whose first character
|
||||
* gives the separator.
|
||||
*/
|
||||
js_dialog_choices: function(index, title, choicelist, initvalue) {
|
||||
dlg_form.appendChild(document.createTextNode(Pointer_stringify(title)));
|
||||
var dropdown = document.createElement("select");
|
||||
var choicestr = Pointer_stringify(choicelist);
|
||||
var items = choicestr.slice(1).split(choicestr[0]);
|
||||
var options = [];
|
||||
for (var i in items) {
|
||||
var option = document.createElement("option");
|
||||
option.value = i;
|
||||
option.appendChild(document.createTextNode(items[i]));
|
||||
if (i == initvalue) option.selected = true;
|
||||
dropdown.appendChild(option);
|
||||
options.push(option);
|
||||
}
|
||||
dlg_form.appendChild(dropdown);
|
||||
dlg_form.appendChild(document.createElement("br"));
|
||||
|
||||
dlg_return_funcs.push(function() {
|
||||
var val = 0;
|
||||
for (var i in options) {
|
||||
if (options[i].selected) {
|
||||
val = options[i].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
dlg_return_ival(index, val);
|
||||
});
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_dialog_boolean(int i, const char *title, int initvalue);
|
||||
*
|
||||
* Add a boolean control (a checkbox) to the dialog under
|
||||
* construction. Checkboxes are generally expected to be sensitive
|
||||
* on their label text as well as the box itself, so for this
|
||||
* control we create an actual label rather than merely a text
|
||||
* node (and hence we must allocate an id to the checkbox so that
|
||||
* the label can refer to it).
|
||||
*/
|
||||
js_dialog_boolean: function(index, title, initvalue) {
|
||||
var checkbox = document.createElement("input");
|
||||
checkbox.type = "checkbox";
|
||||
checkbox.id = "cb" + String(dlg_next_id++);
|
||||
checkbox.checked = (initvalue != 0);
|
||||
dlg_form.appendChild(checkbox);
|
||||
var checkboxlabel = document.createElement("label");
|
||||
checkboxlabel.setAttribute("for", checkbox.id);
|
||||
checkboxlabel.textContent = Pointer_stringify(title);
|
||||
dlg_form.appendChild(checkboxlabel);
|
||||
dlg_form.appendChild(document.createElement("br"));
|
||||
|
||||
dlg_return_funcs.push(function() {
|
||||
dlg_return_ival(index, checkbox.checked ? 1 : 0);
|
||||
});
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_dialog_launch(void);
|
||||
*
|
||||
* Finish constructing a dialog, and actually display it, dimming
|
||||
* everything else on the page.
|
||||
*/
|
||||
js_dialog_launch: function() {
|
||||
// Put in the OK and Cancel buttons at the bottom.
|
||||
var button;
|
||||
|
||||
button = document.createElement("input");
|
||||
button.type = "button";
|
||||
button.value = "OK";
|
||||
button.onclick = function(event) {
|
||||
for (var i in dlg_return_funcs)
|
||||
dlg_return_funcs[i]();
|
||||
command(3);
|
||||
}
|
||||
dlg_form.appendChild(button);
|
||||
|
||||
button = document.createElement("input");
|
||||
button.type = "button";
|
||||
button.value = "Cancel";
|
||||
button.onclick = function(event) {
|
||||
command(4);
|
||||
}
|
||||
dlg_form.appendChild(button);
|
||||
|
||||
document.body.appendChild(dlg_dimmer);
|
||||
document.body.appendChild(dlg_form);
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_dialog_cleanup(void);
|
||||
*
|
||||
* Stop displaying a dialog, and clean up the internal state
|
||||
* associated with it.
|
||||
*/
|
||||
js_dialog_cleanup: function() {
|
||||
document.body.removeChild(dlg_dimmer);
|
||||
document.body.removeChild(dlg_form);
|
||||
dlg_dimmer = dlg_form = null;
|
||||
onscreen_canvas.focus();
|
||||
},
|
||||
|
||||
/*
|
||||
* void js_focus_canvas(void);
|
||||
*
|
||||
* Return keyboard focus to the puzzle canvas. Called after a
|
||||
* puzzle-control button is pressed, which tends to have the side
|
||||
* effect of taking focus away from the canvas.
|
||||
*/
|
||||
js_focus_canvas: function() {
|
||||
onscreen_canvas.focus();
|
||||
}
|
||||
});
|
||||
359
apps/plugins/puzzles/src/emccpre.js
Normal file
359
apps/plugins/puzzles/src/emccpre.js
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
/*
|
||||
* emccpre.js: one of the Javascript components of an Emscripten-based
|
||||
* web/Javascript front end for Puzzles.
|
||||
*
|
||||
* The other parts of this system live in emcc.c and emcclib.js. It
|
||||
* also depends on being run in the context of a web page containing
|
||||
* an appropriate collection of bits and pieces (a canvas, some
|
||||
* buttons and links etc), which is generated for each puzzle by the
|
||||
* script html/jspage.pl.
|
||||
*
|
||||
* This file contains the Javascript code which is prefixed unmodified
|
||||
* to Emscripten's output via the --pre-js option. It declares all our
|
||||
* global variables, and provides the puzzle init function and a
|
||||
* couple of other helper functions.
|
||||
*/
|
||||
|
||||
// To avoid flicker while doing complicated drawing, we use two
|
||||
// canvases, the same size. One is actually on the web page, and the
|
||||
// other is off-screen. We do all our drawing on the off-screen one
|
||||
// first, and then copy rectangles of it to the on-screen canvas in
|
||||
// response to draw_update() calls by the game backend.
|
||||
var onscreen_canvas, offscreen_canvas;
|
||||
|
||||
// A persistent drawing context for the offscreen canvas, to save
|
||||
// constructing one per individual graphics operation.
|
||||
var ctx;
|
||||
|
||||
// Bounding rectangle for the copy to the onscreen canvas that will be
|
||||
// done at drawing end time. Updated by js_canvas_draw_update and used
|
||||
// by js_canvas_end_draw.
|
||||
var update_xmin, update_xmax, update_ymin, update_ymax;
|
||||
|
||||
// Module object for Emscripten. We fill in these parameters to ensure
|
||||
// that Module.run() won't be called until we're ready (we want to do
|
||||
// our own init stuff first), and that when main() returns nothing
|
||||
// will get cleaned up so we remain able to call the puzzle's various
|
||||
// callbacks.
|
||||
var Module = {
|
||||
'noInitialRun': true,
|
||||
'noExitRuntime': true
|
||||
};
|
||||
|
||||
// Variables used by js_canvas_find_font_midpoint().
|
||||
var midpoint_test_str = "ABCDEFGHIKLMNOPRSTUVWXYZ0123456789";
|
||||
var midpoint_cache = [];
|
||||
|
||||
// Variables used by js_activate_timer() and js_deactivate_timer().
|
||||
var timer = null;
|
||||
var timer_reference_date;
|
||||
|
||||
// void timer_callback(double tplus);
|
||||
//
|
||||
// Called every 20ms while timing is active.
|
||||
var timer_callback;
|
||||
|
||||
// The status bar object, if we create one.
|
||||
var statusbar = null;
|
||||
|
||||
// Currently live blitters. We keep an integer id for each one on the
|
||||
// JS side; the C side, which expects a blitter to look like a struct,
|
||||
// simply defines the struct to contain that integer id.
|
||||
var blittercount = 0;
|
||||
var blitters = [];
|
||||
|
||||
// State for the dialog-box mechanism. dlg_dimmer and dlg_form are the
|
||||
// page-darkening overlay and the actual dialog box respectively;
|
||||
// dlg_next_id is used to allocate each checkbox a unique id to use
|
||||
// for linking its label to it (see js_dialog_boolean);
|
||||
// dlg_return_funcs is a list of JS functions to be called when the OK
|
||||
// button is pressed, to pass the results back to C.
|
||||
var dlg_dimmer = null, dlg_form = null;
|
||||
var dlg_next_id = 0;
|
||||
var dlg_return_funcs = null;
|
||||
|
||||
// void dlg_return_sval(int index, const char *val);
|
||||
// void dlg_return_ival(int index, int val);
|
||||
//
|
||||
// C-side entry points called by functions in dlg_return_funcs, to
|
||||
// pass back the final value in each dialog control.
|
||||
var dlg_return_sval, dlg_return_ival;
|
||||
|
||||
// The <ul> object implementing the game-type drop-down, and a list of
|
||||
// the <li> objects inside it. Used by js_add_preset(),
|
||||
// js_get_selected_preset() and js_select_preset().
|
||||
var gametypelist = null, gametypeitems = [];
|
||||
var gametypeselectedindex = null;
|
||||
var gametypesubmenus = [];
|
||||
|
||||
// The two anchors used to give permalinks to the current puzzle. Used
|
||||
// by js_update_permalinks().
|
||||
var permalink_seed, permalink_desc;
|
||||
|
||||
// The undo and redo buttons. Used by js_enable_undo_redo().
|
||||
var undo_button, redo_button;
|
||||
|
||||
// A div element enclosing both the puzzle and its status bar, used
|
||||
// for positioning the resize handle.
|
||||
var resizable_div;
|
||||
|
||||
// Helper function to find the absolute position of a given DOM
|
||||
// element on a page, by iterating upwards through the DOM finding
|
||||
// each element's offset from its parent, and thus calculating the
|
||||
// page-relative position of the target element.
|
||||
function element_coords(element) {
|
||||
var ex = 0, ey = 0;
|
||||
while (element.offsetParent) {
|
||||
ex += element.offsetLeft;
|
||||
ey += element.offsetTop;
|
||||
element = element.offsetParent;
|
||||
}
|
||||
return {x: ex, y:ey};
|
||||
}
|
||||
|
||||
// Helper function which is passed a mouse event object and a DOM
|
||||
// element, and returns the coordinates of the mouse event relative to
|
||||
// the top left corner of the element by subtracting element_coords
|
||||
// from event.page{X,Y}.
|
||||
function relative_mouse_coords(event, element) {
|
||||
var ecoords = element_coords(element);
|
||||
return {x: event.pageX - ecoords.x,
|
||||
y: event.pageY - ecoords.y};
|
||||
}
|
||||
|
||||
// Enable and disable items in the CSS menus.
|
||||
function disable_menu_item(item, disabledFlag) {
|
||||
if (disabledFlag)
|
||||
item.className = "disabled";
|
||||
else
|
||||
item.className = "";
|
||||
}
|
||||
|
||||
// Init function called from body.onload.
|
||||
function initPuzzle() {
|
||||
// Construct the off-screen canvas used for double buffering.
|
||||
onscreen_canvas = document.getElementById("puzzlecanvas");
|
||||
offscreen_canvas = document.createElement("canvas");
|
||||
offscreen_canvas.width = onscreen_canvas.width;
|
||||
offscreen_canvas.height = onscreen_canvas.height;
|
||||
|
||||
// Stop right-clicks on the puzzle from popping up a context menu.
|
||||
// We need those right-clicks!
|
||||
onscreen_canvas.oncontextmenu = function(event) { return false; }
|
||||
|
||||
// Set up mouse handlers. We do a bit of tracking of the currently
|
||||
// pressed mouse buttons, to avoid sending mousemoves with no
|
||||
// button down (our puzzles don't want those events).
|
||||
mousedown = Module.cwrap('mousedown', 'void',
|
||||
['number', 'number', 'number']);
|
||||
buttons_down = 0;
|
||||
onscreen_canvas.onmousedown = function(event) {
|
||||
var xy = relative_mouse_coords(event, onscreen_canvas);
|
||||
mousedown(xy.x, xy.y, event.button);
|
||||
buttons_down |= 1 << event.button;
|
||||
onscreen_canvas.setCapture(true);
|
||||
};
|
||||
mousemove = Module.cwrap('mousemove', 'void',
|
||||
['number', 'number', 'number']);
|
||||
onscreen_canvas.onmousemove = function(event) {
|
||||
if (buttons_down) {
|
||||
var xy = relative_mouse_coords(event, onscreen_canvas);
|
||||
mousemove(xy.x, xy.y, buttons_down);
|
||||
}
|
||||
};
|
||||
mouseup = Module.cwrap('mouseup', 'void',
|
||||
['number', 'number', 'number']);
|
||||
onscreen_canvas.onmouseup = function(event) {
|
||||
if (buttons_down & (1 << event.button)) {
|
||||
buttons_down ^= 1 << event.button;
|
||||
var xy = relative_mouse_coords(event, onscreen_canvas);
|
||||
mouseup(xy.x, xy.y, event.button);
|
||||
}
|
||||
};
|
||||
|
||||
// Set up keyboard handlers. We do all the actual keyboard
|
||||
// handling in onkeydown; but we also call event.preventDefault()
|
||||
// in both the keydown and keypress handlers. This means that
|
||||
// while the canvas itself has focus, _all_ keypresses go only to
|
||||
// the puzzle - so users of this puzzle collection in other media
|
||||
// can indulge their instinct to press ^R for redo, for example,
|
||||
// without accidentally reloading the page.
|
||||
key = Module.cwrap('key', 'void', ['number', 'number', 'string',
|
||||
'string', 'number', 'number']);
|
||||
onscreen_canvas.onkeydown = function(event) {
|
||||
key(event.keyCode, event.charCode, event.key, event.char,
|
||||
event.shiftKey ? 1 : 0, event.ctrlKey ? 1 : 0);
|
||||
event.preventDefault();
|
||||
};
|
||||
onscreen_canvas.onkeypress = function(event) {
|
||||
event.preventDefault();
|
||||
};
|
||||
|
||||
// command() is a C function called to pass back events which
|
||||
// don't fall into other categories like mouse and key events.
|
||||
// Mostly those are button presses, but there's also one for the
|
||||
// game-type dropdown having been changed.
|
||||
command = Module.cwrap('command', 'void', ['number']);
|
||||
|
||||
// Event handlers for buttons and things, which call command().
|
||||
document.getElementById("specific").onclick = function(event) {
|
||||
// Ensure we don't accidentally process these events when a
|
||||
// dialog is actually active, e.g. because the button still
|
||||
// has keyboard focus
|
||||
if (dlg_dimmer === null)
|
||||
command(0);
|
||||
};
|
||||
document.getElementById("random").onclick = function(event) {
|
||||
if (dlg_dimmer === null)
|
||||
command(1);
|
||||
};
|
||||
document.getElementById("new").onclick = function(event) {
|
||||
if (dlg_dimmer === null)
|
||||
command(5);
|
||||
};
|
||||
document.getElementById("restart").onclick = function(event) {
|
||||
if (dlg_dimmer === null)
|
||||
command(6);
|
||||
};
|
||||
undo_button = document.getElementById("undo");
|
||||
undo_button.onclick = function(event) {
|
||||
if (dlg_dimmer === null)
|
||||
command(7);
|
||||
};
|
||||
redo_button = document.getElementById("redo");
|
||||
redo_button.onclick = function(event) {
|
||||
if (dlg_dimmer === null)
|
||||
command(8);
|
||||
};
|
||||
document.getElementById("solve").onclick = function(event) {
|
||||
if (dlg_dimmer === null)
|
||||
command(9);
|
||||
};
|
||||
|
||||
gametypelist = document.getElementById("gametype");
|
||||
gametypesubmenus.push(gametypelist);
|
||||
|
||||
// In IE, the canvas doesn't automatically gain focus on a mouse
|
||||
// click, so make sure it does
|
||||
onscreen_canvas.addEventListener("mousedown", function(event) {
|
||||
onscreen_canvas.focus();
|
||||
});
|
||||
|
||||
// In our dialog boxes, Return and Escape should be like pressing
|
||||
// OK and Cancel respectively
|
||||
document.addEventListener("keydown", function(event) {
|
||||
|
||||
if (dlg_dimmer !== null && event.keyCode == 13) {
|
||||
for (var i in dlg_return_funcs)
|
||||
dlg_return_funcs[i]();
|
||||
command(3);
|
||||
}
|
||||
|
||||
if (dlg_dimmer !== null && event.keyCode == 27)
|
||||
command(4);
|
||||
});
|
||||
|
||||
// Set up the function pointers we haven't already grabbed.
|
||||
dlg_return_sval = Module.cwrap('dlg_return_sval', 'void',
|
||||
['number','string']);
|
||||
dlg_return_ival = Module.cwrap('dlg_return_ival', 'void',
|
||||
['number','number']);
|
||||
timer_callback = Module.cwrap('timer_callback', 'void', ['number']);
|
||||
|
||||
// Save references to the two permalinks.
|
||||
permalink_desc = document.getElementById("permalink-desc");
|
||||
permalink_seed = document.getElementById("permalink-seed");
|
||||
|
||||
// Default to giving keyboard focus to the puzzle.
|
||||
onscreen_canvas.focus();
|
||||
|
||||
// Create the resize handle.
|
||||
var resize_handle = document.createElement("canvas");
|
||||
resize_handle.width = 10;
|
||||
resize_handle.height = 10;
|
||||
{
|
||||
var ctx = resize_handle.getContext("2d");
|
||||
ctx.beginPath();
|
||||
for (var i = 1; i <= 7; i += 3) {
|
||||
ctx.moveTo(8.5, i + 0.5);
|
||||
ctx.lineTo(i + 0.5, 8.5);
|
||||
}
|
||||
ctx.lineWidth = '1px';
|
||||
ctx.lineCap = 'round';
|
||||
ctx.lineJoin = 'round';
|
||||
ctx.strokeStyle = '#000000';
|
||||
ctx.stroke();
|
||||
}
|
||||
resizable_div = document.getElementById("resizable");
|
||||
resizable_div.appendChild(resize_handle);
|
||||
resize_handle.style.position = 'absolute';
|
||||
resize_handle.style.zIndex = 98;
|
||||
resize_handle.style.bottom = "0";
|
||||
resize_handle.style.right = "0";
|
||||
resize_handle.style.cursor = "se-resize";
|
||||
resize_handle.title = "Drag to resize the puzzle. Right-click to restore the default size.";
|
||||
var resize_xbase = null, resize_ybase = null, restore_pending = false;
|
||||
var resize_xoffset = null, resize_yoffset = null;
|
||||
var resize_puzzle = Module.cwrap('resize_puzzle',
|
||||
'void', ['number', 'number']);
|
||||
var restore_puzzle_size = Module.cwrap('restore_puzzle_size', 'void', []);
|
||||
resize_handle.oncontextmenu = function(event) { return false; }
|
||||
resize_handle.onmousedown = function(event) {
|
||||
if (event.button == 0) {
|
||||
var xy = element_coords(onscreen_canvas);
|
||||
resize_xbase = xy.x + onscreen_canvas.width / 2;
|
||||
resize_ybase = xy.y;
|
||||
resize_xoffset = xy.x + onscreen_canvas.width - event.pageX;
|
||||
resize_yoffset = xy.y + onscreen_canvas.height - event.pageY;
|
||||
} else {
|
||||
restore_pending = true;
|
||||
}
|
||||
resize_handle.setCapture(true);
|
||||
event.preventDefault();
|
||||
};
|
||||
window.addEventListener("mousemove", function(event) {
|
||||
if (resize_xbase !== null && resize_ybase !== null) {
|
||||
resize_puzzle((event.pageX + resize_xoffset - resize_xbase) * 2,
|
||||
(event.pageY + resize_yoffset - resize_ybase));
|
||||
event.preventDefault();
|
||||
// Chrome insists on selecting text during a resize drag
|
||||
// no matter what I do
|
||||
if (window.getSelection)
|
||||
window.getSelection().removeAllRanges();
|
||||
else
|
||||
document.selection.empty(); }
|
||||
});
|
||||
window.addEventListener("mouseup", function(event) {
|
||||
if (resize_xbase !== null && resize_ybase !== null) {
|
||||
resize_xbase = null;
|
||||
resize_ybase = null;
|
||||
onscreen_canvas.focus(); // return focus to the puzzle
|
||||
event.preventDefault();
|
||||
} else if (restore_pending) {
|
||||
// If you have the puzzle at larger than normal size and
|
||||
// then right-click to restore, I haven't found any way to
|
||||
// stop Chrome and IE popping up a context menu on the
|
||||
// revealed piece of document when you release the button
|
||||
// except by putting the actual restore into a setTimeout.
|
||||
// Gah.
|
||||
setTimeout(function() {
|
||||
restore_pending = false;
|
||||
restore_puzzle_size();
|
||||
onscreen_canvas.focus();
|
||||
}, 20);
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// Run the C setup function, passing argv[1] as the fragment
|
||||
// identifier (so that permalinks of the form puzzle.html#game-id
|
||||
// can launch the specified id).
|
||||
Module.callMain([location.hash]);
|
||||
|
||||
// And if we get here with everything having gone smoothly, i.e.
|
||||
// we haven't crashed for one reason or another during setup, then
|
||||
// it's probably safe to hide the 'sorry, no puzzle here' div and
|
||||
// show the div containing the actual puzzle.
|
||||
document.getElementById("apology").style.display = "none";
|
||||
document.getElementById("puzzle").style.display = "inline";
|
||||
}
|
||||
29
apps/plugins/puzzles/src/emccx.json
Normal file
29
apps/plugins/puzzles/src/emccx.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
// -*- js -*-
|
||||
//
|
||||
// List of entry points exported by the C side of the Emscripten
|
||||
// puzzle builds. Passed in to emcc via the option '-s
|
||||
// EXPORTED_FUNCTIONS=[list]'.
|
||||
//
|
||||
// This file isn't actually a valid list in its current state, since
|
||||
// emcc doesn't like comments or newlines. However, it's a nicer
|
||||
// source form to keep the comments and newlines in, so we sed them
|
||||
// away at compile time.
|
||||
[
|
||||
// Event handlers for mouse and keyboard input
|
||||
'_mouseup',
|
||||
'_mousedown',
|
||||
'_mousemove',
|
||||
'_key',
|
||||
// Callback when the program activates timing
|
||||
'_timer_callback',
|
||||
// Callback from button presses in the UI outside the canvas
|
||||
'_command',
|
||||
// Callbacks to return values from dialog boxes
|
||||
'_dlg_return_sval',
|
||||
'_dlg_return_ival',
|
||||
// Callbacks when the resizing controls are used
|
||||
'_resize_puzzle',
|
||||
'_restore_puzzle_size',
|
||||
// Main program, run at initialisation time
|
||||
'_main'
|
||||
]
|
||||
22
apps/plugins/puzzles/src/fifteen.R
Normal file
22
apps/plugins/puzzles/src/fifteen.R
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
fifteen : [X] GTK COMMON fifteen fifteen-icon|no-icon
|
||||
|
||||
fifteen : [G] WINDOWS COMMON fifteen fifteen.res|noicon.res
|
||||
|
||||
fifteensolver : [U] fifteen[STANDALONE_SOLVER] STANDALONE
|
||||
fifteensolver : [C] fifteen[STANDALONE_SOLVER] STANDALONE
|
||||
|
||||
ALL += fifteen[COMBINED]
|
||||
|
||||
!begin am gtk
|
||||
GAMES += fifteen
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(fifteen) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
fifteen:fifteen.exe:Fifteen:Sliding block puzzle:Slide the tiles around to arrange them into order.
|
||||
!end
|
||||
1215
apps/plugins/puzzles/src/fifteen.c
Normal file
1215
apps/plugins/puzzles/src/fifteen.c
Normal file
File diff suppressed because it is too large
Load diff
41
apps/plugins/puzzles/src/fifteen.html
Normal file
41
apps/plugins/puzzles/src/fifteen.html
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Fifteen</title>
|
||||
<link rel="previous" href="cube.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="sixteen.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="cube.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="sixteen.html">Next</a></p>
|
||||
<h1><a name="C5"></a>Chapter 5: <a name="i0"></a>Fifteen</h1>
|
||||
<p>
|
||||
The old ones are the best: this is the good old ‘<a name="i1"></a>15-puzzle’ with sliding tiles. You have a 4×4 square grid; 15 squares contain numbered tiles, and the sixteenth is empty. Your move is to choose a tile next to the empty space, and slide it into the space. The aim is to end up with the tiles in numerical order, with the space in the bottom right (so that the top row reads 1,2,3,4 and the bottom row reads 13,14,15,<em>space</em>).
|
||||
</p>
|
||||
<h2><a name="S5.1"></a>5.1 <a name="i2"></a>Fifteen controls</h2>
|
||||
<p>
|
||||
This game can be controlled with the mouse or the keyboard.
|
||||
</p>
|
||||
<p>
|
||||
A left-click with the mouse in the row or column containing the empty space will move as many tiles as necessary to move the space to the mouse pointer.
|
||||
</p>
|
||||
<p>
|
||||
The arrow keys will move a tile adjacent to the space in the direction indicated (moving the space in the <em>opposite</em> direction).
|
||||
</p>
|
||||
<p>
|
||||
Pressing ‘h’ will make a suggested move. Pressing ‘h’ enough times will solve the game, but it may scramble your progress while doing so.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S5.2"></a>5.2 <a name="i3"></a>Fifteen parameters</h2>
|
||||
<p>
|
||||
The only options available from the ‘Custom...’ option on the ‘Type’ menu are <em>Width</em> and <em>Height</em>, which are self-explanatory. (Once you've changed these, it's not a ‘15-puzzle’ any more, of course!)
|
||||
</p>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
24
apps/plugins/puzzles/src/filling.R
Normal file
24
apps/plugins/puzzles/src/filling.R
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
FILLING_EXTRA = dsf
|
||||
|
||||
fillingsolver : [U] filling[STANDALONE_SOLVER] FILLING_EXTRA STANDALONE
|
||||
fillingsolver : [C] filling[STANDALONE_SOLVER] FILLING_EXTRA STANDALONE
|
||||
|
||||
filling : [X] GTK COMMON filling FILLING_EXTRA filling-icon|no-icon
|
||||
|
||||
filling : [G] WINDOWS COMMON filling FILLING_EXTRA filling.res|noicon.res
|
||||
|
||||
ALL += filling[COMBINED] FILLING_EXTRA
|
||||
|
||||
!begin am gtk
|
||||
GAMES += filling
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(filling) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
filling:filling.exe:Filling:Polyomino puzzle:Mark every square with the area of its containing region.
|
||||
!end
|
||||
2179
apps/plugins/puzzles/src/filling.c
Normal file
2179
apps/plugins/puzzles/src/filling.c
Normal file
File diff suppressed because it is too large
Load diff
50
apps/plugins/puzzles/src/filling.html
Normal file
50
apps/plugins/puzzles/src/filling.html
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Filling</title>
|
||||
<link rel="previous" href="galaxies.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="keen.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="galaxies.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="keen.html">Next</a></p>
|
||||
<h1><a name="C29"></a>Chapter 29: <a name="i0"></a>Filling</h1>
|
||||
<p>
|
||||
You have a grid of squares, some of which contain digits, and the rest of which are empty. Your job is to fill in digits in the empty squares, in such a way that each connected region of squares all containing the same digit has an area equal to that digit.
|
||||
</p>
|
||||
<p>
|
||||
(‘Connected region’, for the purposes of this game, does not count diagonally separated squares as adjacent.)
|
||||
</p>
|
||||
<p>
|
||||
For example, it follows that no square can contain a zero, and that two adjacent squares can not both contain a one. No region has an area greater than 9 (because then its area would not be a single digit).
|
||||
</p>
|
||||
<p>
|
||||
Credit for this puzzle goes to <a name="i1"></a>Nikoli <a href="#p0">[14]</a>.
|
||||
</p>
|
||||
<p>
|
||||
Filling was contributed to this collection by Jonas Kölker.
|
||||
</p>
|
||||
<p><a name="p0"></a>
|
||||
[14] <a href="http://www.nikoli.co.jp/en/puzzles/fillomino.html"><code>http://www.nikoli.co.jp/en/puzzles/fillomino.html</code></a>
|
||||
</p>
|
||||
<h2><a name="S29.1"></a>29.1 <a name="i2"></a>Filling controls</h2>
|
||||
<p>
|
||||
To play Filling, simply click the mouse in any empty square and then type a digit on the keyboard to fill that square. By dragging the mouse, you can select multiple squares to fill with a single keypress. If you make a mistake, click the mouse in the incorrect square and press 0, Space, Backspace or Enter to clear it again (or use the Undo feature).
|
||||
</p>
|
||||
<p>
|
||||
You can also move around the grid with the cursor keys; typing a digit will fill the square containing the cursor with that number; typing 0 will clear it. You can also select multiple squares for numbering or clearing with the return and arrow keys, before typing a digit to fill or clear the highlighted squares (as above). The space bar adds and removes single squares to and from the selection. Backspace and escape remove all squares from the selection.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S29.2"></a>29.2 <a name="i3"></a>Filling parameters</h2>
|
||||
<p>
|
||||
Filling allows you to configure the number of rows and columns of the grid, through the ‘Type’ menu.
|
||||
</p>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
500
apps/plugins/puzzles/src/findloop.c
Normal file
500
apps/plugins/puzzles/src/findloop.c
Normal file
|
|
@ -0,0 +1,500 @@
|
|||
/*
|
||||
* Routine for finding loops in graphs, reusable across multiple
|
||||
* puzzles.
|
||||
*
|
||||
* The strategy is Tarjan's bridge-finding algorithm, which is
|
||||
* designed to list all edges whose removal would disconnect a
|
||||
* previously connected component of the graph. We're interested in
|
||||
* exactly the reverse - edges that are part of a loop in the graph
|
||||
* are precisely those which _wouldn't_ disconnect anything if removed
|
||||
* (individually) - but of course flipping the sense of the output is
|
||||
* easy.
|
||||
*/
|
||||
|
||||
#include "puzzles.h"
|
||||
|
||||
struct findloopstate {
|
||||
int parent, child, sibling, visited;
|
||||
int index, minindex, maxindex;
|
||||
int minreachable, maxreachable;
|
||||
int bridge;
|
||||
};
|
||||
|
||||
struct findloopstate *findloop_new_state(int nvertices)
|
||||
{
|
||||
/*
|
||||
* Allocate a findloopstate structure for each vertex, and one
|
||||
* extra one at the end which will be the overall root of a
|
||||
* 'super-tree', which links the whole graph together to make it
|
||||
* as easy as possible to iterate over all the connected
|
||||
* components.
|
||||
*/
|
||||
return snewn(nvertices + 1, struct findloopstate);
|
||||
}
|
||||
|
||||
void findloop_free_state(struct findloopstate *state)
|
||||
{
|
||||
sfree(state);
|
||||
}
|
||||
|
||||
int findloop_is_loop_edge(struct findloopstate *pv, int u, int v)
|
||||
{
|
||||
/*
|
||||
* Since the algorithm is intended for finding bridges, and a
|
||||
* bridge must be part of any spanning tree, it follows that there
|
||||
* is at most one bridge per vertex.
|
||||
*
|
||||
* Furthermore, by finding a _rooted_ spanning tree (so that each
|
||||
* bridge is a parent->child link), you can find an injection from
|
||||
* bridges to vertices (namely, map each bridge to the vertex at
|
||||
* its child end).
|
||||
*
|
||||
* So if the u-v edge is a bridge, then either v was u's parent
|
||||
* when the algorithm ran and we set pv[u].bridge = v, or vice
|
||||
* versa.
|
||||
*/
|
||||
return !(pv[u].bridge == v || pv[v].bridge == u);
|
||||
}
|
||||
|
||||
int findloop_run(struct findloopstate *pv, int nvertices,
|
||||
neighbour_fn_t neighbour, void *ctx)
|
||||
{
|
||||
int u, v, w, root, index;
|
||||
int nbridges, nedges;
|
||||
|
||||
root = nvertices;
|
||||
|
||||
/*
|
||||
* First pass: organise the graph into a rooted spanning forest.
|
||||
* That is, a tree structure with a clear up/down orientation -
|
||||
* every node has exactly one parent (which may be 'root') and
|
||||
* zero or more children, and every parent-child link corresponds
|
||||
* to a graph edge.
|
||||
*
|
||||
* (A side effect of this is to find all the connected components,
|
||||
* which of course we could do less confusingly with a dsf - but
|
||||
* then we'd have to do that *and* build the tree, so it's less
|
||||
* effort to do it all at once.)
|
||||
*/
|
||||
for (v = 0; v <= nvertices; v++) {
|
||||
pv[v].parent = root;
|
||||
pv[v].child = -2;
|
||||
pv[v].sibling = -1;
|
||||
pv[v].visited = FALSE;
|
||||
}
|
||||
pv[root].child = -1;
|
||||
nedges = 0;
|
||||
debug(("------------- new find_loops, nvertices=%d\n", nvertices));
|
||||
for (v = 0; v < nvertices; v++) {
|
||||
if (pv[v].parent == root) {
|
||||
/*
|
||||
* Found a new connected component. Enumerate and treeify
|
||||
* it.
|
||||
*/
|
||||
pv[v].sibling = pv[root].child;
|
||||
pv[root].child = v;
|
||||
debug(("%d is new child of root\n", v));
|
||||
|
||||
u = v;
|
||||
while (1) {
|
||||
if (!pv[u].visited) {
|
||||
pv[u].visited = TRUE;
|
||||
|
||||
/*
|
||||
* Enumerate the neighbours of u, and any that are
|
||||
* as yet not in the tree structure (indicated by
|
||||
* child==-2, and distinct from the 'visited'
|
||||
* flag) become children of u.
|
||||
*/
|
||||
debug((" component pass: processing %d\n", u));
|
||||
for (w = neighbour(u, ctx); w >= 0;
|
||||
w = neighbour(-1, ctx)) {
|
||||
debug((" edge %d-%d\n", u, w));
|
||||
if (pv[w].child == -2) {
|
||||
debug((" -> new child\n"));
|
||||
pv[w].child = -1;
|
||||
pv[w].sibling = pv[u].child;
|
||||
pv[w].parent = u;
|
||||
pv[u].child = w;
|
||||
}
|
||||
|
||||
/* While we're here, count the edges in the whole
|
||||
* graph, so that we can easily check at the end
|
||||
* whether all of them are bridges, i.e. whether
|
||||
* no loop exists at all. */
|
||||
if (w > u) /* count each edge only in one direction */
|
||||
nedges++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now descend in depth-first search.
|
||||
*/
|
||||
if (pv[u].child >= 0) {
|
||||
u = pv[u].child;
|
||||
debug((" descending to %d\n", u));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (u == v) {
|
||||
debug((" back at %d, done this component\n", u));
|
||||
break;
|
||||
} else if (pv[u].sibling >= 0) {
|
||||
u = pv[u].sibling;
|
||||
debug((" sideways to %d\n", u));
|
||||
} else {
|
||||
u = pv[u].parent;
|
||||
debug((" ascending to %d\n", u));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Second pass: index all the vertices in such a way that every
|
||||
* subtree has a contiguous range of indices. (Easily enough done,
|
||||
* by iterating through the tree structure we just built and
|
||||
* numbering its elements as if they were those of a sorted list.)
|
||||
*
|
||||
* For each vertex, we compute the min and max index of the
|
||||
* subtree starting there.
|
||||
*
|
||||
* (We index the vertices in preorder, per Tarjan's original
|
||||
* description, so that each vertex's min subtree index is its own
|
||||
* index; but that doesn't actually matter; either way round would
|
||||
* do. The important thing is that we have a simple arithmetic
|
||||
* criterion that tells us whether a vertex is in a given subtree
|
||||
* or not.)
|
||||
*/
|
||||
debug(("--- begin indexing pass\n"));
|
||||
index = 0;
|
||||
for (v = 0; v < nvertices; v++)
|
||||
pv[v].visited = FALSE;
|
||||
pv[root].visited = TRUE;
|
||||
u = pv[root].child;
|
||||
while (1) {
|
||||
if (!pv[u].visited) {
|
||||
pv[u].visited = TRUE;
|
||||
|
||||
/*
|
||||
* Index this node.
|
||||
*/
|
||||
pv[u].minindex = pv[u].index = index;
|
||||
debug((" vertex %d <- index %d\n", u, index));
|
||||
index++;
|
||||
|
||||
/*
|
||||
* Now descend in depth-first search.
|
||||
*/
|
||||
if (pv[u].child >= 0) {
|
||||
u = pv[u].child;
|
||||
debug((" descending to %d\n", u));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (u == root) {
|
||||
debug((" back at %d, done indexing\n", u));
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* As we re-ascend to here from its children (or find that we
|
||||
* had no children to descend to in the first place), fill in
|
||||
* its maxindex field.
|
||||
*/
|
||||
pv[u].maxindex = index-1;
|
||||
debug((" vertex %d <- maxindex %d\n", u, pv[u].maxindex));
|
||||
|
||||
if (pv[u].sibling >= 0) {
|
||||
u = pv[u].sibling;
|
||||
debug((" sideways to %d\n", u));
|
||||
} else {
|
||||
u = pv[u].parent;
|
||||
debug((" ascending to %d\n", u));
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* We're ready to generate output now, so initialise the output
|
||||
* fields.
|
||||
*/
|
||||
for (v = 0; v < nvertices; v++)
|
||||
pv[v].bridge = -1;
|
||||
|
||||
/*
|
||||
* Final pass: determine the min and max index of the vertices
|
||||
* reachable from every subtree, not counting the link back to
|
||||
* each vertex's parent. Then our criterion is: given a vertex u,
|
||||
* defining a subtree consisting of u and all its descendants, we
|
||||
* compare the range of vertex indices _in_ that subtree (which is
|
||||
* just the minindex and maxindex of u) with the range of vertex
|
||||
* indices in the _neighbourhood_ of the subtree (computed in this
|
||||
* final pass, and not counting u's own edge to its parent), and
|
||||
* if the latter includes anything outside the former, then there
|
||||
* must be some path from u to outside its subtree which does not
|
||||
* go through the parent edge - i.e. the edge from u to its parent
|
||||
* is part of a loop.
|
||||
*/
|
||||
debug(("--- begin min-max pass\n"));
|
||||
nbridges = 0;
|
||||
for (v = 0; v < nvertices; v++)
|
||||
pv[v].visited = FALSE;
|
||||
u = pv[root].child;
|
||||
pv[root].visited = TRUE;
|
||||
while (1) {
|
||||
if (!pv[u].visited) {
|
||||
pv[u].visited = TRUE;
|
||||
|
||||
/*
|
||||
* Look for vertices reachable directly from u, including
|
||||
* u itself.
|
||||
*/
|
||||
debug((" processing vertex %d\n", u));
|
||||
pv[u].minreachable = pv[u].maxreachable = pv[u].minindex;
|
||||
for (w = neighbour(u, ctx); w >= 0; w = neighbour(-1, ctx)) {
|
||||
debug((" edge %d-%d\n", u, w));
|
||||
if (w != pv[u].parent) {
|
||||
int i = pv[w].index;
|
||||
if (pv[u].minreachable > i)
|
||||
pv[u].minreachable = i;
|
||||
if (pv[u].maxreachable < i)
|
||||
pv[u].maxreachable = i;
|
||||
}
|
||||
}
|
||||
debug((" initial min=%d max=%d\n",
|
||||
pv[u].minreachable, pv[u].maxreachable));
|
||||
|
||||
/*
|
||||
* Now descend in depth-first search.
|
||||
*/
|
||||
if (pv[u].child >= 0) {
|
||||
u = pv[u].child;
|
||||
debug((" descending to %d\n", u));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (u == root) {
|
||||
debug((" back at %d, done min-maxing\n", u));
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* As we re-ascend to this vertex, go back through its
|
||||
* immediate children and do a post-update of its min/max.
|
||||
*/
|
||||
for (v = pv[u].child; v >= 0; v = pv[v].sibling) {
|
||||
if (pv[u].minreachable > pv[v].minreachable)
|
||||
pv[u].minreachable = pv[v].minreachable;
|
||||
if (pv[u].maxreachable < pv[v].maxreachable)
|
||||
pv[u].maxreachable = pv[v].maxreachable;
|
||||
}
|
||||
|
||||
debug((" postorder update of %d: min=%d max=%d (indices %d-%d)\n", u,
|
||||
pv[u].minreachable, pv[u].maxreachable,
|
||||
pv[u].minindex, pv[u].maxindex));
|
||||
|
||||
/*
|
||||
* And now we know whether each to our own parent is a bridge.
|
||||
*/
|
||||
if ((v = pv[u].parent) != root) {
|
||||
if (pv[u].minreachable >= pv[u].minindex &&
|
||||
pv[u].maxreachable <= pv[u].maxindex) {
|
||||
/* Yes, it's a bridge. */
|
||||
pv[u].bridge = v;
|
||||
nbridges++;
|
||||
debug((" %d-%d is a bridge\n", v, u));
|
||||
} else {
|
||||
debug((" %d-%d is not a bridge\n", v, u));
|
||||
}
|
||||
}
|
||||
|
||||
if (pv[u].sibling >= 0) {
|
||||
u = pv[u].sibling;
|
||||
debug((" sideways to %d\n", u));
|
||||
} else {
|
||||
u = pv[u].parent;
|
||||
debug((" ascending to %d\n", u));
|
||||
}
|
||||
}
|
||||
|
||||
debug(("finished, nedges=%d nbridges=%d\n", nedges, nbridges));
|
||||
|
||||
/*
|
||||
* Done.
|
||||
*/
|
||||
return nbridges < nedges;
|
||||
}
|
||||
|
||||
/*
|
||||
* Appendix: the long and painful history of loop detection in these puzzles
|
||||
* =========================================================================
|
||||
*
|
||||
* For interest, I thought I'd write up the five loop-finding methods
|
||||
* I've gone through before getting to this algorithm. It's a case
|
||||
* study in all the ways you can solve this particular problem
|
||||
* wrongly, and also how much effort you can waste by not managing to
|
||||
* find the existing solution in the literature :-(
|
||||
*
|
||||
* Vertex dsf
|
||||
* ----------
|
||||
*
|
||||
* Initially, in puzzles where you need to not have any loops in the
|
||||
* solution graph, I detected them by using a dsf to track connected
|
||||
* components of vertices. Iterate over each edge unifying the two
|
||||
* vertices it connects; but before that, check if the two vertices
|
||||
* are _already_ known to be connected. If so, then the new edge is
|
||||
* providing a second path between them, i.e. a loop exists.
|
||||
*
|
||||
* That's adequate for automated solvers, where you just need to know
|
||||
* _whether_ a loop exists, so as to rule out that move and do
|
||||
* something else. But during play, you want to do better than that:
|
||||
* you want to _point out_ the loops with error highlighting.
|
||||
*
|
||||
* Graph pruning
|
||||
* -------------
|
||||
*
|
||||
* So my second attempt worked by iteratively pruning the graph. Find
|
||||
* a vertex with degree 1; remove that edge; repeat until you can't
|
||||
* find such a vertex any more. This procedure will remove *every*
|
||||
* edge of the graph if and only if there were no loops; so if there
|
||||
* are any edges remaining, highlight them.
|
||||
*
|
||||
* This successfully highlights loops, but not _only_ loops. If the
|
||||
* graph contains a 'dumb-bell' shaped subgraph consisting of two
|
||||
* loops connected by a path, then we'll end up highlighting the
|
||||
* connecting path as well as the loops. That's not what we wanted.
|
||||
*
|
||||
* Vertex dsf with ad-hoc loop tracing
|
||||
* -----------------------------------
|
||||
*
|
||||
* So my third attempt was to go back to the dsf strategy, only this
|
||||
* time, when you detect that a particular edge connects two
|
||||
* already-connected vertices (and hence is part of a loop), you try
|
||||
* to trace round that loop to highlight it - before adding the new
|
||||
* edge, search for a path between its endpoints among the edges the
|
||||
* algorithm has already visited, and when you find one (which you
|
||||
* must), highlight the loop consisting of that path plus the new
|
||||
* edge.
|
||||
*
|
||||
* This solves the dumb-bell problem - we definitely now cannot
|
||||
* accidentally highlight any edge that is *not* part of a loop. But
|
||||
* it's far from clear that we'll highlight *every* edge that *is*
|
||||
* part of a loop - what if there were multiple paths between the two
|
||||
* vertices? It would be difficult to guarantee that we'd always catch
|
||||
* every single one.
|
||||
*
|
||||
* On the other hand, it is at least guaranteed that we'll highlight
|
||||
* _something_ if any loop exists, and in other error highlighting
|
||||
* situations (see in particular the Tents connected component
|
||||
* analysis) I've been known to consider that sufficient. So this
|
||||
* version hung around for quite a while, until I had a better idea.
|
||||
*
|
||||
* Face dsf
|
||||
* --------
|
||||
*
|
||||
* Round about the time Loopy was being revamped to include non-square
|
||||
* grids, I had a much cuter idea, making use of the fact that the
|
||||
* graph is planar, and hence has a concept of faces.
|
||||
*
|
||||
* In Loopy, there are really two graphs: the 'grid', consisting of
|
||||
* all the edges that the player *might* fill in, and the solution
|
||||
* graph of the edges the player actually *has* filled in. The
|
||||
* algorithm is: set up a dsf on the *faces* of the grid. Iterate over
|
||||
* each edge of the grid which is _not_ marked by the player as an
|
||||
* edge of the solution graph, unifying the faces on either side of
|
||||
* that edge. This groups the faces into connected components. Now,
|
||||
* there is more than one connected component iff a loop exists, and
|
||||
* moreover, an edge of the solution graph is part of a loop iff the
|
||||
* faces on either side of it are in different connected components!
|
||||
*
|
||||
* This is the first algorithm I came up with that I was confident
|
||||
* would successfully highlight exactly the correct set of edges in
|
||||
* all cases. It's also conceptually elegant, and very easy to
|
||||
* implement and to be confident you've got it right (since it just
|
||||
* consists of two very simple loops over the edge set, one building
|
||||
* the dsf and one reading it off). I was very pleased with it.
|
||||
*
|
||||
* Doing the same thing in Slant is slightly more difficult because
|
||||
* the set of edges the user can fill in do not form a planar graph
|
||||
* (the two potential edges in each square cross in the middle). But
|
||||
* you can still apply the same principle by considering the 'faces'
|
||||
* to be diamond-shaped regions of space around each horizontal or
|
||||
* vertical grid line. Equivalently, pretend each edge added by the
|
||||
* player is really divided into two edges, each from a square-centre
|
||||
* to one of the square's corners, and now the grid graph is planar
|
||||
* again.
|
||||
*
|
||||
* However, it fell down when - much later - I tried to implement the
|
||||
* same algorithm in Net.
|
||||
*
|
||||
* Net doesn't *absolutely need* loop detection, because of its system
|
||||
* of highlighting squares connected to the source square: an argument
|
||||
* involving counting vertex degrees shows that if any loop exists,
|
||||
* then it must be counterbalanced by some disconnected square, so
|
||||
* there will be _some_ error highlight in any invalid grid even
|
||||
* without loop detection. However, in large complicated cases, it's
|
||||
* still nice to highlight the loop itself, so that once the player is
|
||||
* clued in to its existence by a disconnected square elsewhere, they
|
||||
* don't have to spend forever trying to find it.
|
||||
*
|
||||
* The new wrinkle in Net, compared to other loop-disallowing puzzles,
|
||||
* is that it can be played with wrapping walls, or - topologically
|
||||
* speaking - on a torus. And a torus has a property that algebraic
|
||||
* topologists would know of as a 'non-trivial H_1 homology group',
|
||||
* which essentially means that there can exist a loop on a torus
|
||||
* which *doesn't* separate the surface into two regions disconnected
|
||||
* from each other.
|
||||
*
|
||||
* In other words, using this algorithm in Net will do fine at finding
|
||||
* _small_ localised loops, but a large-scale loop that goes (say) off
|
||||
* the top of the grid, back on at the bottom, and meets up in the
|
||||
* middle again will not be detected.
|
||||
*
|
||||
* Footpath dsf
|
||||
* ------------
|
||||
*
|
||||
* To solve this homology problem in Net, I hastily thought up another
|
||||
* dsf-based algorithm.
|
||||
*
|
||||
* This time, let's consider each edge of the graph to be a road, with
|
||||
* a separate pedestrian footpath down each side. We'll form a dsf on
|
||||
* those imaginary segments of footpath.
|
||||
*
|
||||
* At each vertex of the graph, we go round the edges leaving that
|
||||
* vertex, in order around the vertex. For each pair of edges adjacent
|
||||
* in this order, we unify their facing pair of footpaths (e.g. if
|
||||
* edge E appears anticlockwise of F, then we unify the anticlockwise
|
||||
* footpath of F with the clockwise one of E) . In particular, if a
|
||||
* vertex has degree 1, then the two footpaths on either side of its
|
||||
* single edge are unified.
|
||||
*
|
||||
* Then, an edge is part of a loop iff its two footpaths are not
|
||||
* reachable from one another.
|
||||
*
|
||||
* This algorithm is almost as simple to implement as the face dsf,
|
||||
* and it works on a wider class of graphs embedded in plane-like
|
||||
* surfaces; in particular, it fixes the torus bug in the face-dsf
|
||||
* approach. However, it still depends on the graph having _some_ sort
|
||||
* of embedding in a 2-manifold, because it relies on there being a
|
||||
* meaningful notion of 'order of edges around a vertex' in the first
|
||||
* place, so you couldn't use it on a wildly nonplanar graph like the
|
||||
* diamond lattice. Also, more subtly, it depends on the graph being
|
||||
* embedded in an _orientable_ surface - and that's a thing that might
|
||||
* much more plausibly change in future puzzles, because it's not at
|
||||
* all unlikely that at some point I might feel moved to implement a
|
||||
* puzzle that can be played on the surface of a Mobius strip or a
|
||||
* Klein bottle. And then even this algorithm won't work.
|
||||
*
|
||||
* Tarjan's bridge-finding algorithm
|
||||
* ---------------------------------
|
||||
*
|
||||
* And so, finally, we come to the algorithm above. This one is pure
|
||||
* graph theory: it doesn't depend on any concept of 'faces', or 'edge
|
||||
* ordering around a vertex', or any other trapping of a planar or
|
||||
* quasi-planar graph embedding. It should work on any graph
|
||||
* whatsoever, and reliably identify precisely the set of edges that
|
||||
* form part of some loop. So *hopefully* this long string of failures
|
||||
* has finally come to an end...
|
||||
*/
|
||||
21
apps/plugins/puzzles/src/flip.R
Normal file
21
apps/plugins/puzzles/src/flip.R
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
FLIP_EXTRA = tree234
|
||||
|
||||
flip : [X] GTK COMMON flip FLIP_EXTRA flip-icon|no-icon
|
||||
|
||||
flip : [G] WINDOWS COMMON flip FLIP_EXTRA flip.res|noicon.res
|
||||
|
||||
ALL += flip[COMBINED] FLIP_EXTRA
|
||||
|
||||
!begin am gtk
|
||||
GAMES += flip
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(flip) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
flip:flip.exe:Flip:Tile inversion puzzle:Flip groups of squares to light them all up at once.
|
||||
!end
|
||||
1349
apps/plugins/puzzles/src/flip.c
Normal file
1349
apps/plugins/puzzles/src/flip.c
Normal file
File diff suppressed because it is too large
Load diff
54
apps/plugins/puzzles/src/flip.html
Normal file
54
apps/plugins/puzzles/src/flip.html
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Flip</title>
|
||||
<link rel="previous" href="samegame.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="guess.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="samegame.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="guess.html">Next</a></p>
|
||||
<h1><a name="C14"></a>Chapter 14: <a name="i0"></a>Flip</h1>
|
||||
<p>
|
||||
You have a grid of squares, some light and some dark. Your aim is to light all the squares up at the same time. You can choose any square and flip its state from light to dark or dark to light, but when you do so, other squares around it change state as well.
|
||||
</p>
|
||||
<p>
|
||||
Each square contains a small diagram showing which other squares change when you flip it.
|
||||
</p>
|
||||
<h2><a name="S14.1"></a>14.1 <a name="i1"></a>Flip controls</h2>
|
||||
<p>
|
||||
This game can be played with either the keyboard or the mouse.
|
||||
</p>
|
||||
<p>
|
||||
Left-click in a square to flip it and its associated squares, or use the cursor keys to choose a square and the space bar or Enter key to flip.
|
||||
</p>
|
||||
<p>
|
||||
If you use the ‘Solve’ function on this game, it will mark some of the squares in red. If you click once in every square with a red mark, the game should be solved. (If you click in a square <em>without</em> a red mark, a red mark will appear in it to indicate that you will need to reverse that operation to reach the solution.)
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S14.2"></a>14.2 <a name="i2"></a>Flip parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Width</em>, <em>Height</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Size of grid in squares.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Shape type</em>
|
||||
</dt>
|
||||
<dd>
|
||||
This control determines the shape of the region which is flipped by clicking in any given square. The default setting, ‘Crosses’, causes every square to flip itself and its four immediate neighbours (or three or two if it's at an edge or corner). The other setting, ‘Random’, causes a random shape to be chosen for every square, so the game is different every time.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
19
apps/plugins/puzzles/src/flood.R
Normal file
19
apps/plugins/puzzles/src/flood.R
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
flood : [X] GTK COMMON flood flood-icon|no-icon
|
||||
|
||||
flood : [G] WINDOWS COMMON flood flood.res|noicon.res
|
||||
|
||||
ALL += flood[COMBINED]
|
||||
|
||||
!begin am gtk
|
||||
GAMES += flood
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(flood) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
flood:flood.exe:Flood:Flood-filling puzzle:Turn the grid the same colour in as few flood fills as possible.
|
||||
!end
|
||||
1372
apps/plugins/puzzles/src/flood.c
Normal file
1372
apps/plugins/puzzles/src/flood.c
Normal file
File diff suppressed because it is too large
Load diff
64
apps/plugins/puzzles/src/flood.html
Normal file
64
apps/plugins/puzzles/src/flood.html
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Flood</title>
|
||||
<link rel="previous" href="unruly.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="tracks.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="unruly.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="tracks.html">Next</a></p>
|
||||
<h1><a name="C39"></a>Chapter 39: <a name="i0"></a>Flood</h1>
|
||||
<p>
|
||||
You are given a grid of squares, coloured at random in multiple colours. In each move, you can flood-fill the top left square in a colour of your choice (i.e. every square reachable from the starting square by an orthogonally connected path of squares all the same colour will be filled in the new colour). As you do this, more and more of the grid becomes connected to the starting square.
|
||||
</p>
|
||||
<p>
|
||||
Your aim is to make the whole grid the same colour, in as few moves as possible. The game will set a limit on the number of moves, based on running its own internal solver. You win if you can make the whole grid the same colour in that many moves or fewer.
|
||||
</p>
|
||||
<p>
|
||||
I saw this game (with a fixed grid size, fixed number of colours, and fixed move limit) at http://floodit.appspot.com (no longer accessible).
|
||||
</p>
|
||||
<h2><a name="S39.1"></a>39.1 <a name="i1"></a>Flood controls</h2>
|
||||
<p>
|
||||
To play Flood, click the mouse in a square. The top left corner and everything connected to it will be flood-filled with the colour of the square you clicked. Clicking a square the same colour as the top left corner has no effect, and therefore does not count as a move.
|
||||
</p>
|
||||
<p>
|
||||
You can also use the cursor keys to move a cursor (outline black square) around the grid. Pressing the return key will fill the top left corner in the colour of the square under the cursor.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S39.2"></a>39.2 <a name="i2"></a>Flood parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Width</em>, <em>Height</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Size of the grid, in squares.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Colours</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Number of colours used to fill the grid. Must be at least 3 (with two colours there would only be one legal move at any stage, hence no choice to make at all), and at most 10.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Extra moves permitted</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Controls the difficulty of the puzzle, by increasing the move limit. In each new grid, Flood will run an internal solver to generate its own solution, and then the value in this field will be added to the length of Flood's solution to generate the game's move limit. So a value of 0 requires you to be just as efficient as Flood's automated solver, and a larger value makes it easier.
|
||||
<p>
|
||||
(Note that Flood's internal solver will not necessarily find the shortest possible solution, though I believe it's pretty close. For a real challenge, set this value to 0 and then try to solve a grid in <em>strictly fewer</em> moves than the limit you're given!)
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
28
apps/plugins/puzzles/src/galaxies.R
Normal file
28
apps/plugins/puzzles/src/galaxies.R
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
GALAXIES_EXTRA = dsf
|
||||
|
||||
galaxies : [X] GTK COMMON galaxies GALAXIES_EXTRA galaxies-icon|no-icon
|
||||
|
||||
galaxies : [G] WINDOWS COMMON galaxies GALAXIES_EXTRA galaxies.res|noicon.res
|
||||
|
||||
galaxiessolver : [U] galaxies[STANDALONE_SOLVER] GALAXIES_EXTRA STANDALONE m.lib
|
||||
galaxiessolver : [C] galaxies[STANDALONE_SOLVER] GALAXIES_EXTRA STANDALONE
|
||||
|
||||
galaxiespicture : [U] galaxies[STANDALONE_PICTURE_GENERATOR] GALAXIES_EXTRA STANDALONE
|
||||
+ m.lib
|
||||
galaxiespicture : [C] galaxies[STANDALONE_PICTURE_GENERATOR] GALAXIES_EXTRA STANDALONE
|
||||
|
||||
ALL += galaxies[COMBINED] GALAXIES_EXTRA
|
||||
|
||||
!begin am gtk
|
||||
GAMES += galaxies
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(galaxies) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
galaxies:galaxies.exe:Galaxies:Symmetric polyomino puzzle:Divide the grid into rotationally symmetric regions each centred on a dot.
|
||||
!end
|
||||
3995
apps/plugins/puzzles/src/galaxies.c
Normal file
3995
apps/plugins/puzzles/src/galaxies.c
Normal file
File diff suppressed because it is too large
Load diff
60
apps/plugins/puzzles/src/galaxies.html
Normal file
60
apps/plugins/puzzles/src/galaxies.html
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Galaxies</title>
|
||||
<link rel="previous" href="unequal.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="filling.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="unequal.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="filling.html">Next</a></p>
|
||||
<h1><a name="C28"></a>Chapter 28: <a name="i0"></a>Galaxies</h1>
|
||||
<p>
|
||||
You have a rectangular grid containing a number of dots. Your aim is to draw edges along the grid lines which divide the rectangle into regions in such a way that every region is 180° rotationally symmetric, and contains exactly one dot which is located at its centre of symmetry.
|
||||
</p>
|
||||
<p>
|
||||
This puzzle was invented by <a name="i1"></a>Nikoli <a href="#p0">[13]</a>, under the name ‘Tentai Show’; its name is commonly translated into English as ‘Spiral Galaxies’.
|
||||
</p>
|
||||
<p>
|
||||
Galaxies was contributed to this collection by James Harvey.
|
||||
</p>
|
||||
<p><a name="p0"></a>
|
||||
[13] <a href="http://www.nikoli.co.jp/en/puzzles/astronomical_show.html"><code>http://www.nikoli.co.jp/en/puzzles/astronomical_show.html</code></a>
|
||||
</p>
|
||||
<h2><a name="S28.1"></a>28.1 <a name="i2"></a>Galaxies controls</h2>
|
||||
<p>
|
||||
Left-click on any grid line to draw an edge if there isn't one already, or to remove one if there is. When you create a valid region (one which is closed, contains exactly one dot, is 180° symmetric about that dot, and contains no extraneous edges inside it) it will be highlighted automatically; so your aim is to have the whole grid highlighted in that way.
|
||||
</p>
|
||||
<p>
|
||||
During solving, you might know that a particular grid square belongs to a specific dot, but not be sure of where the edges go and which other squares are connected to the dot. In order to mark this so you don't forget, you can right-click on the dot and drag, which will create an arrow marker pointing at the dot. Drop that in a square of your choice and it will remind you which dot it's associated with. You can also right-click on existing arrows to pick them up and move them, or destroy them by dropping them off the edge of the grid. (Also, if you're not sure which dot an arrow is pointing at, you can pick it up and move it around to make it clearer. It will swivel constantly as you drag it, to stay pointed at its parent dot.)
|
||||
</p>
|
||||
<p>
|
||||
You can also use the cursor keys to move around the grid squares and lines. Pressing the return key when over a grid line will draw or clear its edge, as above. Pressing the return key when over a dot will pick up an arrow, to be dropped the next time the return key is pressed; this can also be used to move existing arrows around, removing them by dropping them on a dot or another arrow.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S28.2"></a>28.2 <a name="i3"></a>Galaxies parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Width</em>, <em>Height</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Size of grid in squares.
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Difficulty</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Controls the difficulty of the generated puzzle. More difficult puzzles require more complex deductions, and the ‘Unreasonable’ difficulty level may require backtracking.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
39
apps/plugins/puzzles/src/gamedesc.txt
Normal file
39
apps/plugins/puzzles/src/gamedesc.txt
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
blackbox:blackbox.exe:Black Box:Ball-finding puzzle:Find the hidden balls in the box by bouncing laser beams off them.
|
||||
bridges:bridges.exe:Bridges:Bridge-placing puzzle:Connect all the islands with a network of bridges.
|
||||
cube:cube.exe:Cube:Rolling cube puzzle:Pick up all the blue squares by rolling the cube over them.
|
||||
dominosa:dominosa.exe:Dominosa:Domino tiling puzzle:Tile the rectangle with a full set of dominoes.
|
||||
fifteen:fifteen.exe:Fifteen:Sliding block puzzle:Slide the tiles around to arrange them into order.
|
||||
filling:filling.exe:Filling:Polyomino puzzle:Mark every square with the area of its containing region.
|
||||
flip:flip.exe:Flip:Tile inversion puzzle:Flip groups of squares to light them all up at once.
|
||||
flood:flood.exe:Flood:Flood-filling puzzle:Turn the grid the same colour in as few flood fills as possible.
|
||||
galaxies:galaxies.exe:Galaxies:Symmetric polyomino puzzle:Divide the grid into rotationally symmetric regions each centred on a dot.
|
||||
guess:guess.exe:Guess:Combination-guessing puzzle:Guess the hidden combination of colours.
|
||||
inertia:inertia.exe:Inertia:Gem-collecting puzzle:Collect all the gems without running into any of the mines.
|
||||
keen:keen.exe:Keen:Arithmetic Latin square puzzle:Complete the latin square in accordance with the arithmetic clues.
|
||||
lightup:lightup.exe:Light Up:Light-bulb placing puzzle:Place bulbs to light up all the squares.
|
||||
loopy:loopy.exe:Loopy:Loop-drawing puzzle:Draw a single closed loop, given clues about number of adjacent edges.
|
||||
magnets:magnets.exe:Magnets:Magnet-placing puzzle:Place magnets to satisfy the clues and avoid like poles touching.
|
||||
map:map.exe:Map:Map-colouring puzzle:Colour the map so that adjacent regions are never the same colour.
|
||||
mines:mines.exe:Mines:Mine-finding puzzle:Find all the mines without treading on any of them.
|
||||
net:netgame.exe:Net:Network jigsaw puzzle:Rotate each tile to reassemble the network.
|
||||
netslide:netslide.exe:Netslide:Toroidal sliding network puzzle:Slide a row at a time to reassemble the network.
|
||||
palisade:palisade.exe:Palisade:Grid-division puzzle:Divide the grid into equal-sized areas in accordance with the clues.
|
||||
pattern:pattern.exe:Pattern:Pattern puzzle:Fill in the pattern in the grid, given only the lengths of runs of black squares.
|
||||
pearl:pearl.exe:Pearl:Loop-drawing puzzle:Draw a single closed loop, given clues about corner and straight squares.
|
||||
pegs:pegs.exe:Pegs:Peg solitaire puzzle:Jump pegs over each other to remove all but one.
|
||||
range:range.exe:Range:Visible-distance puzzle:Place black squares to limit the visible distance from each numbered cell.
|
||||
rect:rect.exe:Rectangles:Rectangles puzzle:Divide the grid into rectangles with areas equal to the numbers.
|
||||
samegame:samegame.exe:Same Game:Block-clearing puzzle:Clear the grid by removing touching groups of the same colour squares.
|
||||
signpost:signpost.exe:Signpost:Square-connecting puzzle:Connect the squares into a path following the arrows.
|
||||
singles:singles.exe:Singles:Number-removing puzzle:Black out the right set of duplicate numbers.
|
||||
sixteen:sixteen.exe:Sixteen:Toroidal sliding block puzzle:Slide a row at a time to arrange the tiles into order.
|
||||
slant:slant.exe:Slant:Maze-drawing puzzle:Draw a maze of slanting lines that matches the clues.
|
||||
solo:solo.exe:Solo:Number placement puzzle:Fill in the grid so that each row, column and square block contains one of every digit.
|
||||
tents:tents.exe:Tents:Tent-placing puzzle:Place a tent next to each tree.
|
||||
towers:towers.exe:Towers:Tower-placing Latin square puzzle:Complete the latin square of towers in accordance with the clues.
|
||||
tracks:tracks.exe:Tracks:Path-finding railway track puzzle:Fill in the railway track according to the clues.
|
||||
twiddle:twiddle.exe:Twiddle:Rotational sliding block puzzle:Rotate the tiles around themselves to arrange them into order.
|
||||
undead:undead.exe:Undead:Monster-placing puzzle:Place ghosts, vampires and zombies so that the right numbers of them can be seen in mirrors.
|
||||
unequal:unequal.exe:Unequal:Latin square puzzle:Complete the latin square in accordance with the > signs.
|
||||
unruly:unruly.exe:Unruly:Black and white grid puzzle:Fill in the black and white grid to avoid runs of three.
|
||||
untangle:untangle.exe:Untangle:Planar graph layout puzzle:Reposition the points so that the lines do not cross.
|
||||
3065
apps/plugins/puzzles/src/grid.c
Normal file
3065
apps/plugins/puzzles/src/grid.c
Normal file
File diff suppressed because it is too large
Load diff
133
apps/plugins/puzzles/src/grid.h
Normal file
133
apps/plugins/puzzles/src/grid.h
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
/*
|
||||
* (c) Lambros Lambrou 2008
|
||||
*
|
||||
* Code for working with general grids, which can be any planar graph
|
||||
* with faces, edges and vertices (dots). Includes generators for a few
|
||||
* types of grid, including square, hexagonal, triangular and others.
|
||||
*/
|
||||
|
||||
#ifndef PUZZLES_GRID_H
|
||||
#define PUZZLES_GRID_H
|
||||
|
||||
#include "puzzles.h" /* for random_state */
|
||||
|
||||
/* Useful macros */
|
||||
#define SQ(x) ( (x) * (x) )
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Grid structures:
|
||||
* A grid is made up of faces, edges and dots. These structures hold
|
||||
* the incidence relationships between these types. For example, an
|
||||
* edge always joins two dots, and is adjacent to two faces.
|
||||
* The "grid_xxx **" members are lists of pointers which are dynamically
|
||||
* allocated during grid generation.
|
||||
* A pointer to a face/edge/dot will always point somewhere inside one of the
|
||||
* three lists of the main "grid" structure: faces, edges, dots.
|
||||
* Could have used integer offsets into these lists, but using actual
|
||||
* pointers instead gives us type-safety.
|
||||
*/
|
||||
|
||||
/* Need forward declarations */
|
||||
typedef struct grid_face grid_face;
|
||||
typedef struct grid_edge grid_edge;
|
||||
typedef struct grid_dot grid_dot;
|
||||
|
||||
struct grid_face {
|
||||
int order; /* Number of edges, also the number of dots */
|
||||
grid_edge **edges; /* edges around this face */
|
||||
grid_dot **dots; /* corners of this face */
|
||||
/*
|
||||
* For each face, we optionally compute and store its 'incentre'.
|
||||
* The incentre of a triangle is the centre of a circle tangent to
|
||||
* all three edges; I generalise the concept to arbitrary polygons
|
||||
* by defining it to be the centre of the largest circle you can fit
|
||||
* anywhere in the polygon. It's a useful thing to know because if
|
||||
* you want to draw any symbol or text in the face (e.g. clue
|
||||
* numbers in Loopy), that's the place it will most easily fit.
|
||||
*
|
||||
* When a grid is first generated, no face has this information
|
||||
* computed, because it's fiddly to do. You can call
|
||||
* grid_find_incentre() on a face, and it will fill in ix,iy below
|
||||
* and set has_incentre to indicate that it's done so.
|
||||
*/
|
||||
int has_incentre;
|
||||
int ix, iy; /* incentre (centre of largest inscribed circle) */
|
||||
};
|
||||
struct grid_edge {
|
||||
grid_dot *dot1, *dot2;
|
||||
grid_face *face1, *face2; /* Use NULL for the infinite outside face */
|
||||
};
|
||||
struct grid_dot {
|
||||
int order;
|
||||
grid_edge **edges;
|
||||
grid_face **faces; /* A NULL grid_face* means infinite outside face */
|
||||
|
||||
/* Position in some fairly arbitrary (Cartesian) coordinate system.
|
||||
* Use large enough values such that we can get away with
|
||||
* integer arithmetic, but small enough such that arithmetic
|
||||
* won't overflow. */
|
||||
int x, y;
|
||||
};
|
||||
typedef struct grid {
|
||||
/* These are (dynamically allocated) arrays of all the
|
||||
* faces, edges, dots that are in the grid. */
|
||||
int num_faces; grid_face *faces;
|
||||
int num_edges; grid_edge *edges;
|
||||
int num_dots; grid_dot *dots;
|
||||
|
||||
/* Cache the bounding-box of the grid, so the drawing-code can quickly
|
||||
* figure out the proper scaling to draw onto a given area. */
|
||||
int lowest_x, lowest_y, highest_x, highest_y;
|
||||
|
||||
/* A measure of tile size for this grid (in grid coordinates), to help
|
||||
* the renderer decide how large to draw the grid.
|
||||
* Roughly the size of a single tile - for example the side-length
|
||||
* of a square cell. */
|
||||
int tilesize;
|
||||
|
||||
/* We really don't want to copy this monstrosity!
|
||||
* A grid is immutable once generated.
|
||||
*/
|
||||
int refcount;
|
||||
} grid;
|
||||
|
||||
/* Grids are specified by type: GRID_SQUARE, GRID_KITE, etc. */
|
||||
|
||||
#define GRIDGEN_LIST(A) \
|
||||
A(SQUARE,square) \
|
||||
A(HONEYCOMB,honeycomb) \
|
||||
A(TRIANGULAR,triangular) \
|
||||
A(SNUBSQUARE,snubsquare) \
|
||||
A(CAIRO,cairo) \
|
||||
A(GREATHEXAGONAL,greathexagonal) \
|
||||
A(OCTAGONAL,octagonal) \
|
||||
A(KITE,kites) \
|
||||
A(FLORET,floret) \
|
||||
A(DODECAGONAL,dodecagonal) \
|
||||
A(GREATDODECAGONAL,greatdodecagonal) \
|
||||
A(GREATGREATDODECAGONAL,greatgreatdodecagonal) \
|
||||
A(PENROSE_P2,penrose_p2_kite) \
|
||||
A(PENROSE_P3,penrose_p3_thick)
|
||||
|
||||
#define ENUM(upper,lower) GRID_ ## upper,
|
||||
typedef enum grid_type { GRIDGEN_LIST(ENUM) GRID_TYPE_MAX } grid_type;
|
||||
#undef ENUM
|
||||
|
||||
/* Free directly after use if non-NULL. Will never contain an underscore
|
||||
* (so clients can safely use that as a separator). */
|
||||
char *grid_new_desc(grid_type type, int width, int height, random_state *rs);
|
||||
char *grid_validate_desc(grid_type type, int width, int height,
|
||||
const char *desc);
|
||||
|
||||
grid *grid_new(grid_type type, int width, int height, const char *desc);
|
||||
|
||||
void grid_free(grid *g);
|
||||
|
||||
grid_edge *grid_nearest_edge(grid *g, int x, int y);
|
||||
|
||||
void grid_compute_size(grid_type type, int width, int height,
|
||||
int *tilesize, int *xextent, int *yextent);
|
||||
|
||||
void grid_find_incentre(grid_face *f);
|
||||
|
||||
#endif /* PUZZLES_GRID_H */
|
||||
3311
apps/plugins/puzzles/src/gtk.c
Normal file
3311
apps/plugins/puzzles/src/gtk.c
Normal file
File diff suppressed because it is too large
Load diff
19
apps/plugins/puzzles/src/guess.R
Normal file
19
apps/plugins/puzzles/src/guess.R
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# -*- makefile -*-
|
||||
|
||||
guess : [X] GTK COMMON guess guess-icon|no-icon
|
||||
|
||||
guess : [G] WINDOWS COMMON guess guess.res|noicon.res
|
||||
|
||||
ALL += guess[COMBINED]
|
||||
|
||||
!begin am gtk
|
||||
GAMES += guess
|
||||
!end
|
||||
|
||||
!begin >list.c
|
||||
A(guess) \
|
||||
!end
|
||||
|
||||
!begin >gamedesc.txt
|
||||
guess:guess.exe:Guess:Combination-guessing puzzle:Guess the hidden combination of colours.
|
||||
!end
|
||||
1518
apps/plugins/puzzles/src/guess.c
Normal file
1518
apps/plugins/puzzles/src/guess.c
Normal file
File diff suppressed because it is too large
Load diff
94
apps/plugins/puzzles/src/guess.html
Normal file
94
apps/plugins/puzzles/src/guess.html
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=US-ASCII">
|
||||
<title>Guess</title>
|
||||
<link rel="previous" href="flip.html">
|
||||
<link rel="ToC" href="index.html">
|
||||
<link rel="up" href="index.html">
|
||||
<link rel="index" href="docindex.html">
|
||||
<link rel="next" href="pegs.html">
|
||||
</head>
|
||||
<body>
|
||||
<p><a href="flip.html">Previous</a> | <a href="index.html">Contents</a> | <a href="docindex.html">Index</a> | <a href="pegs.html">Next</a></p>
|
||||
<h1><a name="C15"></a>Chapter 15: <a name="i0"></a>Guess</h1>
|
||||
<p>
|
||||
You have a set of coloured pegs, and have to reproduce a predetermined sequence of them (chosen by the computer) within a certain number of guesses.
|
||||
</p>
|
||||
<p>
|
||||
Each guess gets marked with the number of correctly-coloured pegs in the correct places (in black), and also the number of correctly-coloured pegs in the wrong places (in white).
|
||||
</p>
|
||||
<p>
|
||||
This game is also known (and marketed, by Hasbro, mainly) as a board game ‘<a name="i1"></a>Mastermind’, with 6 colours, 4 pegs per row, and 10 guesses. However, this version allows custom settings of number of colours (up to 10), number of pegs per row, and number of guesses.
|
||||
</p>
|
||||
<p>
|
||||
Guess was contributed to this collection by James Harvey.
|
||||
</p>
|
||||
<h2><a name="S15.1"></a>15.1 <a name="i2"></a>Guess controls</h2>
|
||||
<p>
|
||||
This game can be played with either the keyboard or the mouse.
|
||||
</p>
|
||||
<p>
|
||||
With the mouse, drag a coloured peg from the tray on the left-hand side to its required position in the current guess; pegs may also be dragged from current and past guesses to copy them elsewhere. To remove a peg, drag it off its current position to somewhere invalid.
|
||||
</p>
|
||||
<p>
|
||||
Right-clicking in the current guess adds a ‘hold’ marker; pegs that have hold markers will be automatically added to the next guess after marking.
|
||||
</p>
|
||||
<p>
|
||||
Alternatively, with the keyboard, the up and down cursor keys can be used to select a peg colour, the left and right keys to select a peg position, and the space bar or Enter key to place a peg of the selected colour in the chosen position. ‘D’ or Backspace removes a peg, and Space adds a hold marker.
|
||||
</p>
|
||||
<p>
|
||||
Pressing ‘h’ or ‘?’ will fill the current guess with a suggested guess. Using this is not recommended for 10 or more pegs as it is slow.
|
||||
</p>
|
||||
<p>
|
||||
When the guess is complete, the smaller feedback pegs will be highlighted; clicking on these (or moving the peg cursor to them with the arrow keys and pressing the space bar or Enter key) will mark the current guess, copy any held pegs to the next guess, and move the ‘current guess’ marker.
|
||||
</p>
|
||||
<p>
|
||||
If you correctly position all the pegs the solution will be displayed below; if you run out of guesses (or select ‘Solve...’) the solution will also be revealed.
|
||||
</p>
|
||||
<p>
|
||||
(All the actions described in <a href="common.html#S2.1">section 2.1</a> are also available.)
|
||||
</p>
|
||||
<h2><a name="S15.2"></a>15.2 <a name="i3"></a>Guess parameters</h2>
|
||||
<p>
|
||||
These parameters are available from the ‘Custom...’ option on the ‘Type’ menu. The default game matches the parameters for the board game ‘Mastermind’.
|
||||
</p>
|
||||
<dl><dt>
|
||||
<em>Colours</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Number of colours the solution is chosen from; from 2 to 10 (more is harder).
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Pegs per guess</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Number of pegs per guess (more is harder).
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Guesses</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Number of guesses you have to find the solution in (fewer is harder).
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Allow blanks</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Allows blank pegs to be given as part of a guess (makes it easier, because you know that those will never be counted as part of the solution). This is turned off by default.
|
||||
<p>
|
||||
Note that this doesn't allow blank pegs in the solution; if you really wanted that, use one extra colour.
|
||||
</p>
|
||||
|
||||
</dd>
|
||||
<dt>
|
||||
<em>Allow duplicates</em>
|
||||
</dt>
|
||||
<dd>
|
||||
Allows the solution (and the guesses) to contain colours more than once; this increases the search space (making things harder), and is turned on by default.
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<hr><address></address></body>
|
||||
</html>
|
||||
16
apps/plugins/puzzles/src/html/blackbox.html
Normal file
16
apps/plugins/puzzles/src/html/blackbox.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Black Box
|
||||
<p>
|
||||
Determine where the hidden balls are in the box, by observing the
|
||||
behaviour of light beams fired into the box from the sides.
|
||||
<p>
|
||||
Click in a square around the edge of the box to send a beam into the
|
||||
box. Possible results are 'H' (the beam hit a ball dead-on and
|
||||
stopped), 'R' (the beam was either reflected back the way it came or
|
||||
there was a ball just to one side of its entry point) or a number
|
||||
appearing in two squares (indicating that the beam entered one of
|
||||
those squares and emerged from the other).
|
||||
<p>
|
||||
Click in the middle of the box to place your guessed ball positions.
|
||||
When you have placed enough, a green button will appear in the top
|
||||
left; click that to indicate that you think you have the answer.
|
||||
You can also right-click to mark squares as definitely known.
|
||||
13
apps/plugins/puzzles/src/html/bridges.html
Normal file
13
apps/plugins/puzzles/src/html/bridges.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Bridges
|
||||
<p>
|
||||
Draw horizontal or vertical bridges to link up all the islands.
|
||||
Bridges may be single or double; they may not cross; the islands
|
||||
must all end up connected to each other; the number in each island
|
||||
must match the number of bridges that end at that island (counting
|
||||
double bridges as two). Note that loops of bridges are permitted.
|
||||
<p>
|
||||
Click on an island and drag left, right, up or down to draw a bridge
|
||||
to the next island in that direction. Do the same again to create a
|
||||
double bridge, and again to remove the bridge if you change your
|
||||
mind. Click on an island without dragging to mark the island as
|
||||
completed once you think you have placed all its bridges.
|
||||
14
apps/plugins/puzzles/src/html/cube.html
Normal file
14
apps/plugins/puzzles/src/html/cube.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Cube
|
||||
<p>
|
||||
Roll the cube around the grid, picking up the blue squares on its
|
||||
faces. Try to get all the blue squares on to the object at the same
|
||||
time, in as few moves as possible.
|
||||
<p>
|
||||
Use the arrow keys to roll the cube, or click the mouse where you
|
||||
want it to roll towards. After every roll, the grid square and cube
|
||||
face that you brought into contact swap their colours, so that a
|
||||
non-blue cube face can pick up a blue square, but a blue face rolled
|
||||
on to a non-blue square puts it down again.
|
||||
<p>
|
||||
When you have mastered the cube, use the Type menu to select other
|
||||
regular solids!
|
||||
10
apps/plugins/puzzles/src/html/dominosa.html
Normal file
10
apps/plugins/puzzles/src/html/dominosa.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Dominosa
|
||||
<p>
|
||||
Tile the rectangle with dominoes (1×2 rectangles) so that
|
||||
every possible domino appears exactly once (that is, every possible
|
||||
pair of numbers, including doubles).
|
||||
<p>
|
||||
Click between two adjacent numbers to place or remove a domino.
|
||||
Right-click to place a line between numbers if you think a domino
|
||||
definitely cannot go there. Dominoes light up red if two identical
|
||||
ones appear on the grid.
|
||||
6
apps/plugins/puzzles/src/html/fifteen.html
Normal file
6
apps/plugins/puzzles/src/html/fifteen.html
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Fifteen
|
||||
<p>
|
||||
Slide the tiles around the box until they appear in numerical order
|
||||
from the top left, with the hole in the bottom right corner.
|
||||
<p>
|
||||
Click on a tile to slide it towards the hole.
|
||||
12
apps/plugins/puzzles/src/html/filling.html
Normal file
12
apps/plugins/puzzles/src/html/filling.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Filling
|
||||
<p>
|
||||
Write a number in every blank square of the grid. When the grid is
|
||||
full, every orthogonally connected group of identical numbers should
|
||||
have an area equal to that number: so 1s always appear alone, 2s in
|
||||
pairs, and so on.
|
||||
<p>
|
||||
To place a number, click the mouse in a blank square to select it,
|
||||
then type the number you want on the keyboard. You can also drag to
|
||||
select multiple squares, and then type a number to place it in all
|
||||
of them. To erase numbers, select one or more squares in the same
|
||||
way and then press Backspace.
|
||||
10
apps/plugins/puzzles/src/html/flip.html
Normal file
10
apps/plugins/puzzles/src/html/flip.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Flip
|
||||
<p>
|
||||
Try to light up all the squares in the grid by flipping combinations
|
||||
of them.
|
||||
<p>
|
||||
Click in a square to flip it and some of its neighbours. The diagram
|
||||
in each square indicates which other squares will flip.
|
||||
<p>
|
||||
Select one of the 'Random' settings from the Type menu for more
|
||||
varied puzzles.
|
||||
8
apps/plugins/puzzles/src/html/flood.html
Normal file
8
apps/plugins/puzzles/src/html/flood.html
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
Flood
|
||||
<p>
|
||||
Try to get the whole grid to be the same colour within the given
|
||||
number of moves, by repeatedly flood-filling the top left corner in
|
||||
different colours.
|
||||
<p>
|
||||
Click in a square to flood-fill the top left corner with that square's
|
||||
colour.
|
||||
11
apps/plugins/puzzles/src/html/galaxies.html
Normal file
11
apps/plugins/puzzles/src/html/galaxies.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Galaxies
|
||||
<p>
|
||||
Draw lines along grid edges so as to divide the grid up into
|
||||
regions. Every region should have two-way rotational symmetry, and
|
||||
should contain exactly one dot which is in its centre.
|
||||
<p>
|
||||
Click on a grid edge to add or remove a line. Right-click on a dot
|
||||
and drag the mouse to place an arrow in a grid square pointing to
|
||||
that dot, to indicate that you think that square must belong in the
|
||||
same region as that dot. Right-drag an existing arrow to move it, or
|
||||
drop it off the edge of the grid to remove it.
|
||||
52
apps/plugins/puzzles/src/html/group.html
Normal file
52
apps/plugins/puzzles/src/html/group.html
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
unfinished:Group
|
||||
<p>
|
||||
Fill in the grid with the letters shown to the top and left of it, so
|
||||
that the full grid is a valid
|
||||
<a href="http://en.wikipedia.org/wiki/Cayley_table">Cayley table</a>
|
||||
for a
|
||||
<a href="http://en.wikipedia.org/wiki/Group_(mathematics)">group</a>.
|
||||
<p>
|
||||
If you don't already know what a group is, I don't really recommend
|
||||
trying to play this game. But if you want to try anyway, the above is
|
||||
equivalent to saying that the following conditions must be satisfied:
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Latin square</strong>. Every row and column must contain
|
||||
exactly one of each letter.
|
||||
<li>
|
||||
<strong>Identity</strong>. There must be some letter <i>e</i> such
|
||||
that, for all <i>a</i>, the letter in row <i>e</i> column <i>a</i> and
|
||||
the one in row <i>a</i> column <i>e</i> are both <i>a</i>. In the
|
||||
default mode, this letter is always <i>e</i> and its row and column
|
||||
are filled in for you; by reconfiguring the game using the Type menu,
|
||||
you can select a mode in which you have to work out which letter is
|
||||
the identity.
|
||||
<li>
|
||||
<strong>Inverses</strong>. For every letter <i>a</i>, there must be
|
||||
some letter <i>b</i> (which may sometimes be the same letter
|
||||
as <i>a</i>) such that the letters in row <i>a</i> column <i>b</i> and
|
||||
in row <i>b</i> column <i>a</i> are both the identity letter (as
|
||||
defined above).
|
||||
<li>
|
||||
<strong>Associativity</strong>. For every combination of
|
||||
letters <i>a</i>, <i>b</i>, and <i>c</i>, denote the letter in
|
||||
row <i>a</i> column <i>b</i> by <i>d</i>, and the one in row <i>b</i>
|
||||
column <i>c</i> by <i>e</i>. Then the letters in row <i>d</i>
|
||||
column <i>c</i> and in row <i>a</i> column <i>e</i> must be the same.
|
||||
</ul>
|
||||
<p>
|
||||
To place a letter, click in a square to select it, then type the
|
||||
letter on the keyboard. To erase a letter, click to select a square
|
||||
and then press Backspace.
|
||||
<p>
|
||||
Right-click in a square and then type a letter to add or remove the
|
||||
number as a pencil mark, indicating letters that you think
|
||||
<em>might</em> go in that square.
|
||||
<p>
|
||||
You can rearrange the order of elements in the rows and columns by
|
||||
dragging the column or row headings back and forth. (The rows and
|
||||
columns will stay in sync with each other.) Also,
|
||||
left-clicking <em>between</em> two row or column headings will add or
|
||||
remove a thick line between those two rows and the corresponding pair
|
||||
of columns (which is useful if you're considering a subgroup and its
|
||||
cosets).
|
||||
12
apps/plugins/puzzles/src/html/guess.html
Normal file
12
apps/plugins/puzzles/src/html/guess.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Guess
|
||||
<p>
|
||||
Try to guess the hidden combination of colours. You will be given
|
||||
limited information about each guess you make, enabling you to
|
||||
refine the next guess.
|
||||
<p>
|
||||
Drag from the colours on the left into the topmost unfilled row to
|
||||
make a guess; then click on the small circles to submit that guess.
|
||||
The small circles give you your feedback: black pegs indicate how
|
||||
many of the colours you guessed were the right colour in the right
|
||||
place, and white pegs indicate how many of the rest were the right
|
||||
colours but in the wrong place.
|
||||
14
apps/plugins/puzzles/src/html/inertia.html
Normal file
14
apps/plugins/puzzles/src/html/inertia.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Inertia
|
||||
<p>
|
||||
Slide the ball around the grid picking up the gems. Every time the
|
||||
ball moves, it will keep sliding until it either hits a wall, or
|
||||
stops on a stop square (the broken circles). Try to collect every
|
||||
gem without running into any of the mines.
|
||||
<p>
|
||||
Use the numeric keypad to slide the ball horizontally, vertically or
|
||||
diagonally. Alternatively, click on the grid to make the ball move
|
||||
towards where you clicked.
|
||||
<p>
|
||||
If you hit a mine and explode, you can select Undo from the Game
|
||||
menu and continue playing; the game will track how many times you
|
||||
died.
|
||||
104
apps/plugins/puzzles/src/html/javapage.pl
Executable file
104
apps/plugins/puzzles/src/html/javapage.pl
Executable file
|
|
@ -0,0 +1,104 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
open my $footerfile, "<", shift @ARGV or die "footer: open: $!\n";
|
||||
my $footer = "";
|
||||
$footer .= $_ while <$footerfile>;
|
||||
close $footerfile;
|
||||
|
||||
for my $arg (@ARGV) {
|
||||
$arg =~ /(.*\/)?([^\/]+)\.html$/ or die;
|
||||
my $filename = $2;
|
||||
open my $gamefile, "<", $arg or die "$arg: open: $!\n";
|
||||
my $unfinished = 0;
|
||||
my $docname = $filename;
|
||||
chomp(my $puzzlename = <$gamefile>);
|
||||
while ($puzzlename =~ s/^([^:=]+)(=([^:]+))?://) {
|
||||
if ($1 eq "unfinished") {
|
||||
$unfinished = 1;
|
||||
} elsif ($1 eq "docname") {
|
||||
$docname = $3;
|
||||
} else {
|
||||
die "$arg: unknown keyword '$1'\n";
|
||||
}
|
||||
}
|
||||
my $instructions = "";
|
||||
$instructions .= $_ while <$gamefile>;
|
||||
close $gamefile;
|
||||
|
||||
open my $outpage, ">", "${filename}.html";
|
||||
|
||||
my $unfinishedtitlefragment = $unfinished ? "an unfinished puzzle " : "";
|
||||
my $unfinishedheading = $unfinished ? "<h2 align=center>an unfinished puzzle</h2>\n" : "";
|
||||
my $unfinishedpara;
|
||||
my $links;
|
||||
if ($unfinished) {
|
||||
$unfinishedpara = <<EOF;
|
||||
<p>
|
||||
You have found your way to a page containing an <em>unfinished</em>
|
||||
puzzle in my collection, not linked from the <a href="../">main
|
||||
puzzles page</a>. Don't be surprised if things are hard to understand
|
||||
or don't work as you expect.
|
||||
EOF
|
||||
$links = <<EOF;
|
||||
<p align="center">
|
||||
<a href="../">Back to main puzzles page</a> (which does not link to this)
|
||||
EOF
|
||||
} else {
|
||||
$unfinishedpara = "";
|
||||
$links = <<EOF;
|
||||
<p align="center">
|
||||
<a href="../doc/${docname}.html#${docname}">Full instructions</a>
|
||||
|
|
||||
<a href="../">Back to main puzzles page</a>
|
||||
EOF
|
||||
}
|
||||
|
||||
print $outpage <<EOF;
|
||||
<html>
|
||||
<head>
|
||||
<title>${puzzlename}, ${unfinishedtitlefragment}from Simon Tatham's Portable Puzzle Collection</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../sitestyle.css" name="Simon Tatham's Home Page Style">
|
||||
<script type="text/javascript" src="resize-puzzle-applet.js"></script>
|
||||
</head>
|
||||
<body onLoad="initResizablePuzzleApplet();">
|
||||
<h1 align=center>${puzzlename}</h1>
|
||||
${unfinishedheading}
|
||||
<h2 align=center>from Simon Tatham's Portable Puzzle Collection</h2>
|
||||
|
||||
${unfinishedpara}
|
||||
|
||||
<p align="center">
|
||||
<table cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<applet id="applet" archive="${filename}.jar" code="PuzzleApplet"
|
||||
width="700" height="500">
|
||||
</applet>
|
||||
</td>
|
||||
<td>
|
||||
<div id="eresize" style="width:5px;height:500px;cursor:e-resize;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<td>
|
||||
<div id="sresize" style="width:700px;height:5px;cursor:s-resize;"></div>
|
||||
</td>
|
||||
<td>
|
||||
<div id="seresize" style="width:5px;height:5px;cursor:se-resize;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
${instructions}
|
||||
|
||||
${links}
|
||||
|
||||
${footer}
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
close $outpage;
|
||||
}
|
||||
242
apps/plugins/puzzles/src/html/jspage.pl
Executable file
242
apps/plugins/puzzles/src/html/jspage.pl
Executable file
|
|
@ -0,0 +1,242 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
open my $footerfile, "<", shift @ARGV or die "footer: open: $!\n";
|
||||
my $footer = "";
|
||||
$footer .= $_ while <$footerfile>;
|
||||
close $footerfile;
|
||||
|
||||
for my $arg (@ARGV) {
|
||||
$arg =~ /(.*\/)?([^\/]+)\.html$/ or die;
|
||||
my $filename = $2;
|
||||
open my $gamefile, "<", $arg or die "$arg: open: $!\n";
|
||||
my $unfinished = 0;
|
||||
my $docname = $filename;
|
||||
chomp(my $puzzlename = <$gamefile>);
|
||||
while ($puzzlename =~ s/^([^:=]+)(=([^:]+))?://) {
|
||||
if ($1 eq "unfinished") {
|
||||
$unfinished = 1;
|
||||
} elsif ($1 eq "docname") {
|
||||
$docname = $3;
|
||||
} else {
|
||||
die "$arg: unknown keyword '$1'\n";
|
||||
}
|
||||
}
|
||||
my $instructions = "";
|
||||
$instructions .= $_ while <$gamefile>;
|
||||
close $gamefile;
|
||||
|
||||
open my $outpage, ">", "${filename}.html";
|
||||
|
||||
my $unfinishedtitlefragment = $unfinished ? "an unfinished puzzle " : "";
|
||||
my $unfinishedheading = $unfinished ? "<h2 align=center>an unfinished puzzle</h2>\n" : "";
|
||||
my $unfinishedpara;
|
||||
my $links;
|
||||
if ($unfinished) {
|
||||
$unfinishedpara = <<EOF;
|
||||
<p>
|
||||
You have found your way to a page containing an <em>unfinished</em>
|
||||
puzzle in my collection, not linked from the <a href="../">main
|
||||
puzzles page</a>. Don't be surprised if things are hard to understand
|
||||
or don't work as you expect.
|
||||
EOF
|
||||
$links = <<EOF;
|
||||
<p align="center">
|
||||
<a href="../">Back to main puzzles page</a> (which does not link to this)
|
||||
EOF
|
||||
} else {
|
||||
$unfinishedpara = "";
|
||||
$links = <<EOF;
|
||||
<p align="center">
|
||||
<a href="../doc/${docname}.html#${docname}">Full instructions</a>
|
||||
|
|
||||
<a href="../">Back to main puzzles page</a>
|
||||
EOF
|
||||
}
|
||||
|
||||
print $outpage <<EOF;
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ASCII" />
|
||||
<title>${puzzlename}, ${unfinishedtitlefragment}from Simon Tatham's Portable Puzzle Collection</title>
|
||||
<script type="text/javascript" src="${filename}.js"></script>
|
||||
<style class="text/css">
|
||||
/* Margins and centring on the top-level div for the game menu */
|
||||
#gamemenu { margin-top: 0; margin-bottom: 0.5em; text-align: center }
|
||||
|
||||
/* Inside that div, the main menu bar and every submenu inside it is a <ul> */
|
||||
#gamemenu ul {
|
||||
list-style: none; /* get rid of the normal unordered-list bullets */
|
||||
display: inline; /* make top-level menu bar items appear side by side */
|
||||
position: relative; /* allow submenus to position themselves near parent */
|
||||
margin: 0;
|
||||
margin-bottom: 0.5em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Individual menu items are <li> elements within such a <ul> */
|
||||
#gamemenu ul li {
|
||||
/* Add a little mild text formatting */
|
||||
font-weight: bold; font-size: 0.8em;
|
||||
/* Line height and padding appropriate to top-level menu items */
|
||||
padding-left: 0.75em; padding-right: 0.75em;
|
||||
padding-top: 0.2em; padding-bottom: 0.2em;
|
||||
margin: 0;
|
||||
/* Make top-level menu items appear side by side, not vertically stacked */
|
||||
display: inline;
|
||||
/* Suppress the text-selection I-beam pointer */
|
||||
cursor: default;
|
||||
/* Surround each menu item with a border. The left border is removed
|
||||
* because it will abut the right border of the previous item. (A rule
|
||||
* below will reinstate the left border for the leftmost menu item.) */
|
||||
border-left: 0;
|
||||
border-right: 1px solid rgba(0,0,0,0.3);
|
||||
border-top: 1px solid rgba(0,0,0,0.3);
|
||||
border-bottom: 1px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
#gamemenu ul li.disabled {
|
||||
/* Grey out menu items with the "disabled" class */
|
||||
color: rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
#gamemenu ul li:first-of-type {
|
||||
/* Reinstate the left border for the leftmost top-level menu item */
|
||||
border-left: 1px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
#gamemenu ul li:hover {
|
||||
/* When the mouse is over a menu item, highlight it */
|
||||
background: rgba(0,0,0,0.3);
|
||||
/* Set position:relative, so that if this item has a submenu it can
|
||||
* position itself relative to the parent item. */
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#gamemenu ul li.disabled:hover {
|
||||
/* Disabled menu items don't get a highlight on mouse hover */
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
#gamemenu ul ul {
|
||||
/* Second-level menus and below are not displayed by default */
|
||||
display: none;
|
||||
/* When they are displayed, they are positioned immediately below
|
||||
* their parent <li>, and with the left edge aligning */
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
/* We must specify an explicit background colour for submenus, because
|
||||
* they must be opaque (don't want other page contents showing through
|
||||
* them). */
|
||||
background: white;
|
||||
/* And make sure they appear in front. */
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#gamemenu ul ul.left {
|
||||
/* A second-level menu with class "left" aligns its right edge with
|
||||
* its parent, rather than its left edge */
|
||||
left: inherit; right: 0;
|
||||
}
|
||||
|
||||
/* Menu items in second-level menus and below */
|
||||
#gamemenu ul ul li {
|
||||
/* Go back to vertical stacking, for drop-down submenus */
|
||||
display: block;
|
||||
/* Inhibit wrapping, so the submenu will expand its width as needed. */
|
||||
white-space: nowrap;
|
||||
/* Override the text-align:center from above */
|
||||
text-align: left;
|
||||
/* Don't make the text any smaller than the previous level of menu */
|
||||
font-size: 100%;
|
||||
/* This time it's the top border that we omit on all but the first
|
||||
* element in the submenu, since now they're vertically stacked */
|
||||
border-left: 1px solid rgba(0,0,0,0.3);
|
||||
border-right: 1px solid rgba(0,0,0,0.3);
|
||||
border-top: 0;
|
||||
border-bottom: 1px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
#gamemenu ul ul li:first-of-type {
|
||||
/* Reinstate top border for first item in a submenu */
|
||||
border-top: 1px solid rgba(0,0,0,0.3);
|
||||
}
|
||||
|
||||
#gamemenu ul ul ul {
|
||||
/* Third-level submenus are drawn to the side of their parent menu
|
||||
* item, not below it */
|
||||
top: 0; left: 100%;
|
||||
}
|
||||
|
||||
#gamemenu ul ul ul.left {
|
||||
/* A submenu with class "left" goes to the left of its parent,
|
||||
* not the right */
|
||||
left: inherit; right: 100%;
|
||||
}
|
||||
|
||||
#gamemenu ul li:hover > ul {
|
||||
/* Last but by no means least, the all-important line that makes
|
||||
* submenus be displayed! Any <ul> whose parent <li> is being
|
||||
* hovered over gets display:block overriding the display:none
|
||||
* from above. */
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body onLoad="initPuzzle();">
|
||||
<h1 align=center>${puzzlename}</h1>
|
||||
${unfinishedheading}
|
||||
<h2 align=center>from Simon Tatham's Portable Puzzle Collection</h2>
|
||||
|
||||
${unfinishedpara}
|
||||
|
||||
<hr>
|
||||
<div id="puzzle" style="display: none">
|
||||
<div id="gamemenu"><ul><li id="new">New game</li
|
||||
><li id="restart">Restart game</li
|
||||
><li id="undo">Undo move</li
|
||||
><li id="redo">Redo move</li
|
||||
><li id="solve">Solve game</li
|
||||
><li id="specific">Enter game ID</li
|
||||
><li id="random">Enter random seed</li
|
||||
><li>Select game type<ul id="gametype" class="left"></ul></li
|
||||
></ul></div>
|
||||
<div align=center>
|
||||
<div id="resizable" style="position:relative; left:0; top:0">
|
||||
<canvas style="display: block" id="puzzlecanvas" width="1px" height="1px" tabindex="1">
|
||||
</canvas>
|
||||
<div id="statusbarholder" style="display: block">
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Link to this puzzle:
|
||||
<a id="permalink-desc">by game ID</a>
|
||||
<a id="permalink-seed">by random seed</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="apology">
|
||||
Sorry, this Javascript puzzle doesn't seem to work in your web
|
||||
browser. Perhaps you have Javascript disabled, or perhaps your browser
|
||||
doesn't provide a feature that the puzzle code requires (such as
|
||||
<a href="https://developer.mozilla.org/en-US/docs/JavaScript/Typed_arrays">typed arrays</a>).
|
||||
These puzzles have been successfully run in Firefox 19, Chrome 26,
|
||||
Internet Explorer 10 and Safari 6.
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
${instructions}
|
||||
|
||||
${links}
|
||||
|
||||
${footer}
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
close $outpage;
|
||||
}
|
||||
15
apps/plugins/puzzles/src/html/keen.html
Normal file
15
apps/plugins/puzzles/src/html/keen.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Keen
|
||||
<p>
|
||||
Fill in the grid with digits from 1 to the grid size, so that every
|
||||
digit appears exactly once in each row and column, and so that all
|
||||
the arithmetic clues are satisfied (i.e. the clue number in each
|
||||
thick box should be possible to construct from the digits in the box
|
||||
using the specified arithmetic operation).
|
||||
<p>
|
||||
To place a number, click in a square to select it, then type the
|
||||
number on the keyboard. To erase a number, click to select a square
|
||||
and then press Backspace.
|
||||
<p>
|
||||
Right-click in a square and then type a number to add or remove the
|
||||
number as a pencil mark, indicating numbers that you think
|
||||
<em>might</em> go in that square.
|
||||
10
apps/plugins/puzzles/src/html/lightup.html
Normal file
10
apps/plugins/puzzles/src/html/lightup.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Light Up
|
||||
<p>
|
||||
Place light bulbs in the grid so as to light up all the blank
|
||||
squares. A light illuminates its own square and all the squares in
|
||||
the same row or column unless blocked by walls (black squares).
|
||||
Lights may not illuminate each other. Each numbered square must be
|
||||
orthogonally adjacent to exactly the given number of lights.
|
||||
<p>
|
||||
Click on a square to place or remove a light. Right-click to place a
|
||||
dot indicating that you think there is no light in that square.
|
||||
13
apps/plugins/puzzles/src/html/loopy.html
Normal file
13
apps/plugins/puzzles/src/html/loopy.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Loopy
|
||||
<p>
|
||||
Form a single closed loop out of the grid edges, in such a way that
|
||||
every numbered square has exactly that many of its edges included in
|
||||
the loop.
|
||||
<p>
|
||||
Click on a grid edge to mark it as part of the loop (black), and
|
||||
again to return to marking it as undecided (yellow). Right-click on
|
||||
a grid edge to mark it as definitely not part of the loop (faint
|
||||
grey), and again to mark it as undecided again.
|
||||
<p>
|
||||
When you have mastered the square grid, look in the Type menu for
|
||||
many other types of tiling!
|
||||
17
apps/plugins/puzzles/src/html/magnets.html
Normal file
17
apps/plugins/puzzles/src/html/magnets.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Magnets
|
||||
<p>
|
||||
Fill each domino shape with either a magnet (consisting of a + and
|
||||
− pole) or a neutral domino (green).
|
||||
<p>
|
||||
The number of + poles that in each row and column must match the
|
||||
numbers along the top and left; the number of − poles must
|
||||
match the numbers along the bottom and right. Two + poles may not be
|
||||
orthogonally adjacent to each other, and similarly two − poles.
|
||||
<p>
|
||||
Left-click a domino to toggle it between being empty and being a
|
||||
magnet (the + is placed in the end you click). Right-click to toggle
|
||||
between empty, neutral, and a ?? mark indicating that you're sure
|
||||
it's a magnet but don't yet know which way round it goes.
|
||||
<p>
|
||||
Left-click a clue to mark it as done (grey it out). To unmark a clue
|
||||
as done, left-click it again.
|
||||
15
apps/plugins/puzzles/src/html/map.html
Normal file
15
apps/plugins/puzzles/src/html/map.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Map
|
||||
<p>
|
||||
Colour the map with four colours, so that no two adjacent regions
|
||||
have the same colour. (Regions touching at only one corner do not
|
||||
count as adjacent.) There is a unique colouring consistent with the
|
||||
coloured regions you are already given.
|
||||
<p>
|
||||
Drag from a coloured region to a blank one to colour the latter the
|
||||
same colour as the former. Drag from outside the grid into a region
|
||||
to erase its colour. (You cannot change the colours of the regions
|
||||
you are given at the start of the game.)
|
||||
<p>
|
||||
Right-drag from a coloured region to a blank one to add dots marking
|
||||
the latter region as <em>possibly</em> the same colour as the
|
||||
former, or to remove those dots again.
|
||||
18
apps/plugins/puzzles/src/html/mines.html
Normal file
18
apps/plugins/puzzles/src/html/mines.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
Mines
|
||||
<p>
|
||||
Try to expose every square in the grid that is not one of the hidden
|
||||
mines, without opening any square that is a mine.
|
||||
<p>
|
||||
Click in a square to open it. Every opened square are marked with
|
||||
the number of mines in the surrounding 8 squares, if there are any;
|
||||
if not, all the surrounding squares are automatically opened.
|
||||
<p>
|
||||
Right-click in a square to mark it with a flag if you think it is a
|
||||
mine. If a numbered square has exactly the right number of flags
|
||||
around it, you can click in it to open all the squares around it
|
||||
that are not flagged.
|
||||
<p>
|
||||
The first square you open is guaranteed to be safe, and (by default)
|
||||
you are guaranteed to be able to solve the whole grid by deduction
|
||||
rather than guesswork. (Deductions may require you to think about
|
||||
the total number of mines.)
|
||||
17
apps/plugins/puzzles/src/html/net.html
Normal file
17
apps/plugins/puzzles/src/html/net.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Net
|
||||
<p>
|
||||
Rotate the grid squares so that they all join up into a single
|
||||
connected network with no loops.
|
||||
<p>
|
||||
Left-click in a square to rotate it anticlockwise. Right-click to
|
||||
rotate it clockwise. Middle-click, or shift-left-click if you have
|
||||
no middle mouse button, to lock a square once you think it is
|
||||
correct (so you don't accidentally rotate it again); do the same
|
||||
again to unlock it if you change your mind.
|
||||
<p>
|
||||
Squares connected to the middle square are lit up. Aim to light up
|
||||
every square in the grid (not just the endpoint blobs).
|
||||
<p>
|
||||
When this gets too easy, select a 'wrapping' variant from the Type
|
||||
menu to enable grid lines to run off one edge of the playing area
|
||||
and come back on the opposite edge!
|
||||
14
apps/plugins/puzzles/src/html/netslide.html
Normal file
14
apps/plugins/puzzles/src/html/netslide.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Netslide
|
||||
<p>
|
||||
Slide the grid squares around so that they all join up into a single
|
||||
connected network with no loops.
|
||||
<p>
|
||||
Click on the arrows at the edges of the grid to move a row or column
|
||||
left, right, up or down. The square that falls off the end of the
|
||||
row comes back on the other end.
|
||||
<p>
|
||||
Squares connected to the middle square are lit up. Aim to light up
|
||||
every square in the grid (not just the endpoint blobs).
|
||||
<p>
|
||||
Connecting across a red barrier line is forbidden. On harder levels,
|
||||
there are fewer barriers, which makes it harder rather than easier!
|
||||
11
apps/plugins/puzzles/src/html/palisade.html
Normal file
11
apps/plugins/puzzles/src/html/palisade.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
Palisade
|
||||
<p>
|
||||
Draw lines along the grid edges, in such a way that the grid is
|
||||
divided into connected regions, all of the size shown in the status
|
||||
line. Also, each square containing a number should have that many of
|
||||
its edges drawn in.
|
||||
<p>
|
||||
Click on a grid edge to mark it as a division between regions (black),
|
||||
and again to return to marking it as undecided (yellow). Right-click
|
||||
on a grid edge to mark it as definitely not part of the loop (faint
|
||||
grey), and again to mark it as undecided again.
|
||||
12
apps/plugins/puzzles/src/html/pattern.html
Normal file
12
apps/plugins/puzzles/src/html/pattern.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Pattern
|
||||
<p>
|
||||
Fill in the grid with a pattern of black and white squares, so that
|
||||
the numbers in each row and column match the lengths of consecutive
|
||||
runs of black squares.
|
||||
<p>
|
||||
Left-click in a square to mark it black; right-click (or hold Ctrl
|
||||
while left-clicking) to mark it white. Click and drag along a row or
|
||||
column to mark multiple squares black or white at once. Middle-click
|
||||
(or hold Shift while left-clicking) to return a square to grey
|
||||
(meaning undecided): dragging like that can erase a whole rectangle,
|
||||
not just a row or column.
|
||||
13
apps/plugins/puzzles/src/html/pearl.html
Normal file
13
apps/plugins/puzzles/src/html/pearl.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Pearl
|
||||
<p>
|
||||
Draw a single closed loop by connecting together the centres of
|
||||
adjacent grid squares, so that some squares end up as corners, some as
|
||||
straights (horizontal or vertical), and some may be empty. Every
|
||||
square containing a black circle must be a corner not connected
|
||||
directly to another corner; every square containing a white circle
|
||||
must be a straight which is connected to <em>at least one</em> corner.
|
||||
<p>
|
||||
Drag between squares to draw or undraw pieces of the loop.
|
||||
Alternatively, left-click the edge between two squares to turn it on
|
||||
or off. Right-click an edge to mark it with a cross indicating that
|
||||
you are sure the loop does not go through it.
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue