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