Targets on Makefiles

264 views
Skip to first unread message

Tiago Vieira

unread,
Jul 8, 2010, 9:13:12 AM7/8/10
to Android Building
Hi all

I've been reading through some custom makefiles created on the Code Aurora (I know this is Android Open Source group :-) My question will refer to it. ) and I'm a bit confuse regarding two variables within the Android Build environment:

TARGET_PRODUCT and TARGET_DEVICE.

In the build-system.html (found at build/core), it says that:

TARGET_PRODUCT is the name of the target hardware/product you are building for.

But it doesn't specify what is TARGET_DEVICE. The derivative work of Android Open Source (ie Code Aurora) sometimes refer to TARGET_PRODUCT when it builds for its devices (ie. msm7x).

Because of referencing to TARGET_PRODUCT and not TARGET_DEVICE, I feel that it is impossible to create multiple products for the same device.

So, for example: 

If I create a product called MYANDROID that targets the MSM7627 device, it will break the build. Then my product must have the same name as the device. Obviously it will conflict with the one already created by Code Aurora.

Then, please correct me if I'm wrong, the statement above on the build-system.html should be changed to:

"TARGET_PRODUCT is the name of the product you are building for, and TARGET_DEVICE is the name of the target hardware you are building for."

Could someone from Google/Android Open Source confirm if this is right?

Thanks,

Tiago

Jean-Baptiste Queru

unread,
Jul 9, 2010, 7:46:06 PM7/9/10
to android-...@googlegroups.com
TARGET_PRODUCT is set by lunch (or similar commands), and matches the
PRODUCT_NAME field of a makefile that is referenced by an
AndroidProducts.mk

In turn, that makefile sets PRODUCT_DEVICE, which is used to locate
the BoardConfig.mk (and AndroidBoard.mk) in the directory whose name
matches PRODUCT_DEVICE.

JBQ

> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>

--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Reply all
Reply to author
Forward
0 new messages