VERS=$(shell sed <sst.spec -n -e '/Version: \(.*\)/s//\1/p')
-CFLAGS= -O -g -DSSTDOC='"/usr/share/doc/sst/sst.doc"'
+CFLAGS= -O1 -g -Wall -DSSTDOC='"/usr/share/doc/sst/sst.doc"'
.c.o:
$(CC) $(CFLAGS) -c $<
-CFILES= sst.c finish.c reports.c setup.c linux.c moving.c battle.c events.c ai.c planets.c
+CFILES= sst.c finish.c reports.c setup.c moving.c battle.c events.c ai.c planets.c io.c sstlinux.c conio.c
OFILES= $(CFILES:.c=.o)
HFILES=sst.h
-DOC = sst-doc.xml sst.xml TODO
+DOCS = README sst-doc.xml sst.xml sst-layer.xsl TODO
# sst.doc and sst.6 are included so target system won't need xmlto
-SOURCES= $(CFILES) $(HFILES) $(DOC) sst.doc sst.6 makehelp.py makefile sst.spec
+SOURCES= $(CFILES) $(HFILES) $(DOCS) sst.doc sst.6 makehelp.py makefile sst.spec
all: sst sst.doc
sst: $(OFILES)
- gcc -o sst $(OFILES) -lm
+ gcc -o sst $(OFILES) -lm -lcurses
$(OFILES): $(HFILES)
sst.6: sst.xml
- xmlto man sst.xml
+ xmlto --skip-validation man sst.xml
sst-doc.txt: sst-doc.xml
- xmlto --skip-validation txt sst-doc.xml
+ xmlto -m sst-layer.xsl --skip-validation txt sst-doc.xml
sst.doc: sst-doc.txt
makehelp.py >sst.doc
sst-doc.html: sst-doc.xml
- xmlto --skip-validation xhhtml-nochunks sst-doc.xml
+ xmlto --skip-validation xhtml-nochunks sst-doc.xml
-install: sst.6 uninstall
+install: uninstall sst.6 sst.doc sst-doc.html
install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/
install -m 755 -o 0 -g 0 sst $(ROOT)/usr/bin/sst
install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man6/