[Hero, G2 Touch Android Development] sotux:
4th file is device_hero.mk

#
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

DEVICE_PACKAGE_OVERLAYS := device/htc/hero/overlay

# Passion uses high-density artwork where available
PRODUCT_LOCALES += mdpi

PRODUCT_PACKAGES += \
VoiceDialer \
sensors.hero \
hero-keypad.kcm \
wlan_loader \
tiwlan.ini \
libOmxCore \
gps.hero \
gralloc.msm7k \
copybit.msm7k \
lights.hero \
dhcpcd.conf

# Install the features available on this device.
PRODUCT_COPY_FILES += \
frameworks/base/data/etc/handheld_core_hardware.xml:system/etc/permissions/handheld_core_hardware.xml \
frameworks/base/data/etc/android.hardware.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \
frameworks/base/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
frameworks/base/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
frameworks/base/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
frameworks/base/data/etc/android.hardware.sensor.compass.xml:system/etc/permissions/android.hardware.sensor.compass.xml \
frameworks/base/data/etc/android.hardware.sensor.accelerometer.xml:system/etc/permissions/android.hardware.sensor.accelerometer.xml \
frameworks/base/data/etc/android.hardware.sensor.light.xml:system/etc/permissions/android.hardware.sensor.light.xml \
frameworks/base/data/etc/android.hardware.touchscreen.multitouch.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.xml \
frameworks/base/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml

PRODUCT_COPY_FILES += \
device/htc/hero/vold.fstab:system/etc/vold.fstab \
device/htc/hero/init.hero.rc:root/init.hero.rc \
device/htc/hero/ueventd.hero.rc:root/ueventd.hero.rc

# Keylayouts
PRODUCT_COPY_FILES += \
device/htc/hero/hero-keypad.kl:system/usr/keylayout/hero-keypad.kl \
device/htc/hero/h2w_headset.kl:system/usr/keylayout/h2w_headset.kl

# GSM APN list
PRODUCT_COPY_FILES += \
vendor/cyanogen/prebuilt/common/etc/apns-conf.xml:system/etc/apns-conf.xml

PRODUCT_PROPERTY_OVERRIDES += \
ro.ril.hsxpa=2 \
ro.ril.hsupa.category=5 \
ro.ril.gprsclass=10 \
ro.ril.enable.a52=1 \
ro.ril.enable.a53=1 \
ro.ril.def.agps.mode=2 \
ro.ril.def.agps.feature=1 \
ro.media.dec.jpeg.memcap=10000000 \
ro.com.google.locationfeatures = 1 \
ro.com.google.networklocation=1 \
ro.setupwizard.enable_bypass=1 \
ro.media.dec.aud.wma.enabled=1 \
ro.media.dec.vid.wmv.enabled=1 \
ro.config.sync=yes \
settings.display.autobacklight=1

PRODUCT_PROPERTY_OVERRIDES += \
rild.libpath=/system/lib/libhtc_ril.so \
wifi.interface=tiwlan0

# Time between scans in seconds. Keep it high to minimize battery drain.
# This only affects the case in which there are remembered access points,
# but none are in range.
PRODUCT_PROPERTY_OVERRIDES += \
wifi.supplicant_scan_interval=15

# density in DPI of the LCD of this board. This is used to scale the UI
# appropriately. If this property is not defined, the default value is 160 dpi.
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=160

# Default network type
# 0 => WCDMA Preferred.
PRODUCT_PROPERTY_OVERRIDES += \
ro.telephony.default_network=0

# Performences tweaks
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.execution-mode=int:jit

# OpenGL ES 1.1-CM
PRODUCT_PROPERTY_OVERRIDES += \
ro.opengles.version = 65536

# media configuration xml file
PRODUCT_COPY_FILES += \
device/htc/hero/media_profiles.xml:/system/etc/media_profiles.xml

# Kernel Targets
ifeq ($(TARGET_PREBUILT_KERNEL),)
LOCAL_KERNEL := device/htc/hero/kernel
else
LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
endif
PRODUCT_COPY_FILES += \
$(LOCAL_KERNEL):kernel

KERNEL_NAME := 2.6.29.6-flykernel-12a

PRODUCT_COPY_FILES += \
device/htc/hero/modules/modules.dep.bb:system/lib/modules/$(KERNEL_NAME)/modules.dep.bb \
device/htc/hero/modules/modules.order:system/lib/modules/$(KERNEL_NAME)/modules.order \
device/htc/hero/modules/ip_gre.ko:system/lib/modules/$(KERNEL_NAME)/net/ipv4/ip_gre.ko \
device/htc/hero/modules/wlan.ko:system/lib/modules/$(KERNEL_NAME)/drivers/net/wireless/tiwlan1251/wlan.ko \
device/htc/hero/modules/hid-dummy.ko:system/lib/modules/$(KERNEL_NAME)/drivers/hid/hid-dummy.ko \
device/htc/hero/modules/ramzswap.ko:system/lib/modules/$(KERNEL_NAME)/drivers/staging/ramzswap/ramzswap.ko \
device/htc/hero/modules/cifs.ko:system/lib/modules/$(KERNEL_NAME)/fs/cifs/cifs.ko \
device/htc/hero/modules/fuse.ko:system/lib/modules/$(KERNEL_NAME)/fs/fuse/fuse.ko \
device/htc/hero/modules/wlan.ko:system/lib/modules/wlan.ko

I removed some "call inherit-product" command because they had existed in full_hero.mk. In fact the relationship is below:

full_hero.mk file calls device_hero_eu.mk through "$(call inherit-product, device/htc/hero/device_hero_eu.mk)"

device_hero_eu.mk file calls device_hero.mk through "$(call inherit-product, device/htc/hero/device_hero.mk)"