The aws is not modified by latest make system on external.
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
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
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
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
$(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 $@
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
--- /dev/null
+###########################################################################
+#
+# 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
+
-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