27 lines
562 B
Makefile
27 lines
562 B
Makefile
SRC_FILES := $(shell find src -name "*.elm")
|
|
|
|
all: elm.min.js
|
|
|
|
.PHONY: elm.min.js watch
|
|
|
|
ifeq ($(DEBUG)$(RELEASE),) # Both are empty
|
|
$(error You must set exactly one of DEBUG=1 or RELEASE=1)
|
|
endif
|
|
|
|
ifeq ($(DEBUG)$(RELEASE),11) # Both are set
|
|
$(error Both DEBUG and RELEASE cannot be set at the same time)
|
|
endif
|
|
|
|
elm.min.js:
|
|
ifeq ($(DEBUG),1)
|
|
./build.sh --debug src/Main.elm
|
|
else ifeq ($(RELEASE),1)
|
|
./build.sh --optimize src/Main.elm
|
|
endif
|
|
|
|
watch:
|
|
elm-go src/Main.elm --no-server --dir=../public -- --output=../public/elm.min.js
|
|
|
|
clean:
|
|
rm elm.js elm.min.js
|