From ae99fc0ecf90f05083a5765990ecbf3abc8de13b Mon Sep 17 00:00:00 2001 From: sunghan Date: Tue, 12 Sep 2017 19:54:12 +0900 Subject: [PATCH] aws: fix compilation errors The aws is not modified by latest make system on external. --- external/aws/Makefile | 57 ++++++++++------------ external/aws/certs/Make.defs | 23 +++++++++ external/aws/external_libs/jsmn/Make.defs | 23 +++++++++ external/aws/platform/TizenRT/common/Make.defs | 23 +++++++++ external/aws/platform/TizenRT/mbedtls/Make.defs | 23 +++++++++ .../aws/samples/TizenRT/shadow_sample/Make.defs | 23 +++++++++ .../TizenRT/shadow_sample_console_echo/Make.defs | 23 +++++++++ .../TizenRT/subscribe_publish_cpp_sample/Make.defs | 23 +++++++++ .../subscribe_publish_library_sample/Make.defs | 23 +++++++++ .../TizenRT/subscribe_publish_sample/Make.defs | 23 +++++++++ external/aws/src/Make.defs | 46 +++++++++++------ 11 files changed, 263 insertions(+), 47 deletions(-) create mode 100644 external/aws/certs/Make.defs create mode 100644 external/aws/external_libs/jsmn/Make.defs create mode 100644 external/aws/platform/TizenRT/common/Make.defs create mode 100644 external/aws/platform/TizenRT/mbedtls/Make.defs create mode 100644 external/aws/samples/TizenRT/shadow_sample/Make.defs create mode 100644 external/aws/samples/TizenRT/shadow_sample_console_echo/Make.defs create mode 100644 external/aws/samples/TizenRT/subscribe_publish_cpp_sample/Make.defs create mode 100644 external/aws/samples/TizenRT/subscribe_publish_library_sample/Make.defs create mode 100644 external/aws/samples/TizenRT/subscribe_publish_sample/Make.defs diff --git a/external/aws/Makefile b/external/aws/Makefile index dcc95ca..0ab3154 100644 --- a/external/aws/Makefile +++ b/external/aws/Makefile @@ -24,23 +24,26 @@ AWS_CERT_DIR = certs AWS_PLATFORM_DIR = platform/TizenRT AWS_EXTLIB_DIR = external_libs +DEPPATH = --dep-path . +VPATH = + ASRCS = CSRCS = -MAINSRC = - -CSRCS += $(AWS_SAMPLE_DIR)/subscribe_publish_sample/subscribe_publish_sample.c \ - $(AWS_SAMPLE_DIR)/subscribe_publish_library_sample/subscribe_publish_library_sample.c \ - $(AWS_SAMPLE_DIR)/shadow_sample_console_echo/shadow_console_echo.c \ - $(AWS_SAMPLE_DIR)/shadow_sample/shadow_sample.c -CSRCS += $(AWS_PLATFORM_DIR)/mbedtls/network_mbedtls_wrapper.c -CSRCS += $(AWS_PLATFORM_DIR)/common/timer.c -CSRCS += $(AWS_CERT_DIR)/certData.c -CSRCS += $(AWS_EXTLIB_DIR)/jsmn/jsmn.c - -CXXSRCS += $(AWS_SAMPLE_DIR)/subscribe_publish_cpp_sample/subscribe_publish_cpp_sample.cpp - -CFLAGS += -Iaws/include -CFLAGS += -Iaws/external_libs/jsmn +CXXSRCS = + +include src/Make.defs +include $(AWS_SAMPLE_DIR)/subscribe_publish_sample/Make.defs +include $(AWS_SAMPLE_DIR)/subscribe_publish_library_sample/Make.defs +include $(AWS_SAMPLE_DIR)/shadow_sample_console_echo/Make.defs +include $(AWS_SAMPLE_DIR)/shadow_sample/Make.defs +include $(AWS_SAMPLE_DIR)/subscribe_publish_cpp_sample/Make.defs +include $(AWS_PLATFORM_DIR)/mbedtls/Make.defs +include $(AWS_PLATFORM_DIR)/common/Make.defs +include $(AWS_CERT_DIR)/Make.defs +include $(AWS_EXTLIB_DIR)/jsmn/Make.defs + +CFLAGS += -Iinclude +CFLAGS += -Iexternal_libs/jsmn CFLAGS += -I$(AWS_PLATFORM_DIR)/common CFLAGS += -I$(AWS_CERT_DIR) CFLAGS += -I$(AWS_PLATFORM_DIR)/mbedtls @@ -56,8 +59,8 @@ CFLAGS += -I$(AWS_SAMPLE_DIR)/shadow_sample CFLAGS += -DENABLE_IOT_INFO CFLAGS += -DENABLE_IOT_ERROR -CXXFLAGS += -Iaws/include -CXXFLAGS += -Iaws/external_libs/jsmn +CXXFLAGS += -Iinclude +CXXFLAGS += -Iexternal_libs/jsmn CXXFLAGS += -I$(AWS_PLATFORM_DIR)/common CXXFLAGS += -I$(AWS_CERT_DIR) CXXFLAGS += -I$(AWS_PLATFORM_DIR)/mbedtls @@ -65,16 +68,11 @@ CXXFLAGS += -I$(AWS_SAMPLE_DIR)/subscribe_publish_cpp_sample AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) -MAINOBJ = $(MAINSRC:.c=$(OBJEXT)) CXXOBJS = $(CXXSRCS:.cpp=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) $(CXXSRCS) +SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) OBJS = $(AOBJS) $(COBJS) $(CXXOBJS) -ifneq ($(CONFIG_BUILD_KERNEL),y) - OBJS += $(MAINOBJ) -endif - ifeq ($(CONFIG_WINDOWS_NATIVE),y) BIN = ..\libexternal$(LIBEXT) else @@ -85,19 +83,13 @@ else endif endif -DEPPATH = --dep-path . - -# Common build - -VPATH = - all: .built -.PHONY: clean depend distclean +.PHONY: .depend clean depend distclean $(AOBJS): %$(OBJEXT): %.S $(call ASSEMBLE, $<, $@) -$(COBJS) $(MAINOBJ): %$(OBJEXT): %.c +$(COBJS): %$(OBJEXT): %.c $(call COMPILE, $<, $@) $(CXXOBJS): %$(OBJEXT): %.cpp @@ -108,7 +100,8 @@ $(CXXOBJS): %$(OBJEXT): %.cpp $(Q) touch .built .depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(ASRCS) >Make.dep + $(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(CSRCS) >Make.dep $(Q) $(MKDEP) $(DEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(CXXSRCS) >Make.dep $(Q) touch $@ diff --git a/external/aws/certs/Make.defs b/external/aws/certs/Make.defs new file mode 100644 index 0000000..01690bc --- /dev/null +++ b/external/aws/certs/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += certData.c + +DEPPATH += --dep-path certs +VPATH += :certs + diff --git a/external/aws/external_libs/jsmn/Make.defs b/external/aws/external_libs/jsmn/Make.defs new file mode 100644 index 0000000..85892fe --- /dev/null +++ b/external/aws/external_libs/jsmn/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += jsmn.c + +DEPPATH += --dep-path external_libs/jsmn +VPATH += :external_libs/jsmn + diff --git a/external/aws/platform/TizenRT/common/Make.defs b/external/aws/platform/TizenRT/common/Make.defs new file mode 100644 index 0000000..87b5427 --- /dev/null +++ b/external/aws/platform/TizenRT/common/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += timer.c + +DEPPATH += --dep-path platform/TizenRT/common +VPATH += :platform/TizenRT/common + diff --git a/external/aws/platform/TizenRT/mbedtls/Make.defs b/external/aws/platform/TizenRT/mbedtls/Make.defs new file mode 100644 index 0000000..280cc7e --- /dev/null +++ b/external/aws/platform/TizenRT/mbedtls/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += network_mbedtls_wrapper.c + +DEPPATH += --dep-path platform/TizenRT/mbedtls +VPATH += :platform/TizenRT/mbedtls + diff --git a/external/aws/samples/TizenRT/shadow_sample/Make.defs b/external/aws/samples/TizenRT/shadow_sample/Make.defs new file mode 100644 index 0000000..b2e6c47 --- /dev/null +++ b/external/aws/samples/TizenRT/shadow_sample/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += shadow_sample.c + +DEPPATH += --dep-path samples/TizenRT/shadow_sample +VPATH += :samples/TizenRT/shadow_sample + diff --git a/external/aws/samples/TizenRT/shadow_sample_console_echo/Make.defs b/external/aws/samples/TizenRT/shadow_sample_console_echo/Make.defs new file mode 100644 index 0000000..15fda99 --- /dev/null +++ b/external/aws/samples/TizenRT/shadow_sample_console_echo/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += shadow_console_echo.c + +DEPPATH += --dep-path samples/TizenRT/shadow_sample_console_echo +VPATH += :samples/TizenRT/shadow_sample_console_echo + diff --git a/external/aws/samples/TizenRT/subscribe_publish_cpp_sample/Make.defs b/external/aws/samples/TizenRT/subscribe_publish_cpp_sample/Make.defs new file mode 100644 index 0000000..182975e --- /dev/null +++ b/external/aws/samples/TizenRT/subscribe_publish_cpp_sample/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CXXSRCS += subscribe_publish_cpp_sample.cpp + +DEPPATH += --dep-path samples/TizenRT/subscribe_publish_cpp_sample +VPATH += :samples/TizenRT/subscribe_publish_cpp_sample + diff --git a/external/aws/samples/TizenRT/subscribe_publish_library_sample/Make.defs b/external/aws/samples/TizenRT/subscribe_publish_library_sample/Make.defs new file mode 100644 index 0000000..c149324 --- /dev/null +++ b/external/aws/samples/TizenRT/subscribe_publish_library_sample/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += subscribe_publish_library_sample.c + +DEPPATH += --dep-path samples/TizenRT/subscribe_publish_library_sample +VPATH += :samples/TizenRT/subscribe_publish_library_sample + diff --git a/external/aws/samples/TizenRT/subscribe_publish_sample/Make.defs b/external/aws/samples/TizenRT/subscribe_publish_sample/Make.defs new file mode 100644 index 0000000..4c22c0b --- /dev/null +++ b/external/aws/samples/TizenRT/subscribe_publish_sample/Make.defs @@ -0,0 +1,23 @@ +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### + +CSRCS += subscribe_publish_sample.c + +DEPPATH += --dep-path samples/TizenRT/subscribe_publish_sample +VPATH += :samples/TizenRT/subscribe_publish_sample + diff --git a/external/aws/src/Make.defs b/external/aws/src/Make.defs index a00d667..3eaa870 100644 --- a/external/aws/src/Make.defs +++ b/external/aws/src/Make.defs @@ -1,17 +1,33 @@ -AWS_SRC_DIR=aws/src +########################################################################### +# +# Copyright 2017 Samsung Electronics All Rights Reserved. +# +# 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. +# +########################################################################### -CSRCS += $(AWS_SRC_DIR)/aws_iot_json_utils.c \ - $(AWS_SRC_DIR)/aws_iot_mqtt_client.c \ - $(AWS_SRC_DIR)/aws_iot_mqtt_client_common_internal.c \ - $(AWS_SRC_DIR)/aws_iot_mqtt_client_connect.c \ - $(AWS_SRC_DIR)/aws_iot_mqtt_client_publish.c \ - $(AWS_SRC_DIR)/aws_iot_mqtt_client_subscribe.c \ - $(AWS_SRC_DIR)/aws_iot_mqtt_client_unsubscribe.c \ - $(AWS_SRC_DIR)/aws_iot_mqtt_client_yield.c \ - $(AWS_SRC_DIR)/aws_iot_shadow_actions.c \ - $(AWS_SRC_DIR)/aws_iot_shadow.c \ - $(AWS_SRC_DIR)/aws_iot_shadow_json.c \ - $(AWS_SRC_DIR)/aws_iot_shadow_records.c +CSRCS += aws_iot_json_utils.c \ + aws_iot_mqtt_client.c \ + aws_iot_mqtt_client_common_internal.c \ + aws_iot_mqtt_client_connect.c \ + aws_iot_mqtt_client_publish.c \ + aws_iot_mqtt_client_subscribe.c \ + aws_iot_mqtt_client_unsubscribe.c \ + aws_iot_mqtt_client_yield.c \ + aws_iot_shadow_actions.c \ + aws_iot_shadow.c \ + aws_iot_shadow_json.c \ + aws_iot_shadow_records.c -ROOTDEPPATH += --dep-path aws/src/ -VPATH += :aws/src/ +DEPPATH += --dep-path src +VPATH += :src -- 2.7.4