home-dashboard/Makefile

37 lines
659 B
Makefile
Raw Normal View History

2024-12-20 23:06:58 +00:00
.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
2024-12-21 21:20:28 +00:00
SIPJS=public/sip.js
all: $(SIPJS) $(TARGET)
2024-12-20 23:06:58 +00:00
$(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 $@
2024-12-21 21:20:28 +00:00
$(SIPJS):
curl -sL https://sipjs.com/download/sip-0.16.0.min.js > $@
2024-12-20 23:06:58 +00:00
$(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