annotate Makefile @ 192:addc4e3456c4

Begin adding systemd compatibility. The Makefile can be used to build and install rlgwebd. On systems with systemd, the unit file controls starting and stopping the service, and the shell script is not needed. The unit file uses KillMode=none because socat does not actually stop rlgwebd, it only asks it to stop and exits without waiting for a response. Until a better stopping method is introduced, this setting prevents systemd from killing all the rlgwebd processes as soon as socat exits.
author John "Elwin" Edwards
date Fri, 01 Jan 2016 16:11:34 -0500
parents
children 80ca029f0906
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
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
2
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
3 WEBASSETS = about.html bell.svg index.html options.html options.js rlgterm.js \
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
4 style-rlg.css termemu.js termemu-keys.js tty.css
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
5
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
6 all: sqlickrypt dglwatcher
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
7
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
8 sqlickrypt: sqlickrypt.c
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
9 cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
10
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
11 dglwatcher: dglwatcher.c
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
12 cc -o dglwatcher dglwatcher.c
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
13
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
14 clean:
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
15 rm -f sqlickrypt dglwatcher
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
16
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
17 install: all
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
18 mkdir -p ${CHROOT}/bin
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
19 cp sqlickrypt dglwatcher ${CHROOT}/bin
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
20 for LIB in `ldd ./sqlickrypt | awk '$$1 ~ "^/" {print $$1}; $$3 ~ "^/" {print $$3}'`; do mkdir -p ${CHROOT}`dirname $$LIB`; cp $$LIB ${CHROOT}$$LIB; done
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
21 cp rlgwebd.js /usr/local/bin/rlgwebd.js
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
22 mkdir -p /var/local/rlgwebd
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
23 cp ${WEBASSETS} ${CHROOT}/var/www
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
24 cp rlgwebd.service /usr/lib/systemd/system