
SRC=	src/cli/resources.js	\
		src/cli/ui.js

OUTPUT=	public/javascripts/scripts.js

MAPFILE=	${OUTPUT}.map

CLOSURE= src/cli/closure-compiler-v20190301.jar

$(OUTPUT):all

all:
	java -jar ${CLOSURE} --compilation_level ADVANCED --language_in=ECMASCRIPT6 --language_out=ECMASCRIPT6_STRICT --warning_level=VERBOSE --js_output_file=${OUTPUT} ${SRC}

debug:
	echo "//# sourceMappingURL=${MAPFILE}" > ${OUTPUT}
	java -jar ${CLOSURE} --compilation_level WHITESPACE_ONLY --language_in=ECMASCRIPT6 --language_out=ECMASCRIPT6_STRICT --warning_level=VERBOSE --create_source_map=${MAPFILE} ${SRC} >> ${OUTPUT}

clean:
	$(RM) ${OUTPUT} ${MAPFILE}

re:	clean $(OUTPUT)

.PHONY:	all debug clean re

