Files
pvxs/configure/CONFIG_PVXS_MODULE
T
2020-04-09 20:40:09 -07:00

48 lines
1.3 KiB
Plaintext

# auto-compute location of this file.
# avoid need to standardize configure/RELEASE name
_PVXS := $(dir $(lastword $(MAKEFILE_LIST)))
# we're appending so must be idempotent
ifeq (,$(_PVXS_CONF_INCLUDED))
_PVXS_CONF_INCLUDED := YES
ifdef T_A
# use custom libevent2 install prefix by:
# setting LIBEVENT only for single arch build
# setting LIBEVENT_$(T_A) for each arch
# NOTE: only needed if not present in default search paths
LIBEVENT ?= $(LIBEVENT_$(T_A))
# default to bundled location if it exists
LIBEVENT_$(T_A) ?= $(wildcard $(abspath $(_PVXS)/../bundle/usr/$(T_A)))
# apply to include search paths
INCLUDES += $(if $(LIBEVENT),-I$(LIBEVENT)/include)
ifeq (msvc,$(CMPLR_CLASS))
# Select lib file directly
LIBEVENT_SYS_LIBS = $(LIBEVENT)/lib/event_core
else
# apply to library search paths, and -rpath
_PVXS_DEPLIB_DIRS += $(if $(LIBEVENT),$(LIBEVENT)/lib)
PROD_DEPLIB_DIRS += $(_PVXS_DEPLIB_DIRS)
SHRLIB_DEPLIB_DIRS += $(_PVXS_DEPLIB_DIRS)
LIBEVENT_SYS_LIBS = event_core
endif
# automatically add necessary libraries
LIBEVENT_SYS_LIBS_POSIX_YES = event_pthreads
LIBEVENT_SYS_LIBS_WIN32 = iphlpapi netapi32 ws2_32
LIBEVENT_SYS_LIBS += $(LIBEVENT_SYS_LIBS_POSIX_$(POSIX))
LIBEVENT_SYS_LIBS += $(LIBEVENT_SYS_LIBS_$(OS_CLASS))
endif # T_A
endif # _PVXS_CONF_INCLUDED