SRC_FOLDER=$(CURDIR)/../src RES_FOLDER=$(CURDIR)/../res TS_BUILD=tsbuild TS_FLAGS=-da -n -m -od ../build/$(TS_BUILD) # has to be relative for some reason LESS_FILE=$(RES_FOLDER)/main.less PY_FILE=$(SRC_FOLDER)/main.py HTML_FILE=$(RES_FOLDER)/main.html .PHONY: all transcrypt $(LESS_FILE) $(PY_FILE) $(HTML_FILE) # mypy: # mypy src/main.py all: main.css bundle.js main.html transcrypt: $(PY_FILE) $(TS_BUILD) # ln -s $(TS_BUILD) $(SRC_FOLDER)/__target__ transcrypt $(TS_FLAGS) $< # rm $(SRC_FOLDER)/__target__ bundle.js: transcrypt node browserify.js $(TS_BUILD)/main.js > bundle.js main.css: $(LESS_FILE) lessc $< > $@ $(TS_BUILD): mkdir -p $(TS_BUILD) main.html: $(HTML_FILE) cp $(RES_FOLDER)/main.html ./ clean: rm -r $(TS_BUILD) rm bundle.js main.html main.css