forked from Vulnogram/Vulnogram
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (37 loc) · 1.37 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
43
44
45
46
47
48
49
50
51
52
53
54
55
OUT = ./standalone
CSS = $(OUT)/css
JS = $(OUT)/js
CSSO = ./node_modules/.bin/csso
UJS = ./node_modules/.bin/uglifyjs
TARGETS := $(OUT) $(OUT)/static $(OUT)/index.html $(CSS)/min.css $(CSS)/vg-icons.css $(CSS)/tagify.css $(CSS)/logo.png $(CSS)/logo.gif $(JS)/util.js $(JS)/editor.js $(JS)/mode-json.js $(JS)/cvss.json $(JS)/cwe-frequent.json $(JS)/capec.json $(JS)/wy/ $(JS)/tablesort.min.js $(JS)/tagify.min.js $(OUT)/static/CVE.svg $(OUT)/static/cve5sw.js $(OUT)/static/cvss40.js
$(OUT):
mkdir $(OUT)
$(OUT)/static:
mkdir -p $(OUT)/static
$(OUT)/index.html: ./scripts/standalone.js ./config/conf-standalone.js ./[cd][ue][sf]*[mt]/cve5/* ./views/*
if [ -e "./custom/cve5/conf.js" ]; then node $< custom ; else node $< ; fi
$(OUT)/js:
mkdir -p $(OUT)/js
$(OUT)/js/wy:
mkdir -p $(OUT)/js/wy
$(OUT)/css:
mkdir -p $(OUT)/css
$(CSS)/%.css: ./public/css/%.css
$(CSSO) $< -o $@
$(CSS)/%.svg: ./public/css/%.svg
cp -f $< $@
$(CSS)/%.png: ./public/css/%.png
cp -f $< $@
$(CSS)/%.gif: ./public/css/%.gif
cp -f $< $@
$(OUT)/js/wy/: ./public/js/wy/
cp -pr $< $@
$(JS)/%.js: ./public/js/%.js
$(UJS) $< -c -o $@
$(JS)/%.json: ./public/js/%.json
node -e 'console.log(JSON.stringify(require("./" + process.argv[1])))' $< > $@
#$(OUT)/%: ./public/js/cve/%
# $(UJS) $< -o $@
$(OUT)/static/%: ./default/cve5/static/%
cp -pr $< $@
min: $(OUT) $(OUT)/static $(CSS) $(JS) $(TARGETS)