Pierre-Hugues Husson | cdf726b | 2017-12-17 18:12:19 +0100 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | echo 'PRODUCT_MAKEFILES := \' > AndroidProducts.mk |
| 4 | |
| 5 | for part in a ab;do |
| 6 | for apps in vanilla gapps foss;do |
| 7 | for arch in arm64;do |
| 8 | apps_suffix="" |
| 9 | apps_script="" |
| 10 | apps_name="" |
| 11 | if [ "$apps" == "gapps" ];then |
| 12 | apps_suffix="g" |
| 13 | apps_script='$(call inherit-product, device/phh/treble/gapps.mk)' |
| 14 | apps_name="with GApps" |
| 15 | fi |
| 16 | if [ "$apps" == "foss" ];then |
| 17 | apps_suffix="f" |
| 18 | apps_script='$(call inherit-product, vendor/foss/foss.mk)' |
| 19 | apps_name="with FOSS apps" |
| 20 | fi |
| 21 | if [ "$apps" == "vanilla" ];then |
| 22 | apps_suffix="v" |
| 23 | apps_script='' |
| 24 | apps_name="vanilla" |
| 25 | fi |
| 26 | |
| 27 | target="treble_${arch}_${part}${apps_suffix}" |
| 28 | |
| 29 | cat > ${target}.mk << EOF |
| 30 | include build/make/target/product/treble_common.mk |
| 31 | \$(call inherit-product, device/phh/treble/base.mk) |
| 32 | $apps_script |
| 33 | |
| 34 | PRODUCT_NAME := $target |
| 35 | PRODUCT_DEVICE := generic_arm64_$part |
| 36 | PRODUCT_BRAND := Android |
| 37 | PRODUCT_MODEL := Phh-Treble $apps_name |
| 38 | EOF |
| 39 | echo -e '\t$(LOCAL_DIR)/'$target.mk '\' >> AndroidProducts.mk |
| 40 | done |
| 41 | done |
| 42 | done |
| 43 | echo >> AndroidProducts.mk |