32 lines
810 B
Makefile
32 lines
810 B
Makefile
|
|
MAPS=
|
|
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
|
|
|
|
all: maps.js sprites.png
|
|
|
|
maps.js: mapsToJson.js $(MAPS)
|
|
./mapsToJson.js $(MAPS) > maps.js
|
|
|
|
SPRITES=earth.png empty.png lambda.png liftclosed.png liftopen.png robot.png rock.png wall.png
|
|
SPRITES+=$(wildcard trampoline?.png)
|
|
SPRITES+=$(wildcard target?.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
|
|
|
|
clean:
|
|
rm -f maps.js sprites.png
|
|
|
|
.PHONY: all clean
|
|
|
|
# just build it everytime
|
|
.PHONY: maps.js
|