-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
42 lines (35 loc) · 1.4 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
38
39
40
41
42
# matr makefile
PROJDIR := $(realpath $(CURDIR))
SOURCEDIR := $(PROJDIR)/src
# Directory for *.clj source files
CLJ_SOURCEDIR := $(SOURCEDIR)/matr_core
# Directory for *.cljs source files
CLJS_SOURCEDIR := $(SOURCEDIR)/matr_gui_clj
# Directory for *.cljc source files
CLJS_SOURCEDIR := $(SOURCEDIR)/common
RESOURCEDIR := $(PROJDIR)/resources
CSSDIR := $(RESOURCEDIR)/public/css
IMAGEDIR := $(RESOURCEDIR)/public/images
JSDIR := $(RESOURCEDIR)/public/js
# List of *.clj source files
CLJ_SOURCES = $(wildcard $(CLJ_SOURCEDIR)/*.clj)
# List of *.cljs source files
CLJS_SOURCES = $(wildcard $(CLJS_SOURCEDIR)/*.cljs)
# List of *.cljc source files
CLJC_SOURCES = $(wildcard $(CLJC_SOURCEDIR)/*.cljc)
HTML_DEPS = $(RESOURCEDIR)/kioo_template.html $(RESOURCEDIR)/public/index.html
CSS_DEPS = $(wildcard $(CSSDIR)/*.css)
JS_DEPS = $(wildcard $(JSDIR)/*.js)
# List of *.png, *.jpg, *.jpeg, *.gif files in resources
IMAGE_DEPS = $(wildcard $(IMAGEDIR)/*.png) $(wildcard $(IMAGEDIR)/*.jpg) $(wildcard $(IMAGEDIR)/*.jpeg) $(wildcard $(IMAGEDIR)/*.gif)
# Dependencies for matr_gui_clj.js
FRONTEND_DEPS = $(CLJS_SOURCES) $(CLJC_SOURCES) $(HTML_DEPS) $(CSS_DEPS) $(JS_DEPS) $(IMAGE_DEPS)
JS_TARGET = resources/public/js/compiled/matr_gui_clj.js
UBERJAR = target/uberjar/matr.jar
$(UBERJAR): $(CLJ_SOURCES) $(JS_TARGET) pom.xml
clojure -X:uberjar
pom.xml: deps.edn
clojure -Spom
$(JS_TARGET): $(FRONTEND_DEPS)
clojure -M:dev:min
# end