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
|
#
# Copyright (C) 1999-2002 Ricardo Ueda Karpischek
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the version 2 of the GNU General Public
# License as published by the Free Software Foundation.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this software; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.
#
#
# Clara OCR version number.
#
VERSION=20031214;
#
# CONFIGURATION SECTION - BEGIN
#
#
# Configure the destination directories:
#
#BINDIR=/usr/local/bin
BINDIR=$(DESTDIR)/usr/bin
#MANDIR=/usr/local/man/man1
MANDIR=$(DESTDIR)/usr/share/man/man1
#DOCDIR=/usr/local/doc/clara
#DOCDIR=/usr/doc/clara
#DOCDIR=/usr/doc/clara-$(VERSION)
DOCDIR=$(DESTDIR)/usr/share/doc/clara
#
# Configure these variables accordingly to your system:
#
INCLUDE = -I/usr/X11R6/include
LIBPATH = -L/usr/X11R6/lib
CC = gcc
#
# Now choose the Clara OCR compilation options:
#
# HAVE_POPEN .. If defined, Clara OCR will include code to
# compress/uncompress gzipped files on the
# fly using pipes (Clara OCR does not support
# zlib). Undefine on systems that don't
# support popen.
#
# MEMCHECK .. If defined, Clara OCR will include
# code to detect memory leaks in some
# critical points. Undefine for maximum
# speed.
#
# FUN_CODES .. If defined, Clara OCR will include fun
# features to be used in presentations. If
# defined, then HAVE_SIGNAL must be defined
# too.
#
# HAVE_SIGNAL .. If defined, Clara OCR will include code
# to install signal handlers on startup
# (important).
#
# PATT_SKEL .. Instead of using global skeleton parameters,
# use per-pattern skeleton parameters. This is
# an experimental feature, and chances are that
# it will be completely removed in the near future.
#
# CF .. Hacks for tests using Candido de Figueiredo
# Dictionary (please do not define this macro).
#
# TEST .. Include test code.
#
# NO_RINTF .. required on systems that do not provide rintf
# (like Solaris).
#
COPTS = -DHAVE_POPEN -DMEMCHECK -DFUN_CODES -DHAVE_SIGNAL -DTEST -DNO_RINTF
#COPTS = -DHAVE_POPEN -DMEMCHECK
#
# Add or remove flags if necessary:
#
CFLAGS = $(INCLUDE) -g -Wall $(COPTS)
#CFLAGS = $(INCLUDE) -g -Wall -pedantic $(COPTS)
#CFLAGS = $(INCLUDE) -g -O2 -Wall $(COPTS)
#CFLAGS = $(INCLUDE) -g -O2 -pedantic $(COPTS)
#CFLAGS = $(INCLUDE) -g -O2 $(COPTS)
#
# Add or remove flags if necessary:
#
LDFLAGS = -g
#
# If your system requires additional libs, please add them:
#
LINKLIB = $(LIBPATH) -lX11 -lm
#
# CONFIGURATION SECTION - END
#
DFLAGS = -web
OBJS = clara.o skel.o event.o symbol.o pattern.o pbm2cl.o cml.o\
welcome.o redraw.o html.o alphabet.o revision.o build.o\
consist.o pgmblock.o preproc.o obd.o
SRC = book.c clara.c skel.c event.c symbol.c pattern.c pbm2cl.c cml.c\
welcome.c redraw.c html.c alphabet.c revision.c build.c\
consist.c pgmblock.c preproc.c obd.c
#
# The programs.
#
clara: $(OBJS)
$(CC) -o clara $(LDFLAGS) $(OBJS) $(LINKLIB)
manager: manager.c
$(CC) $(CFLAGS) -o manager manager.c
#
# Documentation targets.
#
adv.new:
rm -f doc/clara-book.html doc/clara-book.1
adv: adv.new
./mkdoc.pl $(DFLAGS) -html -book $(SRC) *.h >doc/clara-adv.html
./mkdoc.pl $(DFLAGS) -nroff -book $(SRC) *.h >doc/clara-adv.1
dev.new:
rm -f doc/clara-dev.html doc/clara-dev.1
dev: dev.new
./mkdoc.pl $(DFLAGS) -html -devel $(SRC) *.h >doc/clara-dev.html
./mkdoc.pl $(DFLAGS) -nroff -devel $(SRC) *.h >doc/clara-dev.1
tut.new:
rm -f doc/clara-tut.html doc/clara.1
tut: tut.new
./mkdoc.pl $(DFLAGS) -html -tutorial $(SRC) *.h >doc/clara-tut.html
./mkdoc.pl $(DFLAGS) -nroff -tutorial $(SRC) *.h >doc/clara.1
faq.new:
rm -f doc/clara-faq.html doc/clara-faq.1
faq: faq.new
./mkdoc.pl $(DFLAGS) -html -faq $(SRC) *.h >doc/clara-faq.html
./mkdoc.pl -faq $(SRC) *.h >doc/FAQ
glossary.new:
rm -f doc/clara-glo.html doc/clara-glo.1
glossary: glossary.new
./mkdoc.pl $(DFLAGS) -html -glossary $(SRC) *.h >doc/clara-glo.html
./mkdoc.pl -glossary $(SRC) *.h >doc/clara-glo.1
doc: faq tut adv dev glossary
#
# Other.
#
all: clara doc
test: clara
./clara -p 2
install: all
install -d $(BINDIR)
install clara $(BINDIR)
install selthresh $(BINDIR)
install -d $(MANDIR)
install doc/clara.1 doc/clara-dev.1 doc/clara-adv.1 $(MANDIR)
install -d $(DOCDIR)
install ANNOUNCE CHANGELOG doc/FAQ doc/*.html $(DOCDIR)
clean:
rm -f clara sclara $(OBJS) doc/clara*.1 doc/clara*.html doc/FAQ
rm -f acts patterns *session *.html *~ core
rm -f www/*~
rm -f doubts/*
rm -f manager
stats:
wc *.c *.h *.pl Makefile CHANGELOG | sort -n
#
# Module dependencies.
#
alphabet.o: common.h alphabet.c
build.o: common.h build.c
clara.o: common.h gui.h clara.c
cml.o: common.h gui.h cml.c
consist.o: common.h consist.c
event.o: common.h gui.h event.c
html.o: common.h gui.h html.c
pattern.o: common.h gui.h pattern.c
pbm2cl.o: common.h pbm2cl.c
redraw.o: common.h gui.h redraw.c
revision.o: common.h gui.h revision.c
skel.o: common.h skel.c
symbol.o: common.h gui.h symbol.c
welcome.o: common.h welcome.c
pgmblock.o:
preproc.c:
obd.c:
|