icfp15/js/Makefile

43 lines
1.3 KiB
Makefile
Raw Normal View History

2012-07-14 07:27:33 +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)
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
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
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
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:
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