Makefile fixes but this is still too damn complicated

This commit is contained in:
Neale Pickett 2018-08-07 19:25:42 -06:00
parent 55951b7a55
commit 55efb13cd4
3 changed files with 21 additions and 10 deletions

View File

@ -1,6 +1,7 @@
BINARIES = forftanks upload.cgi
HTML = forf.html procs.html intro.html designer.html debugger.html
WWW = style.css grunge.png designer.js figures.js tanks.js nav.html.inc jstanks.js
WWW += style.css designer.js nav.html.inc jstanks.js
WWW += docs/assets/images/grunge.png docs/assets/js/figures.js docs/assets/js/tanks.js
CFLAGS = -Wall
@ -8,18 +9,20 @@ DESTDIR = /opt/tanks
all: $(BINARIES) $(HTML)
install:
install: $(BINARIES) $(HTML)
install -d $(DESTDIR)/bin
install go.sh $(DESTDIR)/bin
install go.sh $(DESTDIR)/bin
install round.sh $(DESTDIR)/bin
install rank.awk $(DESTDIR)/bin
install summary.awk $(DESTDIR)/bin
install forftanks $(DESTDIR)/bin
install -d $(DESTDIR)/www
install designer.cgi $(DESTDIR)/www
install $(HTML) $(DESTDIR)/www
install $(WWW) $(DESTDIR)/www
install upload.cgi $(DESTDIR)/www
install --mode=0644 $(HTML) $(DESTDIR)/www
install --mode=0644 $(WWW) $(DESTDIR)/www
install -d $(DESTDIR)/examples
install -d $(DESTDIR)/examples
cp -r examples $(DESTDIR)/examples
forftanks: forftanks.o ctanks.o forf.o

9
go.sh
View File

@ -6,4 +6,11 @@
) &
(
cd
cd /tanks
while true; do
./round.sh user/*/
sleep 60
done
) &
wait

View File

@ -8,6 +8,7 @@ else
exit 1
fi
BINDIR=$(dirname $0)
TANKS_GAME=${TANKS_GAME:-forftanks}
NAV_HTML_INC=${NAV_HTML_INC:-./nav.html.inc} export NAV_HTML_INC
@ -59,7 +60,7 @@ window.onload = go;
<div id="game_box"><canvas id="battlefield"></canvas></div>
<p><span id="fps">0</span> fps</p>
EOF
rank.awk $rfn >>$fn
awk -f $BINDIR/rank.awk $rfn >>$fn
rm -f $rfn
cat $NAV_HTML_INC >>$fn
cat <<EOF >>$fn
@ -67,7 +68,7 @@ cat <<EOF >>$fn
</html>
EOF
summary.awk $tanks > summary.html.$$ && mv summary.html.$$ summary.html
awk -f $BINDIR/summary.awk $tanks > summary.html.$$ && mv summary.html.$$ summary.html
echo "done."