diff options
author | Andrey Shamanin <andrei.shamanin@orioninc.com> | 2020-07-07 14:09:45 +0300 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-07-20 14:30:32 +0000 |
commit | 0326ee5c14813694df3c026217abaa7c78539a0a (patch) | |
tree | 5b23db7922f98050489c952044cd3a4cef1fb8f7 /meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws | |
parent | e5310229bf79f12d34e3d3595f9880261d02648c (diff) |
Add AWS embedded C SDK
AWS embedded C SDK allows to create applications for communication with AWS cloud.
Commit includes a new recipe and patches for AWS SDK compilation.
Fix review comment (use mbedTLS from external recipes).
Bug-AGL: SPEC-3479
Signed-off-by: Andrey Shamanin <andrei.shamanin@orioninc.com>
Change-Id: I0d4923cd8541e7be89580b32ed6c68fcb10c1ce7
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/24950
Tested-by: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-build: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
ci-image-boot-test: Jenkins Job builder account <agl-jobbuilder@automotivelinux.org>
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws')
-rw-r--r-- | meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws b/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws new file mode 100644 index 000000000..d4f18c0f9 --- /dev/null +++ b/meta-agl-bsp/meta-iot-cloud/recipes-aws/aws-iot-device-sdk-embedded-c/files/Makefile.aws @@ -0,0 +1,62 @@ +########################################################################### +# Copyright 2020 MERA +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +########################################################################### + +# Generated library name +NAME := awsiotsdk + +SRC = . +AWS_SDK_DIR = $(SRC)/.. +PLATFORM_DIR = $(AWS_SDK_DIR)/platform/linux/mbedtls +PLATFORM_COMMON_DIR = $(AWS_SDK_DIR)/platform/linux/common +AWS_INSTALL_HEADERS_DIR = /usr/include/awsiotsdk + + +CFLAGS += -I $(AWS_SDK_DIR)/include +CFLAGS += -I $(AWS_SDK_DIR)/external_libs/jsmn +CFLAGS += -I $(PLATFORM_COMMON_DIR) +CFLAGS += -I $(PLATFORM_DIR) +CFLAGS += -DENABLE_IOT_DEBUG -DENABLE_IOT_INFO -DENABLE_IOT_WARN -DENABLE_IOT_ERROR + + +# Source to compile +SRCS += $(wildcard $(SRC)/*.c) +SRCS += $(wildcard $(AWS_SDK_DIR)/external_libs/jsmn/*.c) +SRCS += $(wildcard $(PLATFORM_DIR)/*.c) +SRCS += $(wildcard $(PLATFORM_COMMON_DIR)/*.c) + +OBJS = $(SRCS:.c=.o) + + +.PHONY: all +all: lib$(NAME).a + +lib$(NAME).a: $(OBJS) + $(AR) -rcs $@ $(OBJS) + +.PHONY: install +install: lib$(NAME).a + install -D -m 0644 lib$(NAME).a $(DESTDIR)/usr/lib/lib$(NAME).a + install -d $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR) + install -m 0644 $(AWS_SDK_DIR)/include/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ + install -m 0644 $(AWS_SDK_DIR)/external_libs/jsmn/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ + install -m 0644 $(PLATFORM_COMMON_DIR)/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ + install -m 0644 $(PLATFORM_DIR)/*.h $(DESTDIR)$(AWS_INSTALL_HEADERS_DIR)/ + install -d $(DESTDIR)/usr/lib/pkgconfig + install -m 0644 ../awsiotsdk.pc $(DESTDIR)/usr/lib/pkgconfig/ + +.PHONY: clean +clean: + -rm -f lib$(NAME).a $(OBJS) |