A fast general purpose sorting software

Compiling - How to compile and install opensort and libopensort

Opensort does not have a configure script yet. Makefile understands the following environment variables:

CC defines the compiler. Default is cc.
LD defines the linker. Default is CC.
AR defines the archiver. Default is ar.
ARFLAGS passes options to the archiver. Default is -crs.
CFLAGS passes options to the compiler.
CPPFLAGS passes option to the preprocessor.
LDFLAGS passes linking options to the linker.
LIBS passes the libraries, to the linker, the executables will be linked against.
PREFIX defines the install prefix of the header files and the CLI utility. Default is /usr.
LIBPREFIX defines the install path (eg /usr/lib64) of the static library and the shared library. Default is PREFIX/lib

Adding -DSPLICE in CPPFLAGS, the CLI option -directio and OS_UNBUFFERED API flag will become noops.
Opensort will use splice(2) system call of Linux, instead of O_DIRECT. Under non-Linux systems -DSPLICE will
be ignored. You may add -static in your CFLAGS if you need a static build of  Opensort.

'make install' command will install opensort, libopensort and its header files to a directory defined by PREFIX
environment variable.

$ CC=gcc CFLAGS="-O2 -mtune=native" \
PREFIX=/usr/local LIBPREFIX=/usr/local/lib64 make install

The above command builds and installs opensort to /usr/local/bin, and libopensort.a
to /usr/local/lib64 creating the symlink to and opensort.h, opensort_defs.h,
opensort_errors.h to /usr/local/include.

Supported platforms are Linux and Solaris 10.
Supported compiler is GCC version 3.3.1 or later.

NOTICE: Only GNU Make 3.79 or later can understand the Makefiles of Opensort project.

Get opensort at Fast, secure and Free Open Source software downloads