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