home-dashboard/Makefile
2024-12-21 16:20:28 -05:00

36 lines
659 B
Makefile

.PHONY: all clean clean-deps
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
SIPJS=public/sip.js
all: $(SIPJS) $(TARGET)
$(ELM):
mkdir -p ./bin
curl -sL https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz \
| gunzip > $@
chmod +x $@
$(SIPJS):
curl -sL https://sipjs.com/download/sip-0.16.0.min.js > $@
$(TARGET): $(ELM_FILES) $(ELM)
$(ELM) make $(ELMMAKE_FLAGS) $(SOURCE) --output $@
clean-deps:
rm -rf bin
rm -rf elm-stuff
clean:
rm -f $(TARGET)
rm -rf elm-stuff/build-artifacts