# Xymon compile-time settings for SunOS / Solaris

OSDEF = -DSunOS

# Solaris need this
NETLIBS = -lresolv -lsocket -lnsl

# Compile flags for normal build
CC = gcc
GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
ifeq ($(GCCVER),4)
   CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF)
else
   CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF)
endif

# This guesswork doesnt work on a lot of systems.
# Better have a run-time issue that can easily be fixed with "crle"
# or by setting LD_LIBRARY_PATH, than a build-time problem.
#LDTYPE := $(shell ld -V 2>&1|head -1|cut -d' ' -f1)
#ifeq ($(LDTYPE),GNU)
#   RPATH=-Wl,--rpath,
#else
#   RPATH=-Wl,-R
#endif

# Compile flags for debugging
# CFLAGS = -g -DDEBUG -Wall -D_REENTRANT $(LFSDEF) $(OSDEF)

# Mail program: This must support "CMD -s SUBJECT ADDRESS" to send out a mail with a subject
# Typically, this will be "mail" or "mailx"
MAILPROGRAM="mailx"

