-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (36 loc) · 1003 Bytes
/
Makefile
File metadata and controls
52 lines (36 loc) · 1003 Bytes
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
SRC_DIR = src
BUILD_DIR = build
LIB_DIR = lib
DIST_DIR = .
JS_ENGINE ?= `which node nodejs`
COMPILER = ${JS_ENGINE} ${BUILD_DIR}/uglify.js --unsafe
BASE_FILES = ${SRC_DIR}/PathSeg.js\
${SRC_DIR}/DraggableControlPoint.js\
${SRC_DIR}/SVGPathEditor.js
LIB_FILES = ${LIB_DIR}/ynakajima.core.js
MODULES = COPYRIGHT\
${LIB_FILES}\
${BASE_FILES}
SPE = ${DIST_DIR}/SVGPathEditor.js
SPE_MIN = ${DIST_DIR}/SVGPathEditor.min.js
all: core
core: SVGPathEditor min
@@echo "build complete."
${DIST_DIR}:
@@mkdir -p ${DIST_DIR}
SVGPathEditor: ${SPE}
${SPE}: ${MODULES} | ${DIST_DIR}
@@echo "Building" ${SPE}
@@cat ${MODULES} > ${SPE};
min: SVGPathEditor ${SPE_MIN}
${SPE_MIN}: ${SPE}
@@if test ! -z ${JS_ENGINE}; then \
echo "Minifying " ${SPE_MIN}; \
${COMPILER} ${SPE} > ${SPE_MIN}; \
else \
echo "You must have NodeJS installed in order to minify."; \
fi
clean:
@@echo "Removing Distribution directory:" ${DIST_DIR}
@@rm ${SPE} ${SPE_MIN}
.PHONY: all SVGPathEditor min clean core