-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (31 loc) · 1.65 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
.SUFFIXES:
backend: backend/backend
frontend: index.html
site.js: frontend/site.c
$(EMSDK)/emcc -o site.js -O3 --llvm-lto 1 --memory-init-file 0 -s USE_GLFW=3 -s WASM=0 -s NO_FILESYSTEM=1 -s FETCH=1 --closure 1 frontend/site.c -lm -lopenal
assets/%.woff: assets/*.woff2
ls assets/*.woff2 | xargs -L 1 -I @ bash -c 'node_modules/.bin/webfont-crusher -i @ -o assets/ -n `basename @ .woff2` -f woff -g `printf %s {a..z} {A..Z} .\(\)`'\\\'
index.html: site.js frontend/site.html assets/avatar.png assets/*.woff
perl template.pl frontend/site.html temp.html
node_modules/.bin/html-minifier --remove-optional-tags --remove-attribute-quotes --collapse-whitespace --minify-css 1 temp.html > index.html
rm temp.html
backend/backend: backend/backend.c backend/update_tweets.c
gcc -no-pie -Ofast -Ibackend $(INCLUDE) -L/usr/lib/x86_64-linux-gnu/mit-krb5 -o backend/backend backend/mongoose/mongoose.c backend/backend.c -lpq -lpthread -lssl -lcrypto -ldl -lldap -lgssapi_krb5
gcc -no-pie -Ofast -Ibackend $(INCLUDE) -L/usr/lib/x86_64-linux-gnu/mit-krb5 -DMG_ENABLE_SSL -o backend/update_tweets backend/mongoose/mongoose.c backend/cJSON/cJSON.c backend/update_tweets.c -lpq -lpthread -lssl -lcrypto -ldl -lldap -lgssapi_krb5
frontend_deploy: frontend
git stash
git checkout --detach
git reset --soft master
git checkout master
git reset
git add -f index.html site.js assets/*.pcm assets/*.m4a assets/*.ogg
git commit -m "deploy"
git push origin master:master
git checkout --detach
git reset --soft site
git checkout site
-git stash apply
backend_deploy:
git push heroku site:master
clean:
rm -f site.js index.html backend/backend backend/update_tweets assets/*.woff