]> git.sur5r.net Git - cc65/blob - doc/Makefile
Added platform specific doc for the Apple ][
[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         c128.sgml       \
12         c16.sgml        \
13         c64.sgml        \
14         ca65.sgml       \
15         ca65html.sgml   \
16         cc65.sgml       \
17         cl65.sgml       \
18         co65.sgml       \
19         coding.sgml     \
20         da65.sgml       \
21         debugging.sgml  \
22         dio.sgml        \
23         funcref.sgml    \
24         geos.sgml       \
25         index.sgml      \
26         intro.sgml      \
27         ld65.sgml       \
28         library.sgml    \
29         plus4.sgml
30
31 TXT   = $(SGML:.sgml=.txt)
32 HTML  = $(SGML:.sgml=.html)
33 INFO  = $(SGML:.sgml=.info)
34 DVI   = $(SGML:.sgml=.dvi)
35 TEX   = $(SGML:.sgml=.tex)
36
37 # ------------------------------------------------------------------------------
38 # Rules to make targets
39
40 %.txt:  %.sgml
41         sgml2txt $<
42
43 %.html: %.sgml
44         sgml2html --split=1 $<
45
46 %.info: %.sgml
47         sgml2info $<
48
49 %.dvi:  %.sgml
50         sgml2latex $<
51
52 %.tex:  %.sgml
53         sgml2latex --output=tex $<
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 # Special target rules
88
89 coding.html:    coding.sgml
90         sgml2html --split=0 $<
91
92 funcref.html:   funcref.sgml
93         sgml2html --split=2 $<
94
95 # ------------------------------------------------------------------------------
96 # Make the dependencies
97
98 .PHONY: depend dep
99 depend dep:     $(OBJS:.o=.c)
100         @echo "Creating dependency information"
101         $(CC) -MM $^ > .depend
102
103