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