.PHONY: all node-deps clean run UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) PLATFORM = mac else PLATFORM = linux endif TARGET=public/elm.js SOURCE=src/App.elm ELM_FILES = $(shell find src -type f -name '*.elm') ELM = ./bin/elm ELMMAKE_FLAGS = ifeq ($(DEBUG),1) ELMMAKE_FLAGS += --debug endif all: $(TARGET) $(ELM): mkdir -p ./bin curl -sL https://github.com/elm/compiler/releases/download/0.19.1/binary-for-$(PLATFORM)-64-bit.gz \ | gunzip > $@ chmod +x $@ $(TARGET): $(ELM_FILES) $(ELM) $(ELM) make $(ELMMAKE_FLAGS) $(SOURCE) --output $@ clean-deps: rm -rf bin rm -rf elm-stuff clean: rm -f $(TARGET) rm -f $(ELM) rm -rf elm-stuff/build-artifacts