-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
executable file
·31 lines (20 loc) · 2.55 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
# Copyright 2014 The Cactus Authors. All rights reserved.
GOFILES = api/account.go api/activity.go api/clarification.go api/contest.go api/execution.go api/notification.go api/problem.go api/session.go api/standing.go api/submission.go belt/belt.go belt/stack-c.go belt/stack-cpp.go belt/stack.go cmd/cactus/main.go cmd/cactus/router.go data/account.go data/blobs.go data/clarification.go data/contest.go data/db.go data/execution.go data/notification.go data/problem.go data/standing.go data/submission.go hub/hub.go ui/assets.go ui/pages.go
CSSFILES = ui/assets/css/animate+animo.css ui/assets/css/bootstrap.css ui/assets/css/fontawesome.css ui/assets/css/hightlight.css ui/assets/css/nprogress.css ui/assets/css/screen.css
JSFILES = ui/assets/js/underscore.js ui/assets/js/jquery.js ui/assets/js/backbone.js ui/assets/js/bootstrap.js ui/assets/js/bootbox.js ui/assets/js/sugar.js ui/assets/js/moment.js ui/assets/js/nprogress.js ui/assets/js/animo.js ui/assets/js/async.js ui/assets/js/lunr.js ui/assets/js/showdown.js ui/assets/js/showdown-github.js ui/assets/js/showdown-table.js ui/assets/js/highlight.js ui/assets/js/cactus.js
RSCFILES = cmd/cactus/config-sample.tml data/db-init.sql ui/assets/css/screen.min.css ui/assets/font/fontawesome.eot ui/assets/font/fontawesome.svg ui/assets/font/fontawesome.ttf ui/assets/font/fontawesome.woff ui/assets/font/glyphicons-halflings-regular.eot ui/assets/font/glyphicons-halflings-regular.svg ui/assets/font/glyphicons-halflings-regular.ttf ui/assets/font/glyphicons-halflings-regular.woff ui/assets/font/mavenpro-bold.eot ui/assets/font/mavenpro-bold.svg ui/assets/font/mavenpro-bold.ttf ui/assets/font/mavenpro-bold.woff ui/assets/font/mavenpro-regular.eot ui/assets/font/mavenpro-regular.svg ui/assets/font/mavenpro-regular.ttf ui/assets/font/mavenpro-regular.woff ui/assets/font/ubuntumono-r.eot ui/assets/font/ubuntumono-r.svg ui/assets/font/ubuntumono-r.ttf ui/assets/font/ubuntumono-r.woff ui/assets/img/mascot.png ui/assets/js/cactus.min.js ui/assets/json/credits.json ui/index.min.html
all: cactus
clean:
rm -f cactus.zip cactus ui/index.min.html ui/assets/css/screen.min.css ui/assets/js/cactus.min.js.map ui/assets/js/cactus.min.js
cactus: $(GOFILES) $(RSCFILES)
go build ./cmd/cactus
zip - $(RSCFILES) | cat >> $@
zip -A $@
ui/assets/css/screen.min.css: $(CSSFILES)
cat $^ | ./node_modules/.bin/cleancss -O2 -o $@
ui/assets/js/cactus.min.js: $(JSFILES)
./node_modules/.bin/uglifyjs --compress --mangle -- $^ > $@
ui/index.min.html: ui/index.html
cat $^ | tr '\t\n' ' ' | sed -e 's/ */ /g' > $@
cactus.zip: cactus LICENSE
zip $@ $^