- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,all:
Do you have any document can tell me how to make a .mk file to the project.
Solved! Go to Solution.
- Labels:
-
Wifi+Bluetooth
- Tags:
- create make file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It's actually quite simple. Here are the steps i see to create a .mk file.
Let us assume that you are creating application in apps/snip/user_app.
1. You name the file as user_app.mk. Define name of the app
NAME :=App_user_app
2. Add all the source file using
$(NAME)_SOURCES +=user_app.c
3. Add required components, for instance
$(NAME)_COMPONENTS += protocols/MQTT
3. If you use any other resources like certificate or html page then add them under
$(NAME)_RESOURCES := apps/aws_iot/rootca.cer
4. In case you want to define WLAN credentials separately then,
WIFI_CONFIG_DCT_H := wifi_config_dct.h
5. if you have any Global define then define them here, for instance
GLOBAL_DEFINES += NO_AP_INTERFACE
6. Optionally, you can also define if this for specific platform using
VALID_PLATFORMS :=
Look at either apps/snip/scan/scan.mk or apps/test/console/console.mk for a more detailed example
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
It's actually quite simple. Here are the steps i see to create a .mk file.
Let us assume that you are creating application in apps/snip/user_app.
1. You name the file as user_app.mk. Define name of the app
NAME :=App_user_app
2. Add all the source file using
$(NAME)_SOURCES +=user_app.c
3. Add required components, for instance
$(NAME)_COMPONENTS += protocols/MQTT
3. If you use any other resources like certificate or html page then add them under
$(NAME)_RESOURCES := apps/aws_iot/rootca.cer
4. In case you want to define WLAN credentials separately then,
WIFI_CONFIG_DCT_H := wifi_config_dct.h
5. if you have any Global define then define them here, for instance
GLOBAL_DEFINES += NO_AP_INTERFACE
6. Optionally, you can also define if this for specific platform using
VALID_PLATFORMS :=
Look at either apps/snip/scan/scan.mk or apps/test/console/console.mk for a more detailed example