-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (28 loc) · 1.05 KB
/
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
30
31
32
33
34
35
36
37
ifeq ("$(ELM)","")
ELM=elm
endif
ifeq ("$(ELMLIVE)", "")
ELMLIVE=elm-live
endif
STATIC_FILES=client/static/*
BUILD_DIR=./server/dist
all: client-dev client-static server-dev
client-static: client/static/*
@/bin/echo -e "\033[32;1m Copying\033[0m chouette-client static files"
@mkdir -p $(BUILD_DIR)
@cp $(STATIC_FILES) $(BUILD_DIR)
@/bin/echo -e "\033[32;1m Copied\033[0m chouette-client static files"
client-dev: client/src/** client-static
@/bin/echo -e "\033[32;1m Compiling\033[0m chouette-client"
@cd client && $(ELM) make src/Main.elm --output ../$(BUILD_DIR)/main.js
@/bin/echo -e "\033[32;1m Finished\033[0m chouette-client"
client-watch:
@/bin/echo -e "\033[32;1m Watching\033[0m chouette-client"
@cd client && $(ELMLIVE) src/Main.elm -p 7000 -d ../$(BUILD_DIR)/ -- --output ../$(BUILD_DIR)/main.js
server-dev:
@cd server && cargo +nightly build
clean-client:
@/bin/echo -e "\033[32;1m Cleaning\033[0m chouette-client"
@rm -rf $(BUILD_DIR)
@/bin/echo -e "\033[32;1m Cleaned\033[0m chouette-client"
clean: clean-client