Contiki makefile. include four concerns <contiki 2>

Source: Internet
Author: User

Contiki makefile. include notes

 

Conventions: makefile includes makefile and makefile. xxx, not just makefile.

 

The makefile syntax is not analyzed. focus only on a few requirements.

 

First, you must note that makefile. Include is included by the "makefile" in the user's project directory. This is required.

 

Makefile. Include is retrieved sequentially from top to bottom.

 

Focus 1:

At first, the compilation system checks whether the user has defined the contiki source code root directory, the User-Defined hardware platform, whether IPv6 is used, and the current compilation system. For example:

 

 

A. If you do not define the contiki variable in your makefile, the compilation ends and an error is returned. Generally, the makefile in the project directory should be defined as follows:

"Contiki =.../..."

B. Check the hardware platform defined by the user. If the command selects "make" instead of "make target = BSE", the makefile.tar file in the project directory will be downloaded to find the target definition in the file. If no definition is available, the system selects the "native" hardware platform by default.

C. Add the "makefile. $ (target). defines" file, which also exists in the user project directory.

D. Check whether IPv6 is enabled.

E. Check the compiling environment system: Windows or Linux

 

Focus 2:

Import the core code of contiki and create the OBJ target directory. The OBJ _ $ (target) directory must contain various generated. O files. For example:

 

As you can see, the core/Under contiki/is unconditionally included-no matter what platform or application you are. Of course, it is not absolute. To reduce some features, you can modify the value of the variable "contikidirs. Next, create a place under the project directory where the "*. O" file is stored, and name it with "OBJ.

 

Focus 3:

Check whether you want to import some upper-layer applications. If yes, the corresponding makefile files under contiki/apps/and contiki/platform/$ (target)/apps/will be imported. The check mechanism is based on whether the "apps" variable is defined in your makefile. For example:

The definition of the "apps" variable in makefile is shown in <using email application as an example>:

 

Focus 4:

Import the makefile on the corresponding hardware platform. For example, if it is the platform, import makefile. cc2530dk makefile, for example:

 

The specific variable "target_makefile" is used to solve the problem.

Target_makefile: = $ (wildcard $ (contiki)/platform/$ (target)/makefile. $ (target) $ {foreach tdir, $ (targetdirs), $ (tdir)/$ (target)/makefile. $ (target )})

 

OK. The above is the main task of makefile. include. Others are variable values.

 

 

Email: [email protected]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.