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