# Xymon compile-time settings for a HP-UX system

OSDEF = -DHPUX

# NETLIBS: You may need to add -lresolv or similar to pick up network libraries
NETLIBS = -lnsl

# Compile flags for normal build
# NOTE: HP-UX built-in compiler is horribly broken and will not compile Xymon.
# So you should use the GNU compiler, gcc.
CC = gcc
# NOTE: Some HP-UX 11i systems have a severely broken set of include files. This
# will typically show up when compiling the "xymonnet/xymonnet.c" where it bombs with
#   xymonnet.c: In function 'send_rpcinfo_results':
#   xymonnet.c:1794: warning: assignment makes pointer from integer without a cast
#   xymonnet.c:1801: error: dereferencing pointer to incomplete type
#   xymonnet.c:1813: error: dereferencing pointer to incomplete type
#   xymonnet.c:1818: error: dereferencing pointer to incomplete type
# If that happens, try adding -DBROKEN_HPUX_NETDB at the end of the CFLAGS line below. 
GCCVER := $(shell gcc -dumpversion|cut -d. -f1)
ifeq ($(GCCVER),4)
   CFLAGS = -Wno-unused -Wno-pointer-sign -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
else
   CFLAGS = -g -O -D_REENTRANT  $(LFSDEF) $(OSDEF)
endif


# Compile flags for debugging
# CFLAGS = -g -DDEBUG -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"

