Imported aws-crt-ffi as submodule (#6)

* Removed direct submodules

* Added aws-crt-ffi as submodule

*  updated makefile to build aws-crt-ffi
This commit is contained in:
Justin Boswell
2021-01-22 09:35:39 -08:00
committed by GitHub
parent f090511213
commit 0b1b368a8f
10 changed files with 13 additions and 80 deletions
+3 -21
View File
@@ -1,21 +1,3 @@
[submodule "aws-c-common"] [submodule "crt/aws-crt-ffi"]
path = crt/aws-c-common path = crt/aws-crt-ffi
url = https://github.com/awslabs/aws-c-common.git url = https://github.com/awslabs/aws-crt-ffi.git
[submodule "aws-c-io"]
path = crt/aws-c-io
url = https://github.com/awslabs/aws-c-io.git
[submodule "aws-c-http"]
path = crt/aws-c-http
url = https://github.com/awslabs/aws-c-http.git
[submodule "aws-c-compression"]
path = crt/aws-c-compression
url = https://github.com/awslabs/aws-c-compression.git
[submodule "aws-c-auth"]
path = crt/aws-c-auth
url = https://github.com/awslabs/aws-c-auth.git
[submodule "aws-c-cal"]
path = crt/aws-c-cal
url = https://github.com/awslabs/aws-c-cal.git
[submodule "s2n"]
path = crt/s2n
url = https://github.com/awslabs/s2n.git
+9 -52
View File
@@ -1,16 +1,7 @@
INSTALL_DIR=$(shell pwd)/build/install INSTALL_DIR=$(shell pwd)/build/install
crt_libs=$(INSTALL_DIR)/lib/libaws-c-common.a \ # download and build libcrypto.a for the CRT with -fPIC
$(INSTALL_DIR)/lib/libaws-c-cal.a \
$(INSTALL_DIR)/lib/libaws-c-io.a \
$(INSTALL_DIR)/lib/libaws-c-compression.a \
$(INSTALL_DIR)/lib/libaws-c-http.a \
$(INSTALL_DIR)/lib/libaws-c-auth.a \
$(INSTALL_DIR)/lib/libs2n.a
crt-static: $(crt_libs) $(INSTALL_DIR)/lib/libcrypto.a
build/deps/openssl: build/deps/openssl:
@echo Fetching libcrypto source @echo Fetching libcrypto source
git clone --depth=1 --single-branch --branch OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git build/deps/openssl git clone --depth=1 --single-branch --branch OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git build/deps/openssl
@@ -31,47 +22,13 @@ CMAKE_BUILD = cmake --build
CMAKE_BUILD_TYPE ?= RelWithDebInfo CMAKE_BUILD_TYPE ?= RelWithDebInfo
CMAKE_TARGET = --config $CMAKE_BUILD_TYPE --target install CMAKE_TARGET = --config $CMAKE_BUILD_TYPE --target install
build/aws-c-common/CMakeCache.txt: $(INSTALL_DIR)/lib/libcrypto.a # cmake configure depends on libcrypto above
$(CMAKE_CONFIGURE) -Hcrt/aws-c-common -Bbuild/aws-c-common build/aws-crt-ffi/CMakeCache.txt: $(INSTALL_DIR)/lib/libcrypto.a
$(CMAKE_CONFIGURE) -Hcrt/aws-crt-ffi -Bbuild/aws-crt-ffi
$(INSTALL_DIR)/lib/libaws-c-common.a: build/aws-c-common/CMakeCache.txt # build the FFI library
$(CMAKE_BUILD) build/aws-c-common $(CMAKE_TARGET) $(INSTALL_DIR)/lib/libaws-crt-ffi.so: build/aws-crt-ffi/CMakeCache.txt
$(CMAKE_BUILD) build/aws-crt-ffi $(CMAKE_TARGET)
build/s2n/CMakeCache.txt: $(INSTALL_DIR)/lib/libcrypto.a # Force the crt object target to depend on the FFI library
$(CMAKE_CONFIGURE) -Hcrt/s2n -Bbuild/s2n src/crt.lo: $(INSTALL_DIR)/lib/libaws-crt-ffi.so
$(INSTALL_DIR)/lib/libs2n.a: build/s2n/CMakeCache.txt
$(CMAKE_BUILD) build/s2n $(CMAKE_TARGET)
build/aws-c-io/CMakeCache.txt: $(INSTALL_DIR)/lib/libaws-c-common.a $(INSTALL_DIR)/lib/libcrypto.a $(INSTALL_DIR)/lib/libs2n.a
$(CMAKE_CONFIGURE) -Hcrt/aws-c-io -Bbuild/aws-c-io
$(INSTALL_DIR)/lib/libaws-c-io.a: build/aws-c-io/CMakeCache.txt
$(CMAKE_BUILD) build/aws-c-io $(CMAKE_TARGET)
build/aws-c-cal/CMakeCache.txt: $(INSTALL_DIR)/lib/libaws-c-common.a
$(CMAKE_CONFIGURE) -Hcrt/aws-c-cal -Bbuild/aws-c-cal
$(INSTALL_DIR)/lib/libaws-c-cal.a: build/aws-c-cal/CMakeCache.txt
$(CMAKE_BUILD) build/aws-c-cal $(CMAKE_TARGET)
build/aws-c-compression/CMakeCache.txt: $(INSTALL_DIR)/lib/libaws-c-common.a
$(CMAKE_CONFIGURE) -Hcrt/aws-c-compression -Bbuild/aws-c-compression
$(INSTALL_DIR)/lib/libaws-c-compression.a: build/aws-c-compression/CMakeCache.txt
$(CMAKE_BUILD) build/aws-c-compression $(CMAKE_TARGET)
build/aws-c-http/CMakeCache.txt: $(INSTALL_DIR)/lib/libaws-c-compression.a $(INSTALL_DIR)/lib/libaws-c-io.a
$(CMAKE_CONFIGURE) -Hcrt/aws-c-http -Bbuild/aws-c-http
$(INSTALL_DIR)/lib/libaws-c-http.a: build/aws-c-http/CMakeCache.txt
$(CMAKE_BUILD) build/aws-c-http $(CMAKE_TARGET)
build/aws-c-auth/CMakeCache.txt: $(INSTALL_DIR)/lib/libaws-c-http.a
$(CMAKE_CONFIGURE) -Hcrt/aws-c-auth -Bbuild/aws-c-auth
$(INSTALL_DIR)/lib/libaws-c-auth.a: build/aws-c-auth/CMakeCache.txt
$(CMAKE_BUILD) build/aws-c-auth $(CMAKE_TARGET)
# Force the crt object target to depend on all of the libraries above
src/crt.lo: crt-static
Submodule crt/aws-c-auth deleted from f58e2028d1
Submodule crt/aws-c-cal deleted from 61d66740b1
Submodule crt/aws-c-http deleted from 3836661844
Submodule crt/aws-c-io deleted from 3baeef9906
+1
Submodule crt/aws-crt-ffi added at f865650224
Submodule crt/s2n deleted from 3c7ae5f57a