Uboot Learning Two----The second----The main makefile environment variables: Host operating system and host architecture (Hostos, Hostarch) (31-43 rows)

Source: Internet
Author: User

Hostarch: = $ (Shell uname-m | \
Sed-e s/i.86/i386/\
-E s/sun4u/sparc64/\
-E s/arm.*/arm/\
-E s/sa110/arm/\
-E s/powerpc/ppc/\
-E s/ppc64/ppc/\
-e s/macppc/ppc/)

Hostos: = $ (Shell uname-s | tr ' [: Upper:] ' [: Lower:] ' | \
Sed-e ' s/\ (cygwin\). */cygwin/')

Exporthostarch Hostos//Export the CPU's architecture and CPU operating system to these two environment variables, below standby.

The use of Shell functions in makefile ("Learn Makefile_ Chenhao with me" on page 53rd):
Contents: = $ (Shell cat foo)
Files: = $ (shell echo *.c)
(1) The Shell function and the inverse quotation mark "'" are the same functions. Execute uname-m in Shell to print out the hardware schema name of the host
(2) in the Shell | Called Pipe, Pipe: The output of the expression in front of the pipeline is then processed as the input of the following one. The final output is the output of our entire equation.
(3) Hostarch

CPU Architecture Arch is architecture, the meaning of architecture.

Uboot Learning Two----The second----The main makefile environment variables: Host operating system and host architecture (Hostos, Hostarch) (31-43 rows)

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.