From 9120590caa86f47ca1773f9c817b7f6c726d79d4 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 2 Jun 2015 18:51:22 +1000 Subject: [PATCH] Fix up submodule paths, add some hints for submodule usage --- .gitmodules | 5 +++-- README.md | 4 ++-- axtls/component.mk | 4 ++++ common.mk | 2 +- lwip/component.mk | 4 ++++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index d885b04..cc98fe2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,7 @@ [submodule "lwip/lwip"] path = lwip/lwip - url = git://git.savannah.nongnu.org/lwip.git + url = git@github.com:SuperHouse/esp-lwip.git [submodule "axtls/axtls"] path = axtls/axtls - url = ../../axtls-code/ + url = git@github.com:SuperHouse/axtls.git + diff --git a/README.md b/README.md index 5215e02..9ad9813 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ Similar to, but substantially different from, the [Espressif IOT RTOS SDK](https * The build process uses `GNU Make`, and the utilities `sed` and `grep`. Linux & OS X should have these already. Windows users can get these tools a variety of ways, [MingGW](http://www.mingw.org/wiki/mingw) is one option. -* Use git to clone the esp-open-rtos project: +* Use git to clone the esp-open-rtos project (note the `--recursive`): ``` -git clone git@github.com:superhouse/esp-open-rtos.git +git clone --recursive git@github.com:superhouse/esp-open-rtos.git cd esp-open-rtos ``` diff --git a/axtls/component.mk b/axtls/component.mk index 185f47e..44da5a0 100644 --- a/axtls/component.mk +++ b/axtls/component.mk @@ -17,3 +17,7 @@ axtls_SRC_DIR = $(AXTLS_DIR)crypto $(AXTLS_DIR)ssl $(ROOT)axtls #axtls_CFLAGS = $(CFLAGS) -Wno-address $(eval $(call component_compile_rules,axtls)) + +# Helpful error if git submodule not initialised +$(axtls_SRC_DIR): + $(error "axtls git submodule not installed. Please run 'git submodule init' then 'git submodule update'") diff --git a/common.mk b/common.mk index c375b91..29d0f89 100644 --- a/common.mk +++ b/common.mk @@ -149,7 +149,7 @@ $(1)_CFLAGS ?= $(CFLAGS) $(1)_CC_ARGS = $(Q) $(CC) $(addprefix -I,$(INC_DIRS)) $$(addprefix -I,$$($(1)_INC_DIR)) $$($(1)_CFLAGS) $(1)_AR = $(BUILD_DIR)$(1).a -$$($(1)_OBJ_DIR)%.o: $$($(1)_REAL_ROOT)%.c +$$($(1)_OBJ_DIR)%.o: $$($(1)_REAL_ROOT)%.c | $$($(1)_SRC_DIR) $(vecho) "CC $$<" $(Q) mkdir -p $$(dir $$@) $$($(1)_CC_ARGS) -c $$< -o $$@ diff --git a/lwip/component.mk b/lwip/component.mk index 92e8a36..4257689 100644 --- a/lwip/component.mk +++ b/lwip/component.mk @@ -13,3 +13,7 @@ lwip_CFLAGS = $(CFLAGS) -Wno-address $(eval $(call component_compile_rules,lwip)) +# Helpful error if git submodule not initialised +$(lwip_SRC_DIR): + $(error "LWIP git submodule not installed. Please run 'git submodule init' then 'git submodule update'") +