ascii-game/Makefile

35 lines
500 B
Makefile
Raw Normal View History

2017-03-01 15:43:37 +00:00
CC=gcc
CFLAG= -O -g -o
2017-03-09 15:36:27 +00:00
alldoc=python3 $(PWD)/.bin/alldoc
2017-03-01 15:43:37 +00:00
objects=main.o\
playfield.o\
input_output.o
2017-03-09 15:36:27 +00:00
headers=conf.h\
playfield.h\
input_output.h
2017-03-01 15:43:37 +00:00
all:main
%.o:%.c
$(CC) -c $(CFLAG) $@ $<
main: clean $(objects)
$(CC) $(objects) $(CFLAG) main
clean:
rm $(objects) || true
2017-03-09 15:36:27 +00:00
2017-03-09 15:39:46 +00:00
doc.rst:$(headers) README.rst
2017-03-09 15:36:27 +00:00
$(alldoc) doc.rst.tmp $(headers)
printf "Documentation\n_____________\n\n" > doc.rst
2017-03-09 15:39:46 +00:00
cat README.rst >> doc.rst
2017-03-09 15:36:27 +00:00
cat doc.rst.tmp >> doc.rst
rm doc.rst.tmp
doc.pdf:
rst2pdf doc.rst