2017-12-17 17:12:19 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo 'PRODUCT_MAKEFILES := \' > AndroidProducts.mk
|
|
|
|
|
|
|
|
for part in a ab;do
|
|
|
|
for apps in vanilla gapps foss;do
|
|
|
|
for arch in arm64;do
|
2017-12-19 12:08:26 +00:00
|
|
|
for su in yes no;do
|
|
|
|
apps_suffix=""
|
|
|
|
apps_script=""
|
|
|
|
apps_name=""
|
|
|
|
extra_packages=""
|
|
|
|
if [ "$apps" == "gapps" ];then
|
|
|
|
apps_suffix="g"
|
|
|
|
apps_script='$(call inherit-product, device/phh/treble/gapps.mk)'
|
|
|
|
apps_name="with GApps"
|
|
|
|
fi
|
|
|
|
if [ "$apps" == "foss" ];then
|
|
|
|
apps_suffix="f"
|
|
|
|
apps_script='$(call inherit-product, vendor/foss/foss.mk)'
|
|
|
|
apps_name="with FOSS apps"
|
|
|
|
fi
|
|
|
|
if [ "$apps" == "vanilla" ];then
|
|
|
|
apps_suffix="v"
|
|
|
|
apps_script=''
|
|
|
|
apps_name="vanilla"
|
|
|
|
fi
|
2017-12-17 17:12:19 +00:00
|
|
|
|
2017-12-19 12:08:26 +00:00
|
|
|
su_suffix='N'
|
|
|
|
if [ "$su" == "yes" ];then
|
|
|
|
su_suffix='S'
|
|
|
|
extra_packages+=' phh-su'
|
|
|
|
fi
|
2017-12-17 17:12:19 +00:00
|
|
|
|
2017-12-19 12:10:47 +00:00
|
|
|
part_suffix='a'
|
|
|
|
if [ "$part" == 'ab' ];then
|
|
|
|
part_suffix='b'
|
|
|
|
fi
|
|
|
|
|
|
|
|
target="treble_${arch}_${part_suffix}${apps_suffix}${su_suffix}"
|
2017-12-19 12:08:26 +00:00
|
|
|
|
|
|
|
cat > ${target}.mk << EOF
|
2017-12-30 17:21:46 +00:00
|
|
|
\$(call inherit-product, device/phh/treble/base-pre.mk)
|
2017-12-17 17:12:19 +00:00
|
|
|
include build/make/target/product/treble_common.mk
|
|
|
|
\$(call inherit-product, device/phh/treble/base.mk)
|
|
|
|
$apps_script
|
|
|
|
|
|
|
|
PRODUCT_NAME := $target
|
|
|
|
PRODUCT_DEVICE := generic_arm64_$part
|
|
|
|
PRODUCT_BRAND := Android
|
|
|
|
PRODUCT_MODEL := Phh-Treble $apps_name
|
2017-12-19 12:08:26 +00:00
|
|
|
|
|
|
|
PRODUCT_PACKAGES += $extra_packages
|
2017-12-17 17:12:19 +00:00
|
|
|
EOF
|
|
|
|
echo -e '\t$(LOCAL_DIR)/'$target.mk '\' >> AndroidProducts.mk
|
2017-12-19 12:08:26 +00:00
|
|
|
done
|
2017-12-17 17:12:19 +00:00
|
|
|
done
|
|
|
|
done
|
|
|
|
done
|
|
|
|
echo >> AndroidProducts.mk
|