Imported Robodoc.
[robodoc.git] / Source / makefile.mingw
1 #****h* ROBODoc/Makefile.mingw
2 # NAME
3 #   Makefile.mingw -- Plain makefile that does not need autoconf 
4 # SYNOPSIS
5 #   make -f makefile.mingw robodoc
6 #   make -f makefile.mingw count
7 #   make -f makefile.mingw test
8 #   make -f makefile.mingw clean
9 # PURPOSE
10 #   The makefile for MingW Minimalist GNU for Windows
11 #   See http://www.mingw.org
12 #
13 #   You can use it if you are on a win32 system.
14 #
15 #   The following targets are the most useful for the user.
16 #
17 #   robodoc -  makes the robodoc executable.
18 #
19 #   Developers might try:
20 #   test    -
21 #   count   -
22 #   clean   -  
23 #
24 #****
25 #
26 # $Id: makefile.mingw,v 1.7 2007/05/14 15:41:19 petterik Exp $
27 #
28
29 .SUFFIXES:
30 .SUFFIXES: .c .o
31
32 #--------------------------------------
33 # use gcc (generic)
34 #--------------------------------------
35
36 CC = gcc
37 CFLAGS = -pedantic -O3 -Wall -W -std=c99 # -ansi
38 LIBS=
39
40 #
41 #
42 #
43
44 ROBODOC=robodoc.exe
45 RM=rm -f
46 all: robodoc.exe
47
48 # currently does not compile: robohdrs
49
50 #--------------------------------------
51 # sources for the robodoc executable
52 #--------------------------------------
53
54 SOURCES = analyser.c \
55           ascii_generator.c \
56           directory.c \
57           generator.c \
58           document.c \
59           globals.c \
60           headertypes.c \
61           headers.c \
62           html_generator.c \
63           items.c \
64           links.c \
65           file.c \
66           latex_generator.c \
67           part.c \
68           path.c \
69           roboconfig.c \
70           robodoc.c \
71           optioncheck.c \
72           rtf_generator.c \
73           sgmldocbook_generator.c \
74           troff_generator.c \
75           util.c \
76           test_generator.c \
77           xmldocbook_generator.c
78
79 HEADERS= analyser.h \
80          ascii_generator.h \
81          directory.h \
82          dirwalk.h \
83          document.h \
84          file.h \
85          generator.h \
86          globals.h \
87          headertypes.h \
88          headers.h \
89          html_generator.h \
90          items.h \
91          latex_generator.h \
92          links.h \
93          optioncheck.h \
94          part.h \
95          path.h \
96          roboconfig.h \
97          robodoc.h \
98          rtf_generator.h \
99          sgmldocbook_generator.h \
100          troff_generator.h \
101          unittest.h \
102          util.h \
103          test_generator.h \
104          xmldocbook_generator.h
105
106 OBJECTS= $(SOURCES:.c=.o)
107
108 #****e* Makefile.mingw/robodoc
109 # NAME
110 #   robodoc --
111 # NOTE
112 #   This assumes that you version of make knows how to make an .o file
113 #   out of an .c file.
114 # SOURCE
115 #
116
117 $(ROBODOC) : $(OBJECTS) 
118         $(CC) $(OBJECTS) -o robodoc $(LIBS)
119
120 #****
121
122 #****e* Makefile.mingw/robohdrs
123 # NAME
124 #   robohdrs --
125 # SOURCE
126 #
127
128 robohdrs : robohdrs.o headers.o
129         $(CC) robohdrs.o headers.o -o robohdrs
130
131 #****
132
133 html : robodoc.html
134
135 robodoc.html : $(ROBODOC)
136         ./$(ROBODOC) --src ./ --doc robodoc --singledoc --html --sections --toc
137
138 #----------------------------
139 # Development
140 #----------------------------
141
142
143 #****e* Makefile.mingw/test
144 # NAME
145 #   test -- run some tests
146 # FUNCTION
147 #   Runs robodoc on file with a number of different headers.
148 # HISTORY
149 #   2002-05-19/PetteriK: test cases in Test directory run with this rule
150 #
151 #****
152
153 test : $(ROBODOC)
154         (cd Test; $(MAKE))
155
156 #****e* Makefile.mingw/clean
157 # NAME
158 #   clean -- Clean up the mess we made.
159 # FUNCTION
160 #   Cleans up the mess we made.
161 #*****
162
163 clean :
164         $(RM) $(OBJECTS)
165         $(RM) robodoc 
166         $(RM) robohdrs
167         $(RM) *~
168         $(RM) *.o 
169         $(RM) *.tex 
170         $(RM) *.toc 
171         $(RM) *.dvi 
172         $(RM) *.aux 
173         $(RM) *.log 
174         $(RM) *.ps
175         $(RM) robodoc.html
176         $(RM) testheaders.html
177         $(RM) stamp-h* 
178         $(RM) makefile.in 
179         $(RM) config.h
180
181
182 #------------------------------
183 # Construction of the makefile
184 #------------------------------
185
186 depend :
187         makedepend -Y"" -f makefile.mingw $(SOURCES) $(HEADERS)
188
189 depend2:
190         $(CC) -MM $(SOURCES)
191
192 # DO NOT DELETE
193
194 analyser.o: robodoc.h globals.h headers.h headertypes.h items.h util.h
195 analyser.o: links.h document.h analyser.h file.h path.h part.h
196 ascii_generator.o: ascii_generator.h headers.h util.h robodoc.h globals.h
197 ascii_generator.o: items.h generator.h document.h
198 directory.o: robodoc.h directory.h file.h path.h links.h headertypes.h
199 directory.o: headers.h document.h util.h globals.h roboconfig.h
200 generator.o: globals.h robodoc.h headers.h items.h util.h links.h
201 generator.o: headertypes.h document.h generator.h part.h file.h path.h
202 generator.o: roboconfig.h html_generator.h latex_generator.h
203 generator.o: sgmldocbook_generator.h xmldocbook_generator.h rtf_generator.h
204 generator.o: troff_generator.h ascii_generator.h test_generator.h analyser.h
205 document.o: robodoc.h document.h part.h path.h directory.h file.h links.h
206 document.o: headertypes.h headers.h util.h generator.h
207 globals.o: robodoc.h globals.h links.h headertypes.h headers.h document.h
208 headertypes.o: headertypes.h util.h headers.h
209 headers.o: robodoc.h headers.h globals.h roboconfig.h util.h
210 html_generator.o: html_generator.h headers.h items.h document.h robodoc.h
211 html_generator.o: util.h globals.h links.h headertypes.h generator.h
212 html_generator.o: directory.h file.h path.h part.h
213 items.o: globals.h robodoc.h items.h roboconfig.h util.h headers.h
214 links.o: globals.h robodoc.h headers.h util.h links.h headertypes.h
215 links.o: document.h part.h file.h path.h
216 file.o: file.h path.h links.h headertypes.h headers.h document.h robodoc.h
217 file.o: util.h
218 latex_generator.o: generator.h robodoc.h headers.h document.h util.h links.h
219 latex_generator.o: headertypes.h latex_generator.h globals.h
220 part.o: headers.h file.h path.h links.h headertypes.h document.h robodoc.h
221 part.o: part.h util.h
222 path.o: path.h robodoc.h headers.h util.h
223 roboconfig.o: headertypes.h util.h headers.h roboconfig.h
224 robodoc.o: robodoc.h globals.h headers.h util.h links.h headertypes.h
225 robodoc.o: document.h part.h analyser.h generator.h directory.h file.h path.h
226 robodoc.o: roboconfig.h
227 rtf_generator.o: rtf_generator.h headers.h util.h robodoc.h globals.h
228 rtf_generator.o: generator.h document.h
229 sgmldocbook_generator.o: sgmldocbook_generator.h headers.h
230 sgmldocbook_generator.o: xmldocbook_generator.h document.h robodoc.h util.h
231 sgmldocbook_generator.o: globals.h links.h headertypes.h generator.h items.h
232 troff_generator.o: troff_generator.h headers.h util.h robodoc.h items.h
233 troff_generator.o: generator.h document.h
234 util.o: robodoc.h globals.h links.h headertypes.h headers.h document.h util.h
235 test_generator.o: test_generator.h headers.h document.h robodoc.h globals.h
236 test_generator.o: util.h
237 xmldocbook_generator.o: xmldocbook_generator.h headers.h document.h robodoc.h
238 xmldocbook_generator.o: globals.h util.h
239 analyser.o: document.h robodoc.h
240 ascii_generator.o: headers.h
241 directory.o: file.h path.h links.h headertypes.h headers.h document.h
242 directory.o: robodoc.h
243 document.o: robodoc.h
244 file.o: path.h links.h headertypes.h headers.h document.h robodoc.h
245 generator.o: robodoc.h headers.h document.h
246 globals.o: robodoc.h
247 html_generator.o: headers.h items.h document.h robodoc.h
248 latex_generator.o: headers.h
249 links.o: headertypes.h headers.h document.h robodoc.h
250 rtf_generator.o: headers.h
251 sgmldocbook_generator.o: headers.h
252 troff_generator.o: headers.h
253 util.o: headers.h
254 test_generator.o: headers.h document.h robodoc.h
255 xmldocbook_generator.o: headers.h document.h robodoc.h