reference/ocr-simple/Makefile-orig
author viric@llimona
Thu, 18 May 2006 23:12:51 +0200
changeset 0 6b8091ca909a
permissions -rw-r--r--
Init from working directory of svn repository.

#Makefile for OCRchie 

CC	= g++
#CC	= purify -cache-dir=/tmp/ocrchie/cache -collector=/usr/sww/lib/gcc-lib/hppa1.1-hp-hpux9.03/2.6.3/ld g++
#CC	= quantify -cache-dir=/tmp/ocrchie/cache -collector=/usr/sww/lib/gcc-lib/hppa1.1-hp-hpux9.03/2.6.3/ld g++

DEBUG	= -g
OPTIMIZE = -O
CCFLAGS = $(DEBUG)
EXECUTABLE = ocrchie

# TCL root directory
# on .cs machines 
TCLBASE	= /usr/sww/tcl-7.4b4
# on .eecs machines
#TCLBASE = /usr/sww/tcl-7.4

# X11 root directory
X11BASE = /usr/sww/X11

# math library directory
MATHLIB = /lib/pa1.1

# Place where object files need to be stored
ODIR = /tmp/ocrchie/

# That's it.  Now just do a gmake.

INCLUDE	= -I${TCLBASE}/include -I${X11BASE}/include
LIBDIRS	= -L${TCLBASE}/lib -L${X11BASE}/lib -L${MATHLIB}
LIBS	= ${LIBDIRS} -ltk -ltcl -lX11 -lM -ltiff
HEADERS		= system.h list.h Component.h  \
		  BitMap.h RLEPair.h RLEMap.h LineMarker.h Page.h Point.h \
		  convertMap.h Component.h Word.h tcl_interface.h


OFILES = 	    $(ODIR)main.o $(ODIR)project.o $(ODIR)histogram.o \
		    $(ODIR)get_skew.o $(ODIR)tcl_interface.o \
		    $(ODIR)RLEMap.o $(ODIR)RLEPair.o $(ODIR)list.o \
		    $(ODIR)convertMap.o $(ODIR)Component.o $(ODIR)Page.o\
		    $(ODIR)BitMap.o $(ODIR)system.o $(ODIR)testocr.o \
		    $(ODIR)Word.o $(ODIR)learn.o $(ODIR)status_message.o \
		    $(ODIR)link.o

#The Executable project
ocrchie:	    $(OFILES)
		    $(CC) -g -o $(EXECUTABLE) ${INCLUDE} $(OFILES) $(LIBS)


# The .o files compiled in ODIR because of space considerations

$(ODIR)link.o:	 link.cc link.h
		 $(CC) $(CCFLAGS) ${INCLUDE} -o $(ODIR)link.o -c link.cc
$(ODIR)status_message.o:	 status_message.cc status_message.h
		 $(CC) $(CCFLAGS) -o $(ODIR)status_message.o -c status_message.cc

$(ODIR)system.o:	system.cc $(HEADERS)
		$(CC) $(CCFLAGS) -o $(ODIR)system.o -c system.cc

$(ODIR)Page.o:		$(HEADERS) Page.cc RLEMap.h RLEPair.h BitMap.h 
		$(CC) $(CCFLAGS) -o $(ODIR)Page.o -c Page.cc

$(ODIR)RLEMap.o: 	$(HEADERS) system.cc\
		RLEMap.cc  RLEPair.cc 
		$(CC) $(CCFLAGS) -o $(ODIR)RLEMap.o -c RLEMap.cc

$(ODIR)BitMap.o:	$(HEADERS) system.cc BitMap.cc 
		$(CC) $(CCFLAGS) -o $(ODIR)BitMap.o -c BitMap.cc

$(ODIR)RLEPair.o:	$(HEADERS)  RLEPair.cc
		$(CC) $(CCFLAGS) -o $(ODIR)RLEPair.o -c RLEPair.cc
	
$(ODIR)Component.o:	$(HEADERS) Component.cc
		$(CC) $(CCFLAGS) -o $(ODIR)Component.o -c Component.cc

$(ODIR)list.o:		list.h list.cc
		$(CC) $(CCFLAGS) -o $(ODIR)list.o -c list.cc

$(ODIR)Word.o:		Word.h Component.h list.h list.cc
		$(CC) $(CCFLAGS) -o $(ODIR)Word.o -c Word.cc

$(ODIR)convertMap.o:    $(HEADERS) convertMap.cc
		$(CC) $(CCFLAGS) -o $(ODIR)convertMap.o -c convertMap.cc

$(ODIR)learn.o:	system.h learn.h learn.cc
		$(CC) $(CCFLAGS) -o $(ODIR)learn.o -c learn.cc

$(ODIR)main.o:	main.cc $(HEADERS)
	$(CC) $(CCFLAGS) -o $(ODIR)main.o -c ${INCLUDE} main.cc

$(ODIR)testocr.o:	testocr.cc $(HEADERS)
	$(CC) $(CCFLAGS)  -o $(ODIR)testocr.o -c testocr.cc

$(ODIR)project.o:	project.cc project.h bitmap.h histogram.h
	$(CC) $(CCFLAGS) -o $(ODIR)project.o -c project.cc


$(ODIR)histogram.o:	histogram.cc histogram.h
	$(CC) $(CCFLAGS) -o $(ODIR)histogram.o -c histogram.cc

$(ODIR)get_skew.o:	get_skew.cc get_skew.h project.h histogram.h
	$(CC) $(CCFLAGS) -o $(ODIR)get_skew.o -c get_skew.cc

$(ODIR)tcl_interface.o:	tcl_interface.cc tcl_interface.h
	$(CC) $(CCFLAGS) -o $(ODIR)tcl_interface.o -c ${INCLUDE} tcl_interface.cc

#$(ODIR)deskew.o:	deskew.cc deskew.h	
#	$(CC) $(CCFLAGS) -c deskew.cc

#$(ODIR)rotate.o:	rotate.cc
#	$(CC) $(CCFLAGS) -c rotate.cc



clean:		
		rm -f core *.o *~
#