1 #****h* ROBODoc/Makefile.plain
3 # Makefile.plain -- Plain makefile that does not need autoconf
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.
18 # The following targets are the most useful for the user.
20 # robodoc - makes the robodc executable.
21 # example - makes robodoc and shows you the autodocs
22 # generated from the ROBODoc source code
24 # html - makes autodocs for robodoc in html format.
26 # Developers might try:
31 # This documentation is not complete. It is just a test to see
32 # how to best use ROBODoc with make files.
43 #--------------------------------------
44 # use DICE C under AmigaOS
45 #--------------------------------------
49 #--------------------------------------
50 # use gcc (optimising for AmigaOS)
51 #--------------------------------------
53 #CFLAGS = -O2 -fstrength-reduce -s -m68020-40 -noixemul
55 #--------------------------------------
57 #--------------------------------------
60 CFLAGS = -Wall -ansi -pedantic
75 #--------------------------------------
76 # sources for the robodoc executable
77 #--------------------------------------
79 SOURCES=analyser.c generator.c items.c util.c folds.c headers.c \
82 OBJECTS=analyser.o generator.o items.o util.o folds.o headers.o \
85 #****** makefile.plain/robodoc
89 # This assumes that you version of make knows how to make an .o file
95 $(CC) $(OBJECTS) -o robodoc $(LIBS)
100 #****** makefile.plain/html
102 # html -- ROBODoc HTML autodocs for ROBODoc
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
112 XREF=$(DOCS:.html=.xref)
114 XREFSFILE=robodoc.html.xrefs
116 html : robodoc masterindex.html
119 # create xrefs file (file with the names of all .xref files).
121 robodoc.html.xrefs : $(XREF)
125 # Rule to create an .xref file from a source file.
128 $(ROBODOC) $< $(@:.xref=.html) INTERNAL GENXREF $@
131 # Rule to create an .html file from a source file.
133 %.html : % $(XREFSFILE)
134 $(ROBODOC) $< $@ HTML INTERNAL XREF $(XREFSFILE)
137 masterindex.html : $(XREFSFILE) $(DOCS)
138 $(ROBODOC) $(XREFSFILE) $@ INDEX HTML TITLE "ROBODoc Master Index"
141 #****** makefile.plain/example
143 # example -- create and show autodocs extracted from ROBODoc source.
149 $(BROWSER) masterindex.html
151 #----------------------------
153 #----------------------------
158 #****** makefile.plain/count
160 # count -- count the number of lines of the ROBODoc source.
164 $(EGREP) -v -G "^ \*" *.c *.h | egrep -v -G "/\*" | wc
167 #****** makefile.plain/test
169 # test -- run some tests
171 # Runs robodoc on file with a number of different headers.
176 $(ROBODOC) testheaders.c testheaders.html HTML -v
179 #****** makefile.plain/clean
181 # clean -- Clean up the mess we made.
183 # Cleans up the mess we made.
187 $(RM) -f $(DOCS) $(XREF)
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
195 #------------------------------
196 # Construction of the makefile
197 #------------------------------
200 makedepend -Y"" -f makefile.plain *.c *.h
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