4 #****h* ROBODoc/Makefile.plain
6 # Makefile.plain -- Plain makefile that does not need autoconf
8 # * make -f makefile.plain robodoc
9 # * make -f makefile.plain html
10 # * make -f makefile.plain count
11 # * make -f makefile.plain test
12 # * make -f makefile.plain clean
13 # * make -f makefile.plain xcompile
17 # You can use it if you are on a non Unix system or a system
18 # that does not support autoconfiguration.
20 # The following targets are the most useful for the user:
21 # * robodoc - makes the robodc executable.
22 # * example - makes robodoc and shows you the autodocs
23 # generated from the ROBODoc source code
25 # * html - makes autodocs for robodoc in html format.
27 # To build robodoc use:
28 # * make -f makefile.plain robodoc
30 # Developers might try:
31 # * depend - create dependencies
37 # This documentation is not complete. It is just a test to see
38 # how to best use ROBODoc with makefiles.
42 # $Id: makefile.plain,v 1.63 2007/07/10 19:13:52 gumpu Exp $
49 #--------------------------------------
51 #--------------------------------------
54 # CFLAGS = -g -Wall -Wshadow -Wbad-function-cast -Wconversion -Wredundant-decls
56 # TODO try to get this to compile with -Wconversion
58 CFLAGS = -g -Wall -Wshadow -Wbad-function-cast -Wredundant-decls
68 MINGW_CC=/usr/bin/i586-mingw32msvc-gcc
73 #--------------------------------------
74 # sources for the robodoc executable
75 #--------------------------------------
100 xmldocbook_generator.c
127 xmldocbook_generator.h
129 OBJECTS = $(SOURCES:.c=.o)
130 DEPENDS = $(OBJECTS:.o=.d)
132 #****e* Makefile.plain/robodoc
136 # This assumes that you version of make knows how to make an .o file
142 $(CC) $(OBJECTS) -o robodoc$(EXE) $(LIBS)
146 #****e* Makefile.plain/robohdrs
152 robohdrs : robodoc robohdrs.o headers.o
153 $(CC) $(CFLAGS) util.o globals.o robohdrs.o headers.o roboconfig.o headertypes.o -o robohdrs$(EXE)
159 robodoc.html : robodoc
160 ./robodoc --src ./ --doc robodoc --singledoc --html --sections --toc
162 #****e* Makefile.plain/example
164 # example -- create and show autodocs extracted from ROBODoc source.
170 $(BROWSER) robodoc.html
172 #----------------------------
174 #----------------------------
179 #****e* Makefile.plain/count
181 # count -- count the number of lines of the ROBODoc source.
185 $(EGREP) -v -G "^ \*" *.c *.h | egrep -v -G "/\*" | wc
188 #****e* Makefile.plain/test
190 # test -- run some tests
192 # Runs robodoc on file with a number of different headers.
194 # 2002-05-19/PetteriK: test cases in Test directory run with this rule
201 #****e* Makefile.plain/clean
203 # clean -- Clean up the mess we made.
205 # Cleans up the mess we made.
209 $(RM) -f $(DOCS) $(XREF)
210 $(RM) -f robodoc robohdrs
212 $(RM) -f *.o *.tex *.toc *.dvi *.aux *.log *.ps *.exe
213 $(RM) -f robodoc.html
214 $(RM) -f testheaders.html
215 $(RM) -f stamp-h* makefile.in config.h
217 #****e* Makefile.plain/xcompiler-test
221 # make -f makefile.plain xcompiler-test
225 # Exit status 0 if cross-compiler is found.
231 zip -h > /dev/null 2>&1
235 #****e* Makefile.plain/xcompile
239 # make -f makefile.plain xcompile
240 # make -f makefile.plain MINGW_CC=/path/to/mingwcc xcompile
242 # Cross-compile Wintel binary.
243 # Consider `apt-get install mingw32' before running this.
245 # Excutable `robodoc.exe' is created.
250 $(MAKE) -f makefile.plain CC=$(MINGW_CC) EXE=.exe robodoc
254 #------------------------------
255 # Construction of the makefile
256 #------------------------------
261 $(CC) -MMD -E $(SOURCES) > /dev/null