50
50
# Then we finish up list.c as follows:
54
extern const game x; \
55
extern const char *const *const x##_xpm_icons[]; \
56
extern const int x##_n_xpm_icons;
57
#define REF(x) { #x, &x, x##_xpm_icons, &x##_n_xpm_icons },
53
#define DECL(x) extern const game x;
59
const gameindex gamelist[] = { GAMELIST(REF) };
56
const game *gamelist[] = { GAMELIST(REF) };
60
57
const int gamecount = lenof(gamelist);
96
93
rm -f raw.dmg devicename
99
# Gtk unified application containing all the puzzles.
100
puzzles : [X] GTK COMMON ALL ALL_ICONS
102
%-icon.o : override CFLAGS += -Dxpm_icons=$(@:%-icon.o=%)_xpm_icons -Dn_xpm_icons=$(@:%-icon.o=%)_n_xpm_icons
105
# Version management.
108
cl $(VER) $(CFLAGS) /c version.c
110
!specialobj vc version
113
$(CC) $(VER) $(CFLAGS) /c version.c
115
!specialobj wce version
119
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) $(VER) -c version.c
121
!specialobj cygwin version
122
# For Unix, we also need the gross MD5 hack that causes automatic
123
# version number selection in release source archives.
125
version.o: version.c version2.def
126
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c
128
if test -z "$(VER)" && test -f manifest && md5sum -c manifest; then \
129
cat version.def > version2.def.new; \
130
elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
131
echo "-DREVISION=`svnversion .`" >version2.def.new; \
133
echo "$(VER)" >version2.def.new; \
135
if diff -q version2.def.new version2.def; then \
136
rm version2.def.new; \
138
mv version2.def.new version2.def; \
142
!specialobj gtk version
144
version.o: version.c version2.def
145
$(CC) $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c
147
if test -z "$(VER)" && test -f manifest && md5sum -c manifest; then \
148
cat version.def > version2.def.new; \
149
elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
150
echo "-DREVISION=`svnversion .`" >version2.def.new; \
152
echo "$(VER)" >version2.def.new; \
154
if diff -q version2.def.new version2.def; then \
155
rm version2.def.new; \
157
mv version2.def.new version2.def; \
161
!specialobj nestedvm version
162
# For OS X, this is made more fiddly by the fact that we don't have
163
# md5sum readily available. We do, however, have `md5 -r' which
164
# generates _nearly_ the same output, but it has no check function.
166
version.ppc.o: version.c version2.def
167
$(CC) -arch ppc $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c -o $@
168
version.i386.o: version.c version2.def
169
$(CC) -arch i386 $(COMPAT) $(XFLAGS) $(CFLAGS) `cat version2.def` -c version.c -o $@
171
if test -z "$(VER)" && test -f manifest && (md5 -r `awk '{print $$2}' manifest` | diff -w manifest -); then \
172
cat version.def > version2.def.new; \
173
elif test -z "$(VER)" && test -d .svn && svnversion . >/dev/null 2>&1; then \
174
echo "-DREVISION=`svnversion .`" >version2.def.new; \
176
echo "$(VER)" >version2.def.new; \
178
if diff -q version2.def.new version2.def; then \
179
rm version2.def.new; \
181
mv version2.def.new version2.def; \
185
!specialobj osx version
97
bin_PROGRAMS = $(GAMES)
98
GTK_CFLAGS += -DSHAREDIR="\"$(datarootdir)\""
187
104
# make install for Unix.
190
mkdir -p $(DESTDIR)$(libdir)/sgt-puzzles
191
$(INSTALL_PROGRAM) -m 755 puzzles \
192
$(DESTDIR)$(libdir)/sgt-puzzles/puzzles
193
107
for i in $(GAMES); do \
194
ln -s $(libdir)/sgt-puzzles/puzzles $(DESTDIR)$(gamesdir)/$(BINPREFIX)$$i \
108
$(INSTALL_PROGRAM) -m 755 $(BINPREFIX)$$i $(DESTDIR)$(gamesdir)/$(BINPREFIX)$$i \