1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
|
# -*-makefile-*-
# vi: ff=unix
#
#****h* ROBODoc/Makefile.plain
# NAME
# Makefile.plain -- Plain makefile that does not need autoconf
# SYNOPSIS
# * make -f makefile.plain robodoc
# * make -f makefile.plain html
# * make -f makefile.plain count
# * make -f makefile.plain test
# * make -f makefile.plain clean
# * make -f makefile.plain xcompile
#
# PURPOSE
# The makefile GCC.
# You can use it if you are on a non Unix system or a system
# that does not support autoconfiguration.
#
# The following targets are the most useful for the user:
# * robodoc - makes the robodc executable.
# * example - makes robodoc and shows you the autodocs
# generated from the ROBODoc source code
# using browser.
# * html - makes autodocs for robodoc in html format.
#
# To build robodoc use:
# * make -f makefile.plain robodoc
#
# Developers might try:
# * depend - create dependencies
# * test -
# * count -
# * clean -
#
# NOTES
# This documentation is not complete. It is just a test to see
# how to best use ROBODoc with makefiles.
#
#****
#
# $Id: makefile.plain,v 1.68 2010/05/02 20:16:14 gumpu Exp $
#
SHELL = /bin/sh
.SUFFIXES:
.SUFFIXES: .c .o
#--------------------------------------
# use gcc (generic)
#--------------------------------------
CC = gcc
# CFLAGS = -g -Wall -Wshadow -Wbad-function-cast -Wconversion -Wredundant-decls
# -Wunreachable-code
# TODO try to get this to compile with -Wconversion
CFLAGS = -g -Wall -Wshadow -Wbad-function-cast -Wredundant-decls -D 'ROBO_COMPILER="$(CC)"' \
-D ROBO_MAKEFILE_PLAIN
LIBS=
#
BROWSER=netscape
ROBODOC=./robodoc
ETAGS=/usr/bin/etags
EGREP=/bin/egrep
RM=/bin/rm
#MINGW_CC=/usr/bin/i586-mingw32msvc-gcc
MINGW_CC= /usr/local/bin/i386-mingw32-gcc
VERS=4.99.40
RELEASE=1
all: robodoc robohdrs
#--------------------------------------
# sources for the robodoc executable
#--------------------------------------
SOURCES = \
analyser.c \
ascii_generator.c \
directory.c \
generator.c \
document.c \
globals.c \
headers.c \
headertypes.c \
html_generator.c \
items.c \
links.c \
file.c \
latex_generator.c \
optioncheck.c \
part.c \
path.c \
roboconfig.c \
robodoc.c \
rtf_generator.c \
test_generator.c \
troff_generator.c \
util.c \
xmldocbook_generator.c
HEADERS= \
analyser.h \
ascii_generator.h \
directory.h \
dirwalk.h \
document.h \
file.h \
generator.h \
globals.h \
headers.h \
headertypes.h \
html_generator.h \
items.h \
latex_generator.h \
links.h \
optioncheck.h \
part.h \
path.h \
roboconfig.h \
robodoc.h \
rtf_generator.h \
test_generator.h \
troff_generator.h \
unittest.h \
util.h \
xmldocbook_generator.h
OBJECTS = $(SOURCES:.c=.o)
DEPENDS = $(OBJECTS:.o=.d)
#****e* Makefile.plain/robodoc
# NAME
# robodoc --
# NOTE
# This assumes that you version of make knows how to make an .o file
# out of an .c file.
# SOURCE
#
robodoc : $(OBJECTS)
$(CC) $(OBJECTS) -o robodoc$(EXE) $(LIBS)
#****
#****e* Makefile.plain/robohdrs
# NAME
# robohdrs --
# SOURCE
#
robohdrs : robodoc robohdrs.o headers.o
$(CC) $(CFLAGS) util.o globals.o robohdrs.o headers.o roboconfig.o headertypes.o -o robohdrs$(EXE)
#****
html : robodoc.html
robodoc.html : robodoc
./robodoc --src ./ --doc robodoc --singledoc --html --sections --toc
#****e* Makefile.plain/example
# NAME
# example -- create and show autodocs extracted from ROBODoc source.
# FUNCTION
#
#****
example : html
$(BROWSER) robodoc.html
#----------------------------
# Development
#----------------------------
tags :
$(ETAGS) *.c *.h
#****e* Makefile.plain/count
# NAME
# count -- count the number of lines of the ROBODoc source.
#****
count :
$(EGREP) -v -G "^ \*" *.c *.h | egrep -v -G "/\*" | wc
#****e* Makefile.plain/test
# NAME
# test -- run some tests
# FUNCTION
# Runs robodoc on file with a number of different headers.
# HISTORY
# 2002-05-19/PetteriK: test cases in Test directory run with this rule
#
#****
test : $(ROBODOC)
(cd Test; $(MAKE))
#****e* Makefile.plain/clean
# NAME
# clean -- Clean up the mess we made.
# FUNCTION
# Cleans up the mess we made.
#*****
clean :
$(RM) -f $(DOCS) $(XREF)
$(RM) -f robodoc robohdrs
$(RM) -f *~
$(RM) -f *.o *.tex *.toc *.dvi *.aux *.log *.ps *.exe
$(RM) -f robodoc.html
$(RM) -f testheaders.html
$(RM) -f stamp-h* makefile.in config.h
#****e* Makefile.plain/xcompiler-test
# NAME
# xcompiler-test
# SYNOPSIS
# make -f makefile.plain xcompiler-test
# NOTE
# Used by do.sh.
# RESULT
# Exit status 0 if cross-compiler is found.
# SOURCE
#
xcompiler-test:
test -x $(MINGW_CC)
zip -h > /dev/null 2>&1
#****
#****e* Makefile.plain/xcompile
# NAME
# xcompile
# SYNOPSIS
# make -f makefile.plain xcompile
# make -f makefile.plain MINGW_CC=/path/to/mingwcc xcompile
# NOTE
# Cross-compile Wintel binary.
# Consider `apt-get install mingw32' before running this.
# RESULT
# Excutable `robodoc.exe' is created.
# SOURCE
#
xcompile:
$(MAKE) -f makefile.plain CC=$(MINGW_CC) EXE=.exe robodoc
#*****
# end xcompile
#------------------------------
# Construction of the makefile
#------------------------------
-include $(DEPENDS)
depend:
$(CC) -MMD -E $(SOURCES) > /dev/null
|