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