Mercurial > hg > rlgwebd
annotate Makefile @ 213:08665c56c6a0 default tip
Fix race condition related to watching DGL games.
It's possible for a dgamelaunch game to end and cause rlgwebd to stop watching
it before rlgwebd has started watching it.
author | John "Elwin" Edwards |
---|---|
date | Sun, 16 Aug 2020 20:56:18 -0400 |
parents | 6651f54a0062 |
children |
rev | line source |
---|---|
192 | 1 CHROOT=/var/dgl |
193 | 2 BINDIR=/usr/local/bin |
192 | 3 |
4 WEBASSETS = about.html bell.svg index.html options.html options.js rlgterm.js \ | |
5 style-rlg.css termemu.js termemu-keys.js tty.css | |
6 | |
7 all: sqlickrypt dglwatcher | |
8 | |
9 sqlickrypt: sqlickrypt.c | |
10 cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3 | |
11 | |
12 dglwatcher: dglwatcher.c | |
13 cc -o dglwatcher dglwatcher.c | |
14 | |
15 clean: | |
16 rm -f sqlickrypt dglwatcher | |
17 | |
18 install: all | |
19 mkdir -p ${CHROOT}/bin | |
20 cp sqlickrypt dglwatcher ${CHROOT}/bin | |
21 for LIB in `ldd ./sqlickrypt | awk '$$1 ~ "^/" {print $$1}; $$3 ~ "^/" {print $$3}'`; do mkdir -p ${CHROOT}`dirname $$LIB`; cp $$LIB ${CHROOT}$$LIB; done | |
195 | 22 cp rlgwebd rlgwebd-stop ${BINDIR} |
196
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
23 mkdir -p ${CHROOT}/var/www |
192 | 24 cp ${WEBASSETS} ${CHROOT}/var/www |
25 cp rlgwebd.service /usr/lib/systemd/system | |
205 | 26 if test ! -f /etc/rlgwebd.conf; then cp rlgwebd.conf /etc; fi |
196
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
27 |
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
28 # Libraries are not removed. Something else might be using them. |
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
29 uninstall: |
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
30 rm -rf ${CHROOT}/var/www |
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
31 rm -f ${CHROOT}/bin/sqlickrypt |
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
32 rm -f ${CHROOT}/bin/dglwatcher |
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
33 rm -f ${BINDIR}/rlgwebd ${BINDIR}/rlgwebd-stop |
298a531776d6
Add an uninstall target to the Makefile.
John "Elwin" Edwards
parents:
195
diff
changeset
|
34 rm -f /usr/lib/systemd/system/rlgwebd.service |