uboot中Makefile的学习

来源:互联网 发布:js什么是冒泡事件 编辑:程序博客网 时间:2024/05/30 20:09

最近在学习uboot,对Makefile总是一知半解,觉得这样基础不牢很不妥,遂决定把Makefile好好学习回顾一下。


(1)HOSTARCH和HOSTOS

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/')export  HOSTARCH HOSTOS
其中shell和sed都是Makefile中的函数

原创粉丝点击