comparison 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
comparison
equal deleted inserted replaced
191:9758ca68e7f1 192:addc4e3456c4
1 CHROOT=/var/dgl
2
3 WEBASSETS = about.html bell.svg index.html options.html options.js rlgterm.js \
4 style-rlg.css termemu.js termemu-keys.js tty.css
5
6 all: sqlickrypt dglwatcher
7
8 sqlickrypt: sqlickrypt.c
9 cc -o sqlickrypt sqlickrypt.c -lcrypt -lsqlite3
10
11 dglwatcher: dglwatcher.c
12 cc -o dglwatcher dglwatcher.c
13
14 clean:
15 rm -f sqlickrypt dglwatcher
16
17 install: all
18 mkdir -p ${CHROOT}/bin
19 cp sqlickrypt dglwatcher ${CHROOT}/bin
20 for LIB in `ldd ./sqlickrypt | awk '$$1 ~ "^/" {print $$1}; $$3 ~ "^/" {print $$3}'`; do mkdir -p ${CHROOT}`dirname $$LIB`; cp $$LIB ${CHROOT}$$LIB; done
21 cp rlgwebd.js /usr/local/bin/rlgwebd.js
22 mkdir -p /var/local/rlgwebd
23 cp ${WEBASSETS} ${CHROOT}/var/www
24 cp rlgwebd.service /usr/lib/systemd/system