42 lines
1.2 KiB
Makefile
42 lines
1.2 KiB
Makefile
|
|
MAPS=
|
|
MAPS+=$(wildcard ../maps/beard*.map)
|
|
MAPS+=$(wildcard ../maps/trampoline*.map)
|
|
MAPS+=$(wildcard ../maps/flood*.map)
|
|
MAPS+=$(wildcard ../maps/contest?.map ../maps/contest10.map)
|
|
MAPS+=$(wildcard ../maps/ems*.map)
|
|
MAPS+=../maps/pacman.map ../maps/pacman2.map
|
|
MAPS+=$(wildcard ../maps/bhickey*.map)
|
|
|
|
all: maps.js sprites.png gui.min.js mine.min.js maps.min.js
|
|
|
|
maps.js: FORCE
|
|
./mapsToJson.js $(MAPS) > maps.js.new
|
|
@if test ! -e maps.js || ! diff maps.js maps.js.new > /dev/null; then echo "new maps"; mv maps.js.new maps.js; else rm maps.js.new; fi
|
|
|
|
SPRITES=earth.png empty.png lambda.png lift.png openlift.png miner.png rock.png bricks.png
|
|
SPRITES+=$(wildcard trampoline?.png)
|
|
SPRITES+=$(wildcard target?.png)
|
|
SPRITES+=beard.png razor.png deadminer.png minerlift.png
|
|
|
|
sprites.png: $(SPRITES)
|
|
convert -background "#000000" -append $(SPRITES) tmp_sprites.png
|
|
pngcrush -rem alla tmp_sprites.png tmp_sprites1.png
|
|
rm tmp_sprites.png
|
|
optipng -o9 tmp_sprites1.png
|
|
mv tmp_sprites1.png sprites.png
|
|
|
|
gui.min.js: gui.js
|
|
yui-compressor --type js --charset utf-8 -o $@ $<
|
|
|
|
mine.min.js: mine.js
|
|
yui-compressor --type js --charset utf-8 -o $@ $<
|
|
|
|
maps.min.js: maps.js
|
|
yui-compressor --type js --charset utf-8 -o $@ $<
|
|
|
|
clean:
|
|
rm -f maps.js sprites.png
|
|
|
|
.PHONY: all clean FORCE
|