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