3
# This file describes which puzzle binaries are made up from which
4
# object and resource files. It is processed into the various
5
# Makefiles by means of a Perl script. Makefile changes should
6
# really be made by editing this file and/or the Perl script, not
7
# by editing the actual Makefiles.
11
!makefile gtk Makefile.gtk
12
!makefile am Makefile.am
13
!makefile vc Makefile.vc
14
!makefile wce Makefile.wce
15
!makefile cygwin Makefile.cyg
16
!makefile osx Makefile.osx
17
!makefile gnustep Makefile.gnustep
18
!makefile nestedvm Makefile.nestedvm
19
!makefile emcc Makefile.emcc
23
WINDOWS_COMMON = printing
24
+ user32.lib gdi32.lib comctl32.lib comdlg32.lib winspool.lib
25
WINDOWS = windows WINDOWS_COMMON
26
COMMON = midend drawing misc malloc random version
28
# Objects needed for auxiliary command-line programs.
29
STANDALONE = nullfe random misc malloc
33
# First half of list.c.
36
* list.c: List of pointers to puzzle structures, for monolithic
39
* This file is automatically generated by mkfiles.pl. Do not edit
40
* it directly, or the changes will be lost next time mkfiles.pl runs.
41
* Instead, edit Recipe and/or its *.R subfiles.
47
# Now each .R file adds part of the macro definition of GAMELIST to list.c.
50
# Then we finish up list.c as follows:
53
#define DECL(x) extern const game x;
56
const game *gamelist[] = { GAMELIST(REF) };
57
const int gamecount = lenof(gamelist);
60
# Unix standalone application for special-purpose obfuscation.
61
obfusc : [U] obfusc STANDALONE
63
puzzles : [G] windows[COMBINED] WINDOWS_COMMON COMMON ALL noicon.res
65
# Mac OS X unified application containing all the puzzles.
66
Puzzles : [MX] osx osx.icns osx-info.plist COMMON ALL
67
# For OS X, we must create the online help and include it in the
68
# application bundle.) Also we add -DCOMBINED to the compiler flags
69
# so as to inform the code that we're building a single binary for
70
# all the puzzles. Then I've also got some code in here to build a
71
# distributable .dmg disk image.
73
Puzzles_extra = Puzzles.app/Contents/Resources/Help/index.html
74
Puzzles.app/Contents/Resources/Help/index.html: \
75
Puzzles.app/Contents/Resources/Help osx-help.but puzzles.but
76
cd Puzzles.app/Contents/Resources/Help; \
77
halibut --html ../../../../osx-help.but ../../../../puzzles.but
78
Puzzles.app/Contents/Resources/Help: Puzzles.app/Contents/Resources
79
mkdir -p Puzzles.app/Contents/Resources/Help
84
hdiutil create -megabytes 5 -layout NONE raw.dmg
85
hdid -nomount raw.dmg > devicename
86
newfs_hfs -v "Simon Tatham's Puzzle Collection" `cat devicename`
87
hdiutil eject `cat devicename`
88
hdid raw.dmg | cut -f1 -d' ' > devicename
89
cp -R Puzzles.app /Volumes/"Simon Tatham's Puzzle Collection"
90
hdiutil eject `cat devicename`
92
hdiutil convert -format UDCO raw.dmg -o Puzzles.dmg
93
rm -f raw.dmg devicename
97
bin_PROGRAMS = $(GAMES)
103
# make install for Unix.
106
for i in $(GAMES); do \
107
$(INSTALL_PROGRAM) -m 755 $(BINPREFIX)$$i $(DESTDIR)$(gamesdir)/$(BINPREFIX)$$i \
114
java -cp $(NESTEDVM)/build:$(NESTEDVM)/upstream/build/classgen/build \
115
org.ibex.nestedvm.Compiler -outformat class -d . \
117
mv PuzzleEngine.class $@
120
mkdir -p org/ibex/nestedvm/util
121
cp $(NESTEDVM)/build/org/ibex/nestedvm/Registers.class org/ibex/nestedvm
122
cp $(NESTEDVM)/build/org/ibex/nestedvm/UsermodeConstants.class org/ibex/nestedvm
123
cp $(NESTEDVM)/build/org/ibex/nestedvm/Runtime*.class org/ibex/nestedvm
124
cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Platform*.class org/ibex/nestedvm/util
125
cp $(NESTEDVM)/build/org/ibex/nestedvm/util/Seekable*.class org/ibex/nestedvm/util
126
echo "Main-Class: PuzzleApplet" >applet.manifest
128
PuzzleApplet.class: PuzzleApplet.java org
129
javac -source 1.3 -target 1.3 PuzzleApplet.java
131
%.jar: %.class PuzzleApplet.class org
132
mv $< PuzzleEngine.class
133
jar cfm $@ applet.manifest PuzzleEngine.class PuzzleApplet*.class org
134
echo '<applet archive="'$@'" code="PuzzleApplet" width="700" height="500"></applet>' >$*.html
135
mv PuzzleEngine.class $<
138
# A benchmarking and testing target for the GTK puzzles.
140
test: benchmark.html benchmark.txt
142
benchmark.html: benchmark.txt benchmark.pl
143
./benchmark.pl benchmark.txt > $@
145
benchmark.txt: $(GAMES)
146
for i in $(GAMES); do \
147
for params in $$(env -i ./$(BINPREFIX)$$i --list-presets | cut -f1 -d' '); do \
148
env -i ./$(BINPREFIX)$$i --test-solve --time-generation --generate 100 $$params \