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