DATA_AI   = $(shell find ../scripts/ai/ -name '*.lua')
DATA_GFX  = $(shell find ../gfx/ -name '*.png')
DATA_XML  = $(shell find ../dat/ -name '*.xml' -o -name '*.ttf')
DATA_SND  = $(shell find ../snd/ -name '*.ogg' -o -name '*.wav')
DATA = data
DATAFILES = $(VERSIONFILE) $(DATA_AI) $(DATA_GFX) $(DATA_XML) $(DATA_SND)

VMAJOR  = 0
VMINOR  = 0
VREV    = 1
VERSION = -DVMAJOR=$(VMAJOR) -DVMINOR=$(VMINOR) -DVREV=$(VREV)
VERSIONFILE = VERSION

data:
	@echo -n "$(VMAJOR).$(VMINOR).$(VREV)" > $(VERSIONFILE)
	@echo -e "\tCreating data..\n"
	@./bin/pack $(DATA) $(DATAFILES)
	@mv data ../bin/
	@echo -e "\tCopying binaries..\n"
	@cp ext/bin/* ../bin/
