1c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang#
2c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# Copyright (C) 2011-2012 The Android Open Source Project
3c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang#
4c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# Licensed under the Apache License, Version 2.0 (the "License");
5c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# you may not use this file except in compliance with the License.
6c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# You may obtain a copy of the License at
7c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang#
8c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang#      http://www.apache.org/licenses/LICENSE-2.0
9c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang#
10c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# Unless required by applicable law or agreed to in writing, software
11c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# distributed under the License is distributed on an "AS IS" BASIS,
12c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# See the License for the specific language governing permissions and
14c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang# limitations under the License.
15c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang#
16c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang
17b23b1568c3dcedc2305e459bff02256256bf3329Shih-wei Liao# Build rules for extracting configuration from Android.mk
18b23b1568c3dcedc2305e459bff02256256bf3329Shih-wei Liaointermediates := $(call local-intermediates-dir)
19c72c4ddfcd79c74f70713da91a69569451b5c19eZonr Chang
20b23b1568c3dcedc2305e459bff02256256bf3329Shih-wei LiaoGEN_CONFIG_FROM_MK := $(intermediates)/ConfigFromMk.h
21eb567849ac8b123f7afe78bb81ff8a4f921a6a6fLogan Chien
22b23b1568c3dcedc2305e459bff02256256bf3329Shih-wei Liao$(GEN_CONFIG_FROM_MK): PRIVATE_PATH := $(LIBBCC_ROOT_PATH)
23b23b1568c3dcedc2305e459bff02256256bf3329Shih-wei Liao$(GEN_CONFIG_FROM_MK): PRIVATE_CUSTOM_TOOL = \
24b4db722b7e400d9ce93f41b3d4243fd4f20ef300Zonr Chang        $(PRIVATE_PATH)/tools/build/gen-config-from-mk.py < $< > $@
25b23b1568c3dcedc2305e459bff02256256bf3329Shih-wei Liao$(GEN_CONFIG_FROM_MK): $(LIBBCC_ROOT_PATH)/libbcc-config.mk \
26b4db722b7e400d9ce93f41b3d4243fd4f20ef300Zonr Chang        $(LIBBCC_ROOT_PATH)/tools/build/gen-config-from-mk.py
27eb567849ac8b123f7afe78bb81ff8a4f921a6a6fLogan Chien	$(transform-generated-source)
28eb567849ac8b123f7afe78bb81ff8a4f921a6a6fLogan Chien
29b23b1568c3dcedc2305e459bff02256256bf3329Shih-wei LiaoLOCAL_GENERATED_SOURCES += $(GEN_CONFIG_FROM_MK)
30