LEVELS=LevelA.as LevelB.as LevelC.as LevelD.as LevelE.as LevelF.as LevelG.as LevelH.as LevelI.as LevelJ.as LevelK.as LevelL.as
CLIPS=Master.as LevelClip.as BlastMeter.as TitleScreen.as EndScreen.as StairMask.as
IMAGES=lib/guy_up.png lib/guy_left.png lib/guy_down.png lib/guy_right.png lib/spikey_up.png lib/spikey_left.png lib/spikey_down.png lib/spikey_right.png lib/bomb_up.png lib/bomb_left.png lib/bomb_down.png lib/bomb_right.png lib/wall.png lib/broken_wall.png lib/floor.png lib/explosion.png lib/border.png lib/stair.png lib/danger_zone.png lib/blast_icon.png lib/guy_point_up.png lib/guy_point_left.png lib/guy_point_down.png lib/guy_point_right.png lib/Vera.ttf lib/title.png
CODES=Point.as Rectangle.as Level.as EnemyInit.as Actor.as Guy.as Enemy.as Explosion.as SpinyEnemy.as SpinyEnemyClockwise.as SpinyEnemyNoMove.as BombEnemy.as BombEnemyClockwise.as BombEnemyTopRight.as

ALLSRC=$(LEVELS) $(CLIPS) $(IMAGES) $(CODES) app.xml Makefile build/index.html
ALLDOC=lib/Vera_COPYRIGHT.TXT bomb_down.svg bomb_left.svg bomb_right.svg bomb_up.svg explosion.svg overhead_point_up.svg overhead_up.svg spiny.svg title.svg

build/app.swf: app.xml build/classes.swf $(IMAGES) $(LEVELS)
	swfmill simple app.xml build/app.swf

build/classes.swf: $(CODES) $(CLIPS) $(LEVELS)
	rm -f build/classes.swf
	mtasc -swf build/classes.swf -header 1:1:1:000000 -version 7 -strict -infer Master.as $(CLIPS)

clean:
	rm -f build/classes.swf build/app.swf

package:
	tar czf Master_rX.tgz $(ALLSRC) $(ALLDOC)
	cp build/app.swf Master_rX.swf
