FORMAT = "%P\n"
MODNAME = "gravity_gun_reloaded"

compile:
	[ -d dist/models ] || mkdir dist/models
	cp models/regular-gravity-gun.glb dist/models
	cp models/uber-gravity-gun.glb dist/models
	cp -r textures dist
	cp -r sounds dist
	cp mod.conf dist/mod.conf
	cp init.lua dist/init.lua
	cp LICENSE dist/LICENSE
	cp MEDIA-LICENSE dist/MEDIA-LICENSE
	cp README.md dist/README.md

package: compile
	cd dist
	7z a ${MODNAME}.zip *

# creates a symlink in the mods directory
link:
	-[ -d ~/.minetest/mods/${MODNAME} ] && rm ~/.minetest/mods/${MODNAME}
	ln -s ~+/. ~/.minetest/mods/${MODNAME}

help:
	@echo "here are possible options for this make file"
	@echo "compile - compiles lush into format that minetest understands"
	@echo "link  - creates a symlink in the minetest mods directory to point to this repository, so you dont have to copy the repo every time you change anything"
	@echo "package - creates the zip file for contentDB"

