]> git.sur5r.net Git - cc65/blob - doc/Makefile
5544976ed514ba10768f89fe783b2d777f99703f
[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         pet.sgml        \
35         plus4.sgml      \
36         vic20.sgml
37
38 TXT   = $(SGML:.sgml=.txt)
39 HTML  = $(SGML:.sgml=.html)
40 INFO  = $(SGML:.sgml=.info)
41 DVI   = $(SGML:.sgml=.dvi)
42 TEX   = $(SGML:.sgml=.tex)
43
44 # ------------------------------------------------------------------------------
45 # Rules to make targets
46
47 %.txt:  %.sgml
48         sgml2txt $<
49
50 %.html: %.sgml
51         sgml2html --split=1 $<
52
53 %.info: %.sgml
54         sgml2info $<
55
56 %.dvi:  %.sgml
57         sgml2latex $<
58
59 %.tex:  %.sgml
60         sgml2latex --output=tex $<
61
62 # ------------------------------------------------------------------------------
63 # Targets
64
65 .PHONY: all
66 all:    txt html info dvi
67
68 .PHONY: txt
69 txt:    $(TXT)
70
71 .PHONY: html
72 html:   $(HTML)
73
74 .PHONY: info
75 info:   $(INFO)
76
77 .PHONY: dvi
78 dvi:    $(DVI)
79
80 .PHONY: tex
81 tex:    $(TEX)
82
83 # The index.html target is special, since it does not get splitted
84 index.html:     index.sgml
85         sgml2html --split=0 $<
86
87 clean:
88         rm -f *~
89
90 zap:    clean
91         rm -f $(TXT) $(HTML) $(INFO) $(DVI) $(TEX) *.html *.info-* *.man
92
93 # ------------------------------------------------------------------------------
94 # Special target rules
95
96 coding.html:    coding.sgml
97         sgml2html --split=0 $<
98
99 funcref.html:   funcref.sgml
100         sgml2html --split=2 $<
101
102 index.html:     index.sgml
103         sgml2html --split=0 $<
104
105 # ------------------------------------------------------------------------------
106 # Make the dependencies
107
108 .PHONY: depend dep
109 depend dep:     $(OBJS:.o=.c)
110         @echo "Creating dependency information"
111         $(CC) -MM $^ > .depend
112
113