This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
misc.mk
66 lines (49 loc) · 1.46 KB
/
misc.mk
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
include variables.mk
static:: javascript
##### CSS #####
LESSC ?= $(NODE_BIN)/lessc
LESSC_OPTS ?= --source-map \
--source-map-less-inline \
--source-map-basepath="$(PROJECT_ROOT)"
CSS_DIR := $(STATIC_DIR)/css
static:: $(CSS_DIR)/evesrp.css
clean::
rm -f $(CSS_DIR)/evesrp.css $(CSS_DIR)/evesrp.css.map
distclean::
rm -f less.mk
less.mk: $(CSS_DIR)/custom.less $(NODE_MODULES)
$(LESSC) \
--include-path="$(NODE_MODULES)" \
--depends \
$< \
$(<:%.less=%.css) > $@
include less.mk
$(CSS_DIR)/evesrp.css: $(CSS_DIR)/custom.less
$(LESSC) \
--include-path="$(NODE_MODULES)" \
$(LESSC_OPTS) \
$^ \
$@
##### ZeroClipboard SWF #####
static:: $(STATIC_DIR)/ZeroClipboard.swf
$(STATIC_DIR)/ZeroClipboard.swf: $(NODE_MODULES)/zeroclipboard/dist/ZeroClipboard.swf
cp "$^" "$@"
$(NODE_MODULES)/zeroclipboard/dist/ZeroClipboard.swf: $(NODE_MODULES)
##### Fonts #####
NODE_MODULES := $(shell npm root)
FONTAWESOME := $(NODE_MODULES)/font-awesome/fonts
BOOTSTRAP := $(NODE_MODULES)/bootstrap/fonts
SUFFIXES := eot ttf svg woff woff2
FONT_DIR := $(STATIC_DIR)/fonts
FONTS := \
FontAwesome.otf \
$(addprefix fontawesome-webfont.,$(SUFFIXES)) \
$(addprefix glyphicons-halflings-regular.,$(SUFFIXES))
FONTS := $(addprefix $(FONT_DIR)/,$(FONTS))
static:: $(FONTS)
clean::
rm -f $(addprefix $(FONT_DIR)/*.,$(SUFFIXES)) $(FONT_DIR)/*.otf
$(foreach SUFFIX,$(SUFFIXES) otf, \
$(eval vpath %.$(SUFFIX) $(FONTAWESOME) $(BOOTSTRAP)))
$(FONTS): $(FONT_DIR)/%: %
cp "$^" "$@"