How to config makefile with subfolder
Posted: Tue Mar 07, 2017 12:57 pm
Hi support team,
Firstly I'm not familiar with linux makefile, in esp-idf SDK example, all the example are based on one main.c file, if I want to pass the compiling, I need to put all of the c files into the same path as that of the main.c located; actually in real application ,we need sub folders to manage different function modules , for example:
in the folder: /workspace/esp-idf-template/main: may includes:
main.c
iot_sdk
------src
---mqqt.c
---smartconfig.c
------inc
---mqtt.h
---smartconfig.h
if I assign the file structure above, how to set the configure file: such as component.mk and others.
It would be helpful for real application development.
Firstly I'm not familiar with linux makefile, in esp-idf SDK example, all the example are based on one main.c file, if I want to pass the compiling, I need to put all of the c files into the same path as that of the main.c located; actually in real application ,we need sub folders to manage different function modules , for example:
in the folder: /workspace/esp-idf-template/main: may includes:
main.c
iot_sdk
------src
---mqqt.c
---smartconfig.c
------inc
---mqtt.h
---smartconfig.h
if I assign the file structure above, how to set the configure file: such as component.mk and others.
It would be helpful for real application development.