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
|
DISTNAME = $(progname)-$(progversion)
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -p -m 755
INSTALL_DATA = $(INSTALL) -p -m 644
SHELL = /bin/sh
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 blob.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 : $(progname)
$(progname) : $(objs)
$(CXX) $(LDFLAGS) -o $(progname) $(objs)
p$(progname) : $(objs)
$(CXX) $(LDFLAGS) -pg -o p$(progname) $(objs)
main.o : main.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -DPROGVERSION=\"$(progversion)\" -c -o $@ $<
%.o : %.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
$(objs) : Makefile bitmap.h blob.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/$(progname).1
info : $(VPATH)/doc/$(progname).info
$(VPATH)/doc/$(progname).info : $(VPATH)/doc/$(progname).texinfo
cd $(VPATH)/doc ; makeinfo $(progname).texinfo
$(VPATH)/doc/$(progname).1 : $(progname)
help2man -o $(VPATH)/doc/$(progname).1 ./$(progname)
Makefile : $(VPATH)/configure $(VPATH)/Makefile.in
./config.status
check : $(progname)
./$(progname) $(VPATH)/examples/test.pbm | diff -s -u $(VPATH)/examples/test.txt -
@echo
@echo "If the above command found no differences, $(progname) 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) ./$(progname) $(DESTDIR)$(bindir)/$(progname)
install-info :
if test ! -d $(DESTDIR)$(infodir) ; then $(INSTALL) -d $(DESTDIR)$(infodir) ; fi
$(INSTALL_DATA) $(VPATH)/doc/$(progname).info $(DESTDIR)$(infodir)/$(progname).info
-install-info $(DESTDIR)$(infodir)/$(progname).info $(DESTDIR)$(infodir)/dir
install-man :
if test ! -d $(DESTDIR)$(mandir)/man1 ; then $(INSTALL) -d $(DESTDIR)$(mandir)/man1 ; fi
$(INSTALL_DATA) $(VPATH)/doc/$(progname).1 $(DESTDIR)$(mandir)/man1/$(progname).1
install-strip : all
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install
uninstall : uninstall-info
-rm -f $(DESTDIR)$(bindir)/$(progname)
uninstall-info :
-install-info --remove $(DESTDIR)$(infodir)/$(progname).info $(DESTDIR)$(infodir)/dir
-rm -f $(DESTDIR)$(infodir)/$(progname).info
uninstall-man :
-rm -f $(DESTDIR)$(mandir)/man1/$(progname).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/$(progname).1 \
$(DISTNAME)/doc/$(progname).info \
$(DISTNAME)/doc/$(progname).texinfo \
$(DISTNAME)/examples/ \
$(DISTNAME)/$(progname).png \
$(DISTNAME)/*.cc \
$(DISTNAME)/*.h
rm -f $(DISTNAME)
bzip2 -v $(DISTNAME).tar
clean :
-rm -f $(progname) p$(progname) $(objs)
distclean : clean
-rm -f Makefile config.status *.tar *.bz2
|