Added SILC Thread Queue API
[silc.git] / util / robodoc / Source / makefile.plain
1 #****h* ROBODoc/Makefile.plain
2 # NAME
3 #   Makefile.plain -- Plain makefile that does not need autoconf 
4 # SYNOPSIS
5 #   make robodoc
6 #   make html   
7 #   make example
8 #   make count
9 #   make test
10 #   make clean
11 # PURPOSE
12 #   The makefile for SAS C compiler v6.x and Dice, and GCC.
13 #   You can use it if you are on a non Unix system or a system
14 #   that does not support autoconfiguration.
15 #
16 #
17 #
18 #   The following targets are the most useful for the user.
19 #
20 #   robodoc -  makes the robodc executable.
21 #   example -  makes robodoc and shows you the autodocs
22 #              generated from the ROBODoc source code
23 #              using browser.         
24 #   html    -  makes autodocs for robodoc in html format.
25 #
26 #   Developers might try:
27 #   test    -
28 #   count   -
29 #   clean   -  
30 # NOTES
31 #   This documentation is not complete. It is just a test to see
32 #   how to best use ROBODoc with make files.
33 #
34 #****
35 #
36 # $Id$
37 #
38
39 SHELL = /bin/sh
40 .SUFFIXES:
41 .SUFFIXES: .c .o
42
43 #--------------------------------------
44 # use DICE C under AmigaOS
45 #--------------------------------------
46 #CC = dcc
47 #CFLAGS =
48
49 #--------------------------------------
50 # use gcc (optimising for AmigaOS)
51 #--------------------------------------
52 #CC = gcc
53 #CFLAGS = -O2 -fstrength-reduce -s -m68020-40 -noixemul
54
55 #--------------------------------------
56 # use gcc (generic)
57 #--------------------------------------
58
59 CC = gcc
60 CFLAGS = -Wall -ansi -pedantic
61 LIBS=
62
63 #
64 #
65 #
66
67 BROWSER=netscape
68 ROBODOC=./robodoc
69 ETAGS=/usr/bin/etags
70 EGREP=/bin/egrep
71 RM=/bin/rm
72
73 all: robodoc
74
75 #--------------------------------------
76 # sources for the robodoc executable
77 #--------------------------------------
78
79 SOURCES=analyser.c generator.c items.c util.c folds.c headers.c \
80         links.c robodoc.c     
81
82 OBJECTS=analyser.o generator.o items.o util.o folds.o headers.o \
83         links.o robodoc.o     
84
85 #****** makefile.plain/robodoc
86 # NAME
87 #   robodoc --
88 # NOTE
89 #   This assumes that you version of make knows how to make an .o file
90 #   out of an .c file.
91 # SOURCE
92 #
93
94 robodoc : $(OBJECTS) 
95         $(CC) $(OBJECTS) -o robodoc $(LIBS)
96
97 #****
98
99
100 #****** makefile.plain/html
101 # NAME
102 #   html -- ROBODoc HTML autodocs for ROBODoc
103 # FUNCTION
104 #   
105 #****
106
107 DOCS=analyser.c.html generator.c.html items.c.html util.c.html \
108   folds.c.html headers.c.html links.c.html robodoc.c.html \
109   analyser.h.html generator.h.html items.h.html util.h.html \
110   folds.h.html headers.h.html links.h.html robodoc.h.html
111
112 XREF=$(DOCS:.html=.xref)
113
114 XREFSFILE=robodoc.html.xrefs 
115
116 html : robodoc masterindex.html 
117
118 #
119 # create xrefs file (file with the names of all .xref files).
120 #
121 robodoc.html.xrefs : $(XREF)
122         /bin/ls *.xref > $@
123
124 #
125 # Rule to create an .xref file from a source file.
126 #
127 %.xref : %
128         $(ROBODOC) $< $(@:.xref=.html) INTERNAL GENXREF $@
129
130 #
131 # Rule to create an .html file from a source file.
132 #
133 %.html : % $(XREFSFILE)
134         $(ROBODOC) $< $@ HTML INTERNAL XREF $(XREFSFILE)
135
136
137 masterindex.html : $(XREFSFILE) $(DOCS)
138         $(ROBODOC) $(XREFSFILE) $@ INDEX HTML TITLE "ROBODoc Master Index"
139
140
141 #****** makefile.plain/example
142 # NAME
143 #   example -- create and show autodocs extracted from ROBODoc source.
144 # FUNCTION
145 #
146 #****
147
148 example : html 
149         $(BROWSER) masterindex.html
150
151 #----------------------------
152 # Development
153 #----------------------------
154
155 tags :
156         $(ETAGS) *.c *.h
157
158 #****** makefile.plain/count
159 # NAME
160 #   count -- count the number of lines of the ROBODoc source.
161 #****
162
163 count :
164         $(EGREP) -v -G "^ \*" *.c *.h | egrep -v -G "/\*"  | wc
165
166
167 #****** makefile.plain/test
168 # NAME
169 #   test -- run some tests
170 # FUNCTION
171 #   Runs robodoc on file with a number of different headers.
172 #
173 #****
174
175 test : $(ROBODOC)
176         $(ROBODOC) testheaders.c testheaders.html HTML -v
177
178
179 #****** makefile.plain/clean
180 # NAME
181 #   clean -- Clean up the mess we made.
182 # FUNCTION
183 #   Cleans up the mess we made.
184 #*****
185
186 clean :
187         $(RM) -f $(DOCS) $(XREF)
188         $(RM) -f robodoc
189         $(RM) -f *~
190         $(RM) -f *.o *.tex *.toc *.dvi *.aux *.log *.ps
191         $(RM) -f masterindex.html
192         $(RM) -f testheaders.html
193         $(RM) -f stamp-h* makefile.in config.h robodoc.html.xrefs
194
195 #------------------------------
196 # Construction of the makefile
197 #------------------------------
198
199 depend :
200         makedepend -Y"" -f makefile.plain *.c *.h
201
202 # DO NOT DELETE
203
204 analyser.o: config.h.in robodoc.h headers.h items.h util.h folds.h links.h
205 analyser.o: analyser.h
206 folds.o: config.h.in folds.h robodoc.h
207 generator.o: config.h.in robodoc.h headers.h items.h folds.h util.h links.h
208 generator.o: generator.h analyser.h
209 headers.o: config.h.in robodoc.h headers.h
210 items.o: config.h.in robodoc.h items.h
211 links.o: config.h.in headers.h robodoc.h util.h links.h
212 robodoc.o: config.h.in robodoc.h folds.h headers.h items.h util.h links.h
213 robodoc.o: analyser.h generator.h
214 util.o: config.h.in robodoc.h links.h headers.h folds.h items.h util.h
215