File: Makefile.in

package info (click to toggle)
ocrad 0.16-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 588 kB
  • ctags: 686
  • sloc: cpp: 7,741; makefile: 151; sh: 88
file content (127 lines) | stat: -rw-r--r-- 3,911 bytes parent folder | download
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

DISTNAME = ocrad-0.16

CXX = g++
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -p -m 755
INSTALL_DATA = $(INSTALL) -p -m 644
SHELL = /bin/sh
CPPFLAGS =
CXXFLAGS = -Wall -W -O2
LDFLAGS =

objs = arg_parser.o common.o rational.o rectangle.o track.o ucs.o \
       page_image.o page_image_io.o page_image_layout.o \
       bitmap.o block.o profile.o feats.o feats_test0.o feats_test1.o \
       character.o character_r11.o character_r12.o character_r13.o \
       textline.o textline_r2.o textblock.o textpage.o main.o

.PHONY : all doc check install install-info install-man install-strip \
         uninstall uninstall-info uninstall-man \
         dist clean distclean

all : ocrad

ocrad : $(objs)
	$(CXX) $(LDFLAGS) $(CXXFLAGS) -o ocrad $(objs)

ocradp : $(objs)
	$(CXX) $(LDFLAGS) $(CXXFLAGS) -pg -o ocradp $(objs)

%.o : %.cc
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<

$(objs)             : Makefile bitmap.h block.h common.h rational.h rectangle.h ucs.h
arg_parser.o        : arg_parser.h
character.o         : character.h
character_r11.o     : character.h profile.h feats.h
character_r12.o     : character.h profile.h feats.h
character_r13.o     : character.h profile.h feats.h
feats.o             : profile.h feats.h
feats_test0.o       : profile.h feats.h
feats_test1.o       : profile.h feats.h
main.o              : arg_parser.h page_image.h textpage.h
page_image.o        : page_image.h
page_image_io.o     : page_image.h
page_image_layout.o : track.h page_image.h
profile.o           : profile.h
textblock.o         : track.h character.h page_image.h textline.h textblock.h
textline.o          : track.h character.h page_image.h textline.h
textline_r2.o       : track.h character.h textline.h
textpage.o          : track.h character.h page_image.h textline.h textblock.h textpage.h
track.o             : track.h


doc : info $(VPATH)/doc/ocrad.1

info : $(VPATH)/doc/ocrad.info

$(VPATH)/doc/ocrad.info : $(VPATH)/doc/ocrad.texinfo
	cd $(VPATH)/doc ; makeinfo ocrad.texinfo

$(VPATH)/doc/ocrad.1 : ocrad
	help2man -o $(VPATH)/doc/ocrad.1 ./ocrad

Makefile : $(VPATH)/configure $(VPATH)/Makefile.in
	$(VPATH)/configure --srcdir=$(VPATH)

check : ocrad
	./ocrad $(VPATH)/examples/test.pbm | diff -s -u $(VPATH)/examples/test.txt -
	@echo
	@echo "If the above command found no differences, ocrad is correctly built"
	@echo "and you may now install it."
	@echo

install : all install-info
	if test ! -d $(DESTDIR)$(bindir) ; then $(INSTALL) -d $(DESTDIR)$(bindir) ; fi
	$(INSTALL_PROGRAM) ./ocrad $(DESTDIR)$(bindir)/ocrad

install-info :
	if test ! -d $(DESTDIR)$(infodir) ; then $(INSTALL) -d $(DESTDIR)$(infodir) ; fi
	$(INSTALL_DATA) $(VPATH)/doc/ocrad.info $(DESTDIR)$(infodir)/ocrad.info
	-install-info $(DESTDIR)$(infodir)/ocrad.info $(DESTDIR)$(infodir)/dir

install-man :
	if test ! -d $(DESTDIR)$(mandir)/man1 ; then $(INSTALL) -d $(DESTDIR)$(mandir)/man1 ; fi
	$(INSTALL_DATA) $(VPATH)/doc/ocrad.1 $(DESTDIR)$(mandir)/man1/ocrad.1

install-strip : all
	$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install

uninstall : uninstall-info uninstall-man
	-rm -f $(DESTDIR)$(bindir)/ocrad

uninstall-info :
	-install-info --remove $(DESTDIR)$(infodir)/ocrad.info $(DESTDIR)$(infodir)/dir
	-rm -f $(DESTDIR)$(infodir)/ocrad.info

uninstall-man :
	-rm -f $(DESTDIR)$(mandir)/man1/ocrad.1

dist :
	ln -sf . $(DISTNAME)
	tar -cvf $(DISTNAME).tar \
	  $(DISTNAME)/AUTHORS \
	  $(DISTNAME)/COPYING \
	  $(DISTNAME)/ChangeLog \
	  $(DISTNAME)/INSTALL \
	  $(DISTNAME)/Makefile.in \
	  $(DISTNAME)/NEWS \
	  $(DISTNAME)/README \
	  $(DISTNAME)/TODO \
	  $(DISTNAME)/configure \
	  $(DISTNAME)/doc/ocrad.1 \
	  $(DISTNAME)/doc/ocrad.info \
	  $(DISTNAME)/doc/ocrad.texinfo \
	  $(DISTNAME)/examples/ \
	  $(DISTNAME)/*.cc \
	  $(DISTNAME)/*.h \
	  $(DISTNAME)/ocrad.png
	rm -f $(DISTNAME)
	bzip2 -v $(DISTNAME).tar

clean :
	-rm -f ocrad ocradp $(objs)

distclean : clean
	-rm -f Makefile *.tar *.bz2