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