-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename generated CONFIG_SITE to TOOLCHAIN
- Loading branch information
1 parent
de5896e
commit dbd9dbc
Showing
18 changed files
with
156 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
TOP=.. | ||
|
||
_PVXS_BOOTSTRAP = YES | ||
|
||
include $(TOP)/configure/CONFIG | ||
|
||
CMAKE ?= cmake | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,35 @@ | ||
TOP=.. | ||
|
||
# step 1. Use -I... to test event-config.h | ||
# produce configure/O.$(T_A)/TOOLCHAIN | ||
# step 2 in setup/Makefile | ||
_PVXS_BOOTSTRAP = YES | ||
|
||
include $(TOP)/configure/CONFIG | ||
|
||
# use custom libevent2 install prefix by: | ||
# setting LIBEVENT only for single arch build | ||
# setting LIBEVENT_$(T_A) for each arch | ||
# leave unset to use implicit system search path | ||
# NOTE: only needed if not present in default search paths | ||
LIBEVENT ?= $(LIBEVENT_$(T_A)) | ||
LIBEVENT_$(T_A) ?= $(wildcard $(abspath $(TOP)/bundle/usr/$(T_A))) | ||
|
||
INCLUDES += $(if $(LIBEVENT),-I$(LIBEVENT)/include) | ||
|
||
TARGETS = $(CONFIG_TARGETS) | ||
CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS))) | ||
|
||
CFG += CONFIG_PVXS_VERSION | ||
CFG += CONFIG_PVXS_MODULE | ||
CFG += RULES_PVXS_MODULE | ||
|
||
include $(TOP)/configure/RULES | ||
|
||
ifdef T_A | ||
install: $(TOP)/configure/CONFIG_SITE.Common.$(T_A) | ||
|
||
$(TOP)/configure/CONFIG_SITE.Common.$(T_A): toolchain.c | ||
$(PREPROCESS.cpp) | ||
install: TOOLCHAIN | ||
|
||
CLEANS += ../CONFIG_SITE.Common.$(T_A) | ||
TOOLCHAIN: toolchain.c | ||
$(CPP) $(CPPFLAGS) $(INCLUDES) ../toolchain.c > $@.tmp | ||
$(CPP) $(CPPFLAGS) $(INCLUDES) ../probe-openssl.c > probe-openssl.out && echo "EVENT2_HAS_OPENSSL = YES" >> $@.tmp || echo "No OpenSSL" | ||
$(MV) $@.tmp $@ | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
#include <openssl/opensslv.h> | ||
|
||
#ifndef OPENSSL_VERSION_NUMBER | ||
# error Some antique OpenSSL version? | ||
#endif | ||
#if OPENSSL_VERSION_NUMBER < 0x30000000 | ||
# error Minimum OpenSSL 3.0 | ||
#endif | ||
|
||
#include <event2/event-config.h> | ||
|
||
#ifndef EVENT__HAVE_OPENSSL | ||
# error libevent not built with OpenSSL support | ||
#endif | ||
|
||
#include <event2/bufferevent_ssl.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# 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 | ||
|
||
ifneq (YES,$(_PVXS_BOOTSTRAP)) | ||
include $(_PVXS)/TOOLCHAIN_PVXS.$(T_A) | ||
endif | ||
|
||
# from generated cfg/TOOLCHAIN_PVXS.$(T_A) | ||
LIBEVENT_PREFIX = $(LIBEVENT_PREFIX_$(T_A)) | ||
LIBEVENT_BUNDLE_LIBS = $(LIBEVENT_BUNDLE_LIBS_$(T_A)) | ||
LIBEVENT_SYS_LIBS = $(LIBEVENT_SYS_LIBS_$(T_A)) | ||
|
||
# apply to include search paths | ||
INCLUDES += $(if $(LIBEVENT_PREFIX),-I$(LIBEVENT_PREFIX)/include) | ||
|
||
LIBEVENT_BUNDLE_LDFLAGS__RPATH=-Wl,-rpath,$(LIBEVENT_PREFIX)/lib | ||
LIBEVENT_BUNDLE_LDFLAGS_Darwin_NO = $(if $(LIBEVENT_PREFIX),$(LIBEVENT_BUNDLE_LDFLAGS__RPATH)) | ||
LIBEVENT_BUNDLE_LDFLAGS += $(LIBEVENT_BUNDLE_LDFLAGS_$(OS_CLASS)_$(STATIC_BUILD)) | ||
|
||
event_core_DIR = $(LIBEVENT_PREFIX)/lib | ||
event_openssl_DIR = $(LIBEVENT_PREFIX)/lib | ||
event_pthreads_DIR = $(LIBEVENT_PREFIX)/lib | ||
|
||
endif # T_A | ||
|
||
endif # _PVXS_CONF_INCLUDED | ||
|
||
# logic continues in RULES_PVXS_MODULE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
TOP=.. | ||
|
||
# step 1 in configure/Makefile | ||
# step 2. generate cfg/TOOLCHAIN_PVXS.$(T_A) | ||
# install cfg/* | ||
# remaining TOP directories will include generated files | ||
_PVXS_BOOTSTRAP = YES | ||
|
||
include $(TOP)/configure/CONFIG | ||
|
||
LIBEVENT ?= $(LIBEVENT_$(T_A)) | ||
LIBEVENT_$(T_A) ?= $(wildcard $(abspath $(TOP)/bundle/usr/$(T_A))) | ||
|
||
_LIBEVENT_BUNDLE_LIBS_YES = event_openssl | ||
_LIBEVENT_SYS_LIBS_YES += ssl crypto | ||
|
||
_LIBEVENT_BUNDLE_LIBS += $(_LIBEVENT_BUNDLE_LIBS_$(EVENT2_HAS_OPENSSL)) | ||
_LIBEVENT_BUNDLE_LIBS += event_core | ||
|
||
_LIBEVENT_SYS_LIBS += $(_LIBEVENT_SYS_LIBS_$(EVENT2_HAS_OPENSSL)) | ||
|
||
ifeq (WIN32,$(OS_CLASS)) | ||
_LIBEVENT_SYS_LIBS += bcrypt iphlpapi netapi32 ws2_32 | ||
else | ||
_LIBEVENT_BUNDLE_LIBS += event_pthreads | ||
endif | ||
|
||
# at this point we have included the generated O.$(T_A)/TOOLCHAIN | ||
# and use this to generated CONFIG_PVXS_MODULE | ||
|
||
CFG += CONFIG_PVXS_MODULE | ||
CFG += RULES_PVXS_MODULE | ||
|
||
ifdef T_A | ||
CFG += TOOLCHAIN_PVXS.$(T_A) | ||
endif | ||
|
||
include $(TOP)/configure/RULES | ||
|
||
ifdef T_A | ||
|
||
EXPAND_ARGS = -a $(T_A) -t "$(INSTALL_LOCATION)" | ||
EXPAND_ARGS += "-DLIBEVENT=$(LIBEVENT)" | ||
EXPAND_ARGS += "-DLIBEVENT_BUNDLE_LIBS=$(_LIBEVENT_BUNDLE_LIBS)" | ||
EXPAND_ARGS += "-DLIBEVENT_SYS_LIBS=$(_LIBEVENT_SYS_LIBS)" | ||
|
||
TOOLCHAIN_PVXS.$(T_A): ../TOOLCHAIN_PVXS.target@ | ||
$(EXPAND_TOOL) $(EXPAND_ARGS) $< $@ | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
LIBEVENT_PREFIX_@ARCH@ = @LIBEVENT@ | ||
LIBEVENT_BUNDLE_LIBS_@ARCH@ = @LIBEVENT_BUNDLE_LIBS@ | ||
LIBEVENT_SYS_LIBS_@ARCH@ = @LIBEVENT_SYS_LIBS@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters