forked from seliopou/elm-d3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (21 loc) · 757 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
SOURCE_FILES = $(sort $(shell find src -name \*.elm | grep -v examples))
OBJECT_FILES = $(patsubst %.elm,%.js,$(SOURCE_FILES))
GENERATED_FILES = \
elm-d3.js \
elm-d3.library.js \
elm-d3.runtime.js
.PHONY: all clean
all: $(GENERATED_FILES)
build/%.js: %.elm
elm --src-dir=src --make -o $?
elm-d3.js: elm-d3.runtime.js elm-d3.library.js
@rm -f $@
./node_modules/.bin/smash elm-d3.runtime.js elm-d3.library.js > $@
elm-d3.runtime.js: $(shell node_modules/.bin/smash --list src/Native/runtime.js)
@rm -f $@
./node_modules/.bin/smash src/Native/runtime.js > $@
elm-d3.library.js: $(addprefix build/,$(OBJECT_FILES))
@rm -f $@
./node_modules/.bin/smash $(addprefix build/,$(OBJECT_FILES)) > $@
clean:
rm -rf -- build/ cache/ $(GENERATED_FILES)