#
# Linux Protean Makefile definitions
#
# System specific additional libraries, include paths, etc
#
SYSTEM_INCLUDES = -I../include/unix
SYSTEM_LDFLAGS =
SYSTEM_LIBS = -ldl -lrt
# 6) System specific capabilities
# Must choose appropriate for the following:
#
# A) -DHAVE_CUSERID (preferred) or -DHAVE_GETLOGIN for cuserid() or getlogin()
# functions to obtain user's login name (We may change this to getpwd()
# if that is better across different platforms and login environments)
#
# B) -DHAVE_LOCKF (preferred) or -DHAVE_FLOCK for lockf() or flock() file locking
# functions to attempt exclusive lock on writing to files
#
# C) Specify -DHAVE_DIRFD if your system provides the "dirfd()" function
# (Most don't have it defined ... but some do)
#
# D) Optionally specify -DHAVE_ASSERT if your system has a built-in ASSERT()
# routine.
#
# E) The MDP code's use of offset pointers requires special treatment
# for some different compilers. Set -DUSE_INHERITANCE for some
# to keep some compilers (gcc 2.7.2) happy.
#
# F) Some systems (SOLARIS/SUNOS) have a few gotchas which require
# some #ifdefs to avoid compiler warnings ... so you might need
# to specify -DSOLARIS or -DSUNOS depending on your OS.
#
# G) Uncomment this if you have the NRL IPv6+IPsec software
#DNETSEC = -DNETSEC -I/usr/inet6/include
#
# (We export these for other Makefiles as needed)
#
SYSTEM_HAVES = -DLINUX -DHAVE_GETLOGIN -D_FILE_OFFSET_BITS=64 -DHAVE_LOCKF -DHAVE_OLD_SIGNALHANDLER \
-DHAVE_DIRFD -DHAVE_ASSERT -DNO_SCM_RIGHTS -DHAVE_SCHED -DUNIX -DUSE_SELECT -DUSE_TIMERFD \
-DHAVE_PSELECT -DUSE_EVENTFD -DHAVE_IPV6
# (TBD) Move ProtoRouteMgr to ProtokitEx ??
SYSTEM_SRC = ../src/linux/linuxRouteMgr.cpp ../src/linux/linuxNet.cpp \
../src/unix/unixNet.cpp ../src/unix/zebraRouteMgr.cpp
SYSTEM_SRC_EX = ../src/linux/linuxCap.cpp ../src/linux/linuxDetour.cpp \
../src/unix/unixVif.cpp ../src/unix/unixSerial.cpp
SYSTEM_LIB_EX = -lnetfilter_queue
SYSTEM = linux
CC = g++
SYSTEM_CFLAGS = -Wall -Wcast-align -pedantic -fPIC -Wno-variadic-macros
SYSTEM_SOFLAGS = -shared
SYSTEM_SOEXT = so
RANLIB = ranlib
AR = ar
include Makefile.common