all:
	@echo Check out README.md

%.lc:%.lua
	luac -s -o $@ $<
	luac    -o $(basename $@).debug.lc $<

compile-%:
	@$(MAKE) -j 8 $(patsubst %.lua,%.lc,$(wildcard $(patsubst compile-%,%,$@)/*.lua))

clean-%:
	rm -f $(wildcard $(patsubst clean-%,%,$@)/*.lc)

upload-%:
	@$(MAKE) $(patsubst upload-%,compile-%,$@)
	./upload.sh $(patsubst upload-%,%,$@)