reference/ocr-new/Makefile
changeset 0 6b8091ca909a
equal deleted inserted replaced
-1:000000000000 0:6b8091ca909a
       
     1 #Makefile for OCRchie 
       
     2 
       
     3 CC	= g++
       
     4 #CC	= purify -cache-dir=/tmp/ocrchie/cache -collector=/usr/sww/lib/gcc-lib/hppa1.1-hp-hpux9.03/2.6.3/ld g++
       
     5 
       
     6 #CC	= quantify -cache-dir=/tmp/ocrchie/cache -collector=/usr/sww/lib/gcc-lib/hppa1.1-hp-hpux9.03/2.6.3/ld g++
       
     7 
       
     8 DEBUG	= -g
       
     9 OPTIMIZE = -O
       
    10 CCFLAGS = $(DEBUG)
       
    11 EXECUTABLE = ocrchie
       
    12 
       
    13 # TCL root directory
       
    14 # on .cs machines 
       
    15 TCLBASE = /usr/sww/tcl-7.4
       
    16 
       
    17 # X11 root directory
       
    18 X11BASE = /usr/sww/X11
       
    19 
       
    20 # math library directory
       
    21 MATHLIB = /lib/pa1.1
       
    22 
       
    23 # Place where object files need to be stored
       
    24 ODIR = /tmp/ocrchie/
       
    25 
       
    26 # That's it.  Now just do a gmake.
       
    27 
       
    28 INCLUDE	= -I${TCLBASE}/include -I${X11BASE}/include
       
    29 LIBDIRS	= -L${TCLBASE}/lib -L${X11BASE}/lib -L${MATHLIB}
       
    30 LIBS	= ${LIBDIRS} -ltk -ltcl -lX11 -lM -ltiff
       
    31 HEADERS		= system.h list.h Component.h  \
       
    32 		  BitMap.h RLEPair.h RLEMap.h LineMarker.h Page.h Point.h \
       
    33 		  convertMap.h Component.h Word.h tcl_interface.h \
       
    34 		  EqnMarker.h Zone.h
       
    35 
       
    36 
       
    37 OFILES = 	    $(ODIR)main.o $(ODIR)project.o $(ODIR)histogram.o \
       
    38 		    $(ODIR)get_skew.o $(ODIR)tcl_interface.o $(ODIR)Zone.o \
       
    39 		    $(ODIR)RLEMap.o $(ODIR)RLEPair.o $(ODIR)list.o \
       
    40 		    $(ODIR)convertMap.o $(ODIR)Component.o $(ODIR)Page.o\
       
    41 		    $(ODIR)BitMap.o $(ODIR)system.o $(ODIR)testocr.o \
       
    42 		    $(ODIR)Word.o $(ODIR)learn.o $(ODIR)status_message.o \
       
    43 		    $(ODIR)link.o 
       
    44 
       
    45 #The Executable project
       
    46 ocrchie:	    $(OFILES)
       
    47 		    $(CC) -g -o $(EXECUTABLE) ${INCLUDE} $(OFILES) $(LIBS)
       
    48 
       
    49 
       
    50 # The .o files compiled in ODIR because of space considerations
       
    51 
       
    52 $(ODIR)link.o:	 link.cc link.h
       
    53 		 $(CC) $(CCFLAGS) ${INCLUDE} -o $(ODIR)link.o -c link.cc
       
    54 $(ODIR)status_message.o:	 status_message.cc status_message.h
       
    55 		 $(CC) $(CCFLAGS) -o $(ODIR)status_message.o -c status_message.cc
       
    56 
       
    57 $(ODIR)system.o:	system.cc $(HEADERS)
       
    58 		$(CC) $(CCFLAGS) -o $(ODIR)system.o -c system.cc
       
    59 
       
    60 $(ODIR)Page.o:		$(HEADERS) Page.cc RLEMap.h RLEPair.h BitMap.h 
       
    61 		$(CC) $(CCFLAGS) -o $(ODIR)Page.o -c Page.cc
       
    62 
       
    63 $(ODIR)RLEMap.o: 	$(HEADERS) system.cc\
       
    64 		RLEMap.cc  RLEPair.cc 
       
    65 		$(CC) $(CCFLAGS) -o $(ODIR)RLEMap.o -c RLEMap.cc
       
    66 
       
    67 $(ODIR)BitMap.o:	$(HEADERS) system.cc BitMap.cc 
       
    68 		$(CC) $(CCFLAGS) -o $(ODIR)BitMap.o -c BitMap.cc
       
    69 
       
    70 $(ODIR)RLEPair.o:	$(HEADERS)  RLEPair.cc
       
    71 		$(CC) $(CCFLAGS) -o $(ODIR)RLEPair.o -c RLEPair.cc
       
    72 
       
    73 $(ODIR)Component.o:	$(HEADERS) Component.cc
       
    74 		$(CC) $(CCFLAGS) -o $(ODIR)Component.o -c Component.cc
       
    75 
       
    76 
       
    77 $(ODIR)Zone.o:	$(HEADERS) Zone.cc
       
    78 		$(CC) $(CCFLAGS) -o $(ODIR)Zone.o -c Zone.cc
       
    79 
       
    80 
       
    81 $(ODIR)list.o:		list.h list.cc
       
    82 		$(CC) $(CCFLAGS) -o $(ODIR)list.o -c list.cc
       
    83 
       
    84 $(ODIR)Word.o:		Word.h Word.cc Component.h list.h list.cc
       
    85 		$(CC) $(CCFLAGS) -o $(ODIR)Word.o -c Word.cc
       
    86 
       
    87 $(ODIR)convertMap.o:    $(HEADERS) convertMap.cc
       
    88 		$(CC) $(CCFLAGS) -o $(ODIR)convertMap.o -c convertMap.cc
       
    89 
       
    90 $(ODIR)learn.o:	system.h learn.h learn.cc
       
    91 		$(CC) $(CCFLAGS) -o $(ODIR)learn.o -c learn.cc
       
    92 
       
    93 $(ODIR)main.o:	main.cc $(HEADERS)
       
    94 	$(CC) $(CCFLAGS) -o $(ODIR)main.o -c ${INCLUDE} main.cc
       
    95 
       
    96 $(ODIR)testocr.o:	testocr.cc $(HEADERS)
       
    97 	$(CC) $(CCFLAGS)  -o $(ODIR)testocr.o -c testocr.cc
       
    98 
       
    99 $(ODIR)project.o:	project.cc project.h bitmap.h histogram.h
       
   100 	$(CC) $(CCFLAGS) -o $(ODIR)project.o -c project.cc
       
   101 
       
   102 
       
   103 $(ODIR)histogram.o:	histogram.cc histogram.h
       
   104 	$(CC) $(CCFLAGS) -o $(ODIR)histogram.o -c histogram.cc
       
   105 
       
   106 $(ODIR)get_skew.o:	get_skew.cc get_skew.h project.h histogram.h
       
   107 	$(CC) $(CCFLAGS) -o $(ODIR)get_skew.o -c get_skew.cc
       
   108 
       
   109 $(ODIR)tcl_interface.o:	tcl_interface.cc tcl_interface.h
       
   110 	$(CC) $(CCFLAGS) -o $(ODIR)tcl_interface.o -c ${INCLUDE} tcl_interface.cc
       
   111 
       
   112 #$(ODIR)deskew.o:	deskew.cc deskew.h	
       
   113 #	$(CC) $(CCFLAGS) -c deskew.cc
       
   114 
       
   115 #$(ODIR)rotate.o:	rotate.cc
       
   116 #	$(CC) $(CCFLAGS) -c rotate.cc
       
   117 
       
   118 
       
   119 
       
   120 clean:		
       
   121 		rm -f core *.o *~
       
   122 #
       
   123 
       
   124