GOCR MDK

Module Development Kit




Introduction

GOCR MDK is a simple set of files that help you to create modules to work with GOCR. You don't have to worry with Makefiles, configures, or anything like that. All the work is either previously done or is done by a script that you run. No headaches.
Note: this manual assumes that you are familiar with basic development, such as the basic use of a compiler, etc.

Using the MDK

First, all your code should go into the module/ subdirectory. Then you have to edit the module-setup file:
#!/bin/bash
#
# Setup script for GOCR's Module Development Kit
# v 0.1
#
# By Bruno Barberi Gnecco 
#

MODULE_NAME="name"
MODULE_VERSION="0.0.0"
AUTHOR="yourname "

# libraries that your module should be linked with. Example:
# EXTRA_LIBS=-lm
EXTRA_LIBS=
INCLUDE_DIRS=
LIB_DIRS=
This is the beginning of the file. The rest of it should not be edited unless you know what you're doing. What you have to do now is to fill the fields. The first three are mandatory.

MODULE_NAME
This is the name of your module, as it will be used. The final file name will be: lib[MODULE_NAME].la, so if your module name is foo, it will be libfoo.la.
MODULE_VERSION
This is the version. The numbering follows usual conventions.
AUTHOR
Your name and email.

There also the optional fields:

EXTRA_LIBS
All the libraries that your module has to be linked to, as you'd pass to gcc: -lm -lX11 etc.
INCLUDE_DIRS
Directories that are needed to search for headers, also as you'd pass to gcc: -I/usr/local/include
LIB_DIRS
Directories that are needed to search for libraries, also as you'd pass to gcc: -I/usr/local/lib

After editing, run module-setup. It will automatically create all the files used by autoconf and automake, and run them. When it's done, you can run configure and make as you are used to.
If you are familiar with autoconf and automake, you can use module-setup to build the basic files, and extend as you need.


Contact the author: brunobg@geocities.com.