The package is ready for auto-configuration. It needs to be bootstrapped in ordrt to be available for compilation on any Posix system - at least configuration should work (sources might not be ported, yet).
Cross-compiling stubs are also ready. It relies on the particular auto-configured "./boot" sub-tree always providing configuration for the local C compiler. The main tree runs under the tool chain for whatever target system is configured, e.g. --host=x86_64-w64-mingw32 (not supported yet, though).
On Debian install
sudo -s apt-get install autoconf automake
and then run on the command line
./Build debug
make test
Clean up again with
./Build clobber
Apart form the C compiler tool chain you need additional tools in order to generate a regular distributable package that can be auto configured. Under Debian, these tools are installed via
sudo -s apt-get install autoconf automake libtool
which also pulls in autotools-dev automatically. In order to generate the distributable package do
./Build config
on the command line.
On the command line run standard code configuration and generation commands like
./configure
make
make test
make clean
...
You may try
make help
which prints information about some local target extensions. There are some short cuts available using the ./Build script. Run
./Build
without any options to see a help page (not all options are fully implemented.) Do not use the "clobber" option unless you need to reset the package into bootstrap state.
On the command line run
/Build clobber
Sources/
-- C source filesSources/Utils/
-- Utilities that are specific for the C implementationSources/Tests/
-- Unit testsSources/Build/
-- Object files generated after compilationSources/Extraction/
,General/
,Matching/
,Templates/
, ... -- C implementation of the library. The directory structure and naming are analogous to the original C# code.TestData/
input data and expected output for unit tests
Compilation can be done using GCC and GNU make.
$ cd Sources
$ make -f no-makefile libafis
Object files are created in the Build/
directory. The library sources are compiled only but not linked.
To get make
and gcc
installed run: xcode-select --install
in a terminal window. Then the linux instructions apply.
You will need to install, Autoconf
, Automake
& Libtool
. You can use this script.
- Works out of the box using Cygwin.
The easiest way to get up and running is with Sublime
- You can then use Package Control
- Which will help you get C Improved
$ cd Sources
$ make utest
The result is an executable called all_tests
in the Build/
directory.
$ Sources/Build/all_tests ../TestData
You can check for memory leaks using valgrind
.
Once you've built using make
, run the tests/program in your console, but prefix the command with the valgrind
options like this:
$ valgrind --leak-check=full --log-file="valgrind.log" -v ./Build/all_tests ../TestData/
This will make valgrind
run a memory check on the tests and save its result to the file valgrind.log
. This will include the amount of alloc
's and free
's, along with information on any memory which might have leaked. It also includes the total amount of heap memory allocated while the program was running.
If you have clang
installed, you can use scan-build
to perform static analysis on the code. It generates a html report which you can view for any problems it might have found with the code.
$ scan-build -V make libafis
This will generate a html report for you after building libAFIS and open a web browser for you with the generated report open.
There is a 'MinutiaeTestApp' inside TestData to test the exported templates with SourceAFIS.
Currently our focus is the branch image-to-template-test
, pull request: #32.