]> git.sur5r.net Git - cc65/blob - doc/Makefile
Started a function reference
[cc65] / doc / Makefile
1 #
2 # Makefile for the cc65 documentation
3 #
4
5
6 # Default for the compiler lib search path as compiler define
7
8 SGML  = ar65.sgml       \
9         ca65.sgml       \
10         cc65.sgml       \
11         cl65.sgml       \
12         coding.sgml     \
13         debugging.sgml  \
14         dio.sgml        \
15         funcref.sgml    \
16         geos.sgml       \
17         index.sgml      \
18         intro.sgml      \
19         ld65.sgml       \
20         library.sgml
21
22 TXT   = $(SGML:.sgml=.txt)
23 HTML  = $(SGML:.sgml=.html)
24 INFO  = $(SGML:.sgml=.info)
25 DVI   = $(SGML:.sgml=.dvi)
26 TEX   = $(SGML:.sgml=.tex)
27
28 # ------------------------------------------------------------------------------
29 # Rules to make targets
30
31 %.txt:  %.sgml
32         sgml2txt $<
33
34 %.html: %.sgml
35         sgml2html --split=1 $<
36
37 %.info: %.sgml
38         sgml2info $<
39
40 %.dvi:  %.sgml
41         sgml2latex $<
42
43 %.tex:  %.sgml
44         sgml2latex --output=tex $<
45
46 # ------------------------------------------------------------------------------
47 # Targets
48
49 .PHONY: all
50 all:    txt html info dvi
51
52 .PHONY: txt
53 txt:    $(TXT)
54
55 .PHONY: html
56 html:   $(HTML)
57
58 .PHONY: info
59 info:   $(INFO)
60
61 .PHONY: dvi
62 dvi:    $(DVI)
63
64 .PHONY: tex
65 tex:    $(TEX)
66
67 # The index.html target is special, since it does not get splitted
68 index.html:     index.sgml
69         sgml2html --split=0 $<
70
71 clean:
72         rm -f *~
73
74 zap:    clean
75         rm -f $(TXT) $(HTML) $(INFO) $(DVI) $(TEX) *.html *.info-* *.man
76
77 # ------------------------------------------------------------------------------
78 # Make the dependencies
79
80 .PHONY: depend dep
81 depend dep:     $(OBJS:.o=.c)
82         @echo "Creating dependency information"
83         $(CC) -MM $^ > .depend
84
85