|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
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
'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,
libopensort.so.0.4.0 and libopensort.a to /usr/local/lib64 creating the
symlink libopensort.so to libopensort.so.0.4.0 and opensort.h,
opensort_errors.h to /usr/local/include.
Supported platforms are Linux and Solaris 10.
Supported compilers are GCC version 3.3.1 or later
and Sun Studio 12 SunC compiler.
NOTICE: Only GNU Make 3.79 or later can understand the Makefiles of