| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file | 2 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE.md file. | 4 # BSD-style license that can be found in the LICENSE.md file. |
| 5 | 5 |
| 6 set -e | 6 set -e |
| 7 | 7 |
| 8 LK_PROJECT=${LK_PROJECT-vexpress-a9-test} | 8 LK_PROJECT=${LK_PROJECT-vexpress-a9-test} |
| 9 | 9 |
| 10 config=build-$LK_PROJECT/config.h | 10 config=build-$LK_PROJECT/config.h |
| 11 | 11 |
| 12 # Build the config.h file required for the project. | 12 # Build the config.h file required for the project. |
| 13 ( cd ../third_party/lk/ && make PROJECT=$LK_PROJECT $config ) | 13 ( cd ../third_party/lk/ && make PROJECT=$LK_PROJECT $config ) |
| 14 | 14 |
| 15 config_path=../third_party/lk/$config | 15 config_path=../third_party/lk/$config |
| 16 | 16 |
| 17 cpu=`sed -n 's/.*ARM_CPU_CORTEX_\([MA][0-9]\).*/\L\1/p' $config_path | head -n 1
` | 17 cpu=`sed -n 's/.*ARM_CPU_CORTEX_\([MA][0-9]\).*/\L\1/p' $config_path | head -n 1
` |
| 18 | 18 |
| 19 LK_CPU=cortex-$cpu | 19 LK_CPU=cortex-$cpu |
| 20 | 20 |
| 21 echo "LK project: $LK_PROJECT" | 21 echo "LK project: $LK_PROJECT" |
| 22 echo "LK cpu: $LK_CPU" | 22 echo "LK cpu: $LK_CPU" |
| 23 | 23 |
| 24 GYP_DEFINES="LK_PROJECT=$LK_PROJECT LK_CPU=$LK_CPU" ninja | 24 GYP_DEFINES="LK_PROJECT=$LK_PROJECT LK_CPU=$LK_CPU" ninja |
| OLD | NEW |