#Warning : during installation, this directory is removed !
INSTALL_DIR=/usr/local/tanky

#Where to put "tanky" executable script
EXEC_DIR=/usr/local/bin

all:
	@cd src; make

static:
	@cd src; make static

clean:
	@cd src; make clean
	@rm -f tanky

install:
	@rm -rf $(INSTALL_DIR)
	@mkdir $(INSTALL_DIR)
	@cp tanky tanky_v4.dat tanky_v4.lev sysfont.dat $(INSTALL_DIR)/
	@chmod 644 $(INSTALL_DIR)/tanky_v4.dat $(INSTALL_DIR)/tanky_v4.lev $(INSTALL_DIR)/sysfont.dat
	@echo "cd $(INSTALL_DIR)" > $(EXEC_DIR)/tanky
	@echo "./tanky" >> $(EXEC_DIR)/tanky
	@chmod +x $(EXEC_DIR)/tanky
	@echo "Tanky installed :D"

uninstall:
	@rm -rf $(INSTALL_DIR)
	@rm -f $(EXEC_DIR)/tanky
	@echo "Tanky uninstalled :("



