OSDN Git Service

5ada2484c04d55cec899757bc2cfaee769da34bc
[android-x86/build.git] / target / board / generic_x86 / AndroidBoard.mk
1 #
2 # Copyright (C) 2009-2011 The Android-x86 Open Source Project
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10
11 # the path of target's AndroidBoard.mk that includes this file
12 TARGET_LOCAL_PATH := $(LOCAL_PATH)
13
14 # where I'm located
15 LOCAL_PATH := $(call my-dir)
16
17 ifexist  = $(if $(wildcard $(1)),$(1),$(wildcard $(2)))
18 cfgfile  = $(call ifexist,$(TARGET_LOCAL_PATH)/$(1),$(LOCAL_PATH)/$(1))
19 cpyfile  = $(if $(call cfgfile,$(1)),$(call cfgfile,$(1)):$(2)/$(1))
20
21 initrcs := $(foreach f,init.rc init.$(TARGET_PRODUCT).rc,$(call cpyfile,$(f),root))
22
23 ifeq ($(BOARD_USES_TSLIB),true)
24 tsfiles := $(foreach f,pointercal ts.conf ts.env,$(call cpyfile,$(f),system/etc))
25 endif
26
27 TARGET_PREBUILT_APPS := $(wildcard device/common/app/*.apk $(TARGET_LOCAL_PATH)/app/*.apk)
28 PRODUCT_COPY_FILES   += $(strip $(initrcs) $(tsfiles) $(foreach f,$(TARGET_PREBUILT_APPS),$(f):system/app/$(notdir $(f))))
29 PRODUCT_COPY_FILES   += $(call cpyfile,excluded-input-devices.xml,system/etc)
30
31 define include-wpa-supplicant-conf
32 LOCAL_PATH := $(1)
33 include $$(CLEAR_VARS)
34 LOCAL_MODULE := wpa_supplicant.conf
35 LOCAL_MODULE_CLASS := ETC
36 LOCAL_MODULE_PATH := $$(TARGET_OUT_ETC)/wifi
37 LOCAL_SRC_FILES := $$(LOCAL_MODULE)
38 LOCAL_PREBUILT_STRIP_COMMENTS := 1
39 include $$(BUILD_PREBUILT)
40 endef
41
42 define add-wpa-supplicant-conf
43 $(eval $(include-wpa-supplicant-conf))
44 endef
45
46 ifneq ($(BOARD_WPA_SUPPLICANT_DRIVER),)
47 $(call add-wpa-supplicant-conf,$(dir $(call cfgfile,wpa_supplicant.conf)))
48 endif
49
50 include device/common/firmware/firmware.mk