+
+
+# These hacks have interdependencies with others, so we can't build without
+# including them or there are link errors:
+#
+ANDROID_BASE_HACKS= \
+ apple2 \
+ bubble3d \
+ pacman \
+ polyhedra \
+ sonar \
+ sproingies \
+
+# These are the ones that currently work, at least to some degree:
+#
+export ANDROID_HACKS= \
+ $(ANDROID_BASE_HACKS) \
+ abstractile \
+ anemone \
+ anemotaxis \
+ antmaze \
+ antspotlight \
+ apollonian \
+ atlantis \
+ attraction \
+ atunnel \
+ binaryring \
+ blaster \
+ blinkbox \
+ blocktube \
+ boing \
+ bouboule \
+ bouncingcow \
+ boxed \
+ boxfit \
+ braid \
+ bsod \
+ cage \
+ ccurve \
+ celtic \
+ circuit \
+ cloudlife \
+ companioncube \
+ compass \
+ coral \
+ crackberg \
+ crumbler \
+ crystal \
+ cube21 \
+ cubenetic \
+ cubestack \
+ cubestorm \
+ cubetwist \
+ cubicgrid \
+ cwaves \
+ cynosure \
+ dangerball \
+ decayscreen \
+ deco \
+ deluxe \
+ demon \
+ discoball \
+ discrete \
+ distort \
+ dnalogo \
+ drift \
+ dymaxionmap \
+ energystream \
+ engine \
+ epicycle \
+ eruption \
+ euler2d \
+ fadeplot \
+ fiberlamp \
+ fireworkx \
+ flame \
+ flipflop \
+ flow \
+ fluidballs \
+ flyingtoasters \
+ fuzzyflakes \
+ galaxy \
+ gears \
+ geodesic \
+ geodesicgears \
+ gflux \
+ glblur \
+ glcells \
+ glhanoi \
+ glknots \
+ glmatrix \
+ glplanet \
+ glschool \
+ glsnake \
+ gltext \
+ goop \
+ grav \
+ greynetic \
+ halo \
+ helix \
+ hexadrop \
+ hexstrut \
+ hilbert \
+ hopalong \
+ hypertorus \
+ hypnowheel \
+ ifs \
+ imsmap \
+ interaggregate \
+ interference \
+ intermomentary \
+ jigsaw \
+ julia \
+ kaleidescope \
+ kaleidocycle \
+ klein \
+ kumppa \
+ lament \
+ lavalite \
+ loop \
+ m6502 \
+ maze \
+ maze3d \
+ memscroller \
+ menger \
+ metaballs \
+ mirrorblob \
+ moebius \
+ moebiusgears \
+ moire \
+ moire2 \
+ morph3d \
+ mountain \
+ munch \
+ nerverot \
+ noof \
+ noseguy \
+ peepers \
+ penetrate \
+ penrose \
+ petri \
+ piecewise \
+ pinion \
+ pipes \
+ polytopes \
+ pong \
+ popsquares \
+ projectiveplane \
+ providence \
+ pulsar \
+ pyro \
+ quasicrystal \
+ raverhoop \
+ razzledazzle \
+ rd-bomb \
+ ripples \
+ rocks \
+ romanboy \
+ rorschach \
+ rotzoomer \
+ rubik \
+ rubikblocks \
+ sballs \
+ shadebobs \
+ sierpinski \
+ sierpinski3d \
+ skytentacles \
+ slidescreen \
+ slip \
+ spheremonics \
+ splitflap \
+ splodesic \
+ squiral \
+ stairs \
+ stonerview \
+ strange \
+ substrate \
+ superquadrics \
+ surfaces \
+ swirl \
+ tangram \
+ thornbird \
+ timetunnel \
+ topblock \
+ triangle \
+ tronbit \
+ truchet \
+ twang \
+ unknownpleasures \
+ vermiculate \
+ vigilance \
+ voronoi \
+ wander \
+ whirlwindwarp \
+ winduprobot \
+ wormhole \
+ xflame \
+ xjack \
+ xlyap \
+ xrayswarm \
+ xspirograph \
+
+
+# These don't work well enough to turn on by default:
+#
+ANDROID_TODO= \
+ antinspect \
+ barcode \
+ blitspin \
+ bumps \
+ carousel \
+ cityflow \
+ endgame \
+ esper \
+ flipscreen3d \
+ fliptext \
+ fontglide \
+ gleidescope \
+ glslideshow \
+ halftone \
+ jigglypuff \
+ juggler3d \
+ molecule \
+ pedal \
+ phosphor \
+ photopile \
+ polyominoes \
+ qix \
+ queens \
+ speedmine \
+ spotlight \
+ starfish \
+ starwars \
+ tessellimage \
+ testx11 \
+ unicrud \
+ xanalogtv \
+ xmatrix \
+ zoom \
+
+
+# Download and resize images from jwz.org.
+# This saves us having to include 4MB of images in the tar file
+# that will only be used by a vast minority of people building
+# from source.
+# Android actually wants these to be 160x160 but our source is 200x150.
+
+URL = https://www.jwz.org/xscreensaver/screenshots/
+WGET = wget -q -U xscreensaver-build-android
+CVT = -thumbnail '150x150^' -gravity center -extent 150x150 \
+ \( +clone -alpha extract \
+ -draw 'fill black polygon 0,0 0,15 15,0 fill white circle 15,15 15,0' \
+ \( +clone -flip \) -compose Multiply -composite \
+ \( +clone -flop \) -compose Multiply -composite \
+ \) -alpha off -compose CopyOpacity -composite \
+ -colorspace sRGB \
+ -strip \
+ -quality 95 \
+ +dither -colors 128
+
+# If we are making the m6502 hack, create the header file for Android
+m6502.h::
+ @for h in $(ANDROID_HACKS) ; do \
+ if [ $${h} = "m6502" ] ; then \
+ echo "Making $${h} header ..."; \
+ ../hacks/m6502.sh ../hacks/m6502.h ../hacks/images/m6502/*.asm ; \
+ echo "Made $${h} header"; \
+ fi; \
+ done
+
+xscreensaver/res/drawable/%.png:
+ @\
+ FILE1=`echo "$@" | sed 's!^.*/\([^/]*\)\.png$$!\1.jpg!'` ; \
+ FILE2="$@" ; \
+ FILE1=`echo "$$FILE1" | sed s/rdbomb/rd-bomb/` ; \
+ FILE2=`echo "$$FILE2" | sed s/rd-bomb/rdbomb/` ; \
+ URL="$(URL)$$FILE1" ; \
+ echo "converting $$URL..." ; \
+ rm -f "$$FILE2" ; \
+ $(WGET) -O- "$$URL" | \
+ convert jpg:- $(CVT) "$$FILE2" ; \
+ if [ ! -s "$$FILE2" ]; then \
+ echo "$$FILE2 failed" >&2 ; \
+ exit 1 ; \
+ fi
+
+thumbs::
+ @for f in $(ANDROID_HACKS) $(ANDROID_TODO) ; do \
+ $(MAKE) xscreensaver/res/drawable/$$f.png ; \
+ done
+
+clean_thumbs::
+ @\
+ for f in $(ANDROID_HACKS) $(ANDROID_TODO) ; do \
+ rm -f xscreensaver/res/drawable/$$f.png ; \
+ done
+
+distclean:: clean_thumbs clean
+
+
+EXTRA_TARFILES = xscreensaver/res/drawable/thumbnail.png \