-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
49 lines (40 loc) · 913 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
.PHONY : clean help %.out docs
.ONESHELL: # Applies to every targets in the file!
all: test
## make help : show this message.
help :
@grep -h -E '^##' ${MAKEFILE_LIST} | sed -e 's/## //g' \
| column -t -s ':'
## make test : test all files
test:
make clean
for i in $$(ls *.c);do
make $$(basename $$i .c).ihx
done
make clean
%.out: %.ihx
stcgal -P stc89 $<
## make *.ihx : generate the ihx files
# https://askubuntu.com/a/522776
%.ihx: %.c
sdcc $<
## doxygen: generate doxygen docs
doxygen:
cd docs
doxygen
## sphinx_html: generate sphinx docs
sphinx_html: doxygen
cd docs
make html
## sphinx_pdf: generate sphinx docs using latex
sphinx_pdf: doxygen
cd docs
make latexpdf
## doxygen_pdf: generate the docs pdf using doxygen
doxygen_pdf: doxygen
cd docs/build/doxygen_latex
make all
## make clean: clean the temp files
clean:
# git ls-files --others | xargs gio trash
git clean -fXd