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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
192
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
1 CHROOT=/var/dgl
193
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents: 192
diff changeset
2 BINDIR=/usr/local/bin
192
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
3
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
4 WEBASSETS = about.html bell.svg index.html options.html options.js rlgterm.js \
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
5 style-rlg.css termemu.js termemu-keys.js tty.css
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
6
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
7 all: sqlickrypt dglwatcher
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
8
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
9 sqlickrypt: sqlickrypt.c
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
10 cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
11
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
12 dglwatcher: dglwatcher.c
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
13 cc -o dglwatcher dglwatcher.c
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
14
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
15 clean:
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
16 rm -f sqlickrypt dglwatcher
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
17
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
18 install: all
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
19 mkdir -p ${CHROOT}/bin
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
20 cp sqlickrypt dglwatcher ${CHROOT}/bin
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
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
3bdee6371c3f Change various filenames.
John "Elwin" Edwards
parents: 194
diff changeset
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
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
24 cp ${WEBASSETS} ${CHROOT}/var/www
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
25 cp rlgwebd.service /usr/lib/systemd/system
205
6651f54a0062 Fix syntax error in Makefile.
John "Elwin" Edwards
parents: 202
diff changeset
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