2012-07-14 07:27:33 +00:00
|
|
|
|
2012-07-14 17:54:38 +00:00
|
|
|
MAPS=
|
2012-07-15 12:03:54 +00:00
|
|
|
MAPS+=$(wildcard ../maps/horock*.map)
|
2012-07-15 02:16:36 +00:00
|
|
|
MAPS+=$(wildcard ../maps/beard*.map)
|
2012-07-14 17:54:38 +00:00
|
|
|
MAPS+=$(wildcard ../maps/trampoline*.map)
|
|
|
|
MAPS+=$(wildcard ../maps/flood*.map)
|
2012-07-14 09:28:34 +00:00
|
|
|
MAPS+=$(wildcard ../maps/contest?.map ../maps/contest10.map)
|
|
|
|
MAPS+=$(wildcard ../maps/ems*.map)
|
|
|
|
MAPS+=../maps/pacman.map ../maps/pacman2.map
|
2012-07-15 11:41:24 +00:00
|
|
|
MAPS+=$(wildcard ../maps/bhickey*.map)
|
2012-07-14 07:27:33 +00:00
|
|
|
|
2012-07-14 18:49:33 +00:00
|
|
|
all: maps.js sprites.png gui.min.js mine.min.js maps.min.js
|
2012-07-14 07:27:33 +00:00
|
|
|
|
2012-07-14 18:49:33 +00:00
|
|
|
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
|
2012-07-14 09:28:34 +00:00
|
|
|
|
2012-07-15 02:16:36 +00:00
|
|
|
SPRITES=earth.png empty.png lambda.png lift.png openlift.png miner.png rock.png bricks.png
|
2012-07-14 18:24:12 +00:00
|
|
|
SPRITES+=$(wildcard trampoline?.png)
|
|
|
|
SPRITES+=$(wildcard target?.png)
|
2012-07-15 12:03:54 +00:00
|
|
|
SPRITES+=beard.png razor.png deadminer.png minerlift.png horock.png
|
2012-07-14 18:24:12 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-07-14 18:49:33 +00:00
|
|
|
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 $@ $<
|
|
|
|
|
2012-07-14 09:28:34 +00:00
|
|
|
clean:
|
2012-07-14 18:24:12 +00:00
|
|
|
rm -f maps.js sprites.png
|
2012-07-14 09:28:34 +00:00
|
|
|
|
2012-07-14 18:49:33 +00:00
|
|
|
.PHONY: all clean FORCE
|