OSSEC is using (starting with 2.9) a single Makefile to build the binaries for each installation type. The Makefile uses features of GNU make, and it is a requirement of the build process. The make system attempts to perform all necessary tasks in a single run. The type of installation must be specified when executed because there is no state stored between executions.
All changes to the makefile that take external input should be reported via the settings build step. This allows troubleshooting and review of the environment, and the hope is that some new features will become discoverable for other developers.
% make DATABASE=mysql TARGET=server USE_ZEROMQ=1 USE_GEOIP=1 settings
General settings:
TARGET: server
V:
DEBUG:
DEBUGAD
PREFIX: /var/ossec
MAXAGENTS: 2048
DATABASE: mysql
User settings:
OSSEC_GROUP: ossec
OSSEC_USER: ossec
OSSEC_USER_MAIL: ossecm
OSSEC_USER_REM: ossecr
Lua settings:
LUA_PLAT: macosx
USE settings:
USE_ZEROMQ: 1
USE_GEOIP: 1
USE_PRELUDE: 0
Mysql settings:
includes: -I/usr/include/mysql/
libs: -L/usr/lib/mysql -lmysqlclient
Pgsql settings:
includes:
libs:
Defines:
-DMAX_AGENTS=2048 -DOSSECHIDS -DDarwin -DHIGHFIRST -DZEROMQ_OUTPUT -DGEOIP -DUMYSQL
Compiler:
CFLAGS -DMAX_AGENTS=2048 -DOSSECHIDS -DDarwin -DHIGHFIRST -DZEROMQ_OUTPUT -DGEOIP -DUMYSQL -Wall -Wextra -O2 -I./ -I./headers/
LDFLAGS -lzmq -lczmq -lGeoIP -L/usr/lib/mysql -lmysqlclient
CC cc
MAKE /Applications/Xcode.app/Contents/Developer/usr/bin/make
Defines the type of installation to build.
Allowed: server/agent/hybrid/local
V can toggle verbose building, and will instruct make to display the full output without color.
Applies to Target: all
Default: 0
Allowed: 0/1
PREFIX is the absolute path OSSEC will be installed to.
Warning
Please note that paths with SPACES and tabs in them are not supported and may cause compilation or runtime issues.
Applies to Target: all
Default: /var/ossec
Allowed: All valid paths
New in version 3.0.
New in version 3.0.
OSSEC is compiled with a maximum number of agents on the server/hybrid TARGETS. MAXAGENTS allows users to select values expected for their environment.
Applies to Target: server/hybrid
Default: 2048
Allowed: [2 - 65000]
DEBUG enables debugging symbols in all compiled programs.
Applies to Target: all
Default: 0
Allowed: 0/1
DEBUGAD enables extra debugging logging in ossec-analysisd.
Applies to Target: server/hybrid
Default: 0
Allowed: 0/1
Default: ossec
Default: ossec
Default: ossecm
Default: ossecr
LUA_PLAT determines the platform that LUA will be compiled for.
This is autogenerated for each install.
Applies to Target: all
USE_GEOIP enables support for MAX Mind GeoIP looks on output.
Applies to Target: server/hybrid/local
Default: 0
Allowed: 0/1
USE_PRELUDE enables support for Prelude-IDS alert output.
Applies to Target: server/hybrid/local
Default: 0
Allowed: 0/1
USE_ZEROMQ enables support for zeromq output.
Applies to Target: server/hybrid/local
Default: 0
Allowed: 0/1
USE_SQLITE enables support for sqlite3 databases.
Spplies to Target: server/hybrid/local
Default: 0
Allowed: 0/1
The DATABASE variable selects the database enviromnet to enable.
Applies to Target: server/hybrid/local
Allowed: mysql/pgsql