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