Android.mk revision a7fbf8a673e90918d55e441dbd5a29a87615dfa9
1LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4# files that live under /system/etc/...
5
6copy_from := \
7	etc/dbus.conf \
8	etc/hosts
9
10ifeq ($(TARGET_PRODUCT),full)
11copy_from += etc/vold.fstab
12endif
13
14ifeq ($(TARGET_PRODUCT),full_x86)
15copy_from += etc/vold.fstab
16endif
17
18ifeq ($(TARGET_PRODUCT),full_mips)
19copy_from += etc/vold.fstab
20endif
21
22# the /system/etc/init.goldfish.sh is needed to enable emulator support
23# in the system image. In theory, we don't need these for -user builds
24# which are device-specific. However, these builds require at the moment
25# to run the dex pre-optimization *in* the emulator. So keep the file until
26# we are capable of running dex preopt on the host.
27#
28copy_from += etc/init.goldfish.sh
29
30copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
31copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))
32
33$(copy_to) : PRIVATE_MODULE := system_etcdir
34$(copy_to) : $(TARGET_OUT)/% : $(LOCAL_PATH)/% | $(ACP)
35	$(transform-prebuilt-to-target)
36
37ALL_PREBUILT += $(copy_to)
38
39
40# files that live under /...
41
42# Only copy init.rc if the target doesn't have its own.
43ifneq ($(TARGET_PROVIDES_INIT_RC),true)
44file := $(TARGET_ROOT_OUT)/init.rc
45$(file) : $(LOCAL_PATH)/init.rc | $(ACP)
46	$(transform-prebuilt-to-target)
47ALL_PREBUILT += $(file)
48$(INSTALLED_RAMDISK_TARGET): $(file)
49endif
50
51file := $(TARGET_ROOT_OUT)/ueventd.rc
52$(file) : $(LOCAL_PATH)/ueventd.rc | $(ACP)
53	$(transform-prebuilt-to-target)
54ALL_PREBUILT += $(file)
55$(INSTALLED_RAMDISK_TARGET): $(file)
56
57# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
58# to allow -user builds to properly run the dex pre-optimization pass in
59# the emulator.
60file := $(TARGET_ROOT_OUT)/init.goldfish.rc
61$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
62	$(transform-prebuilt-to-target)
63ALL_PREBUILT += $(file)
64$(INSTALLED_RAMDISK_TARGET): $(file)
65
66file := $(TARGET_ROOT_OUT)/ueventd.goldfish.rc
67$(file) : $(LOCAL_PATH)/etc/ueventd.goldfish.rc | $(ACP)
68	$(transform-prebuilt-to-target)
69ALL_PREBUILT += $(file)
70$(INSTALLED_RAMDISK_TARGET): $(file)
71
72# create some directories (some are mount points)
73DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
74		sbin \
75		dev \
76		proc \
77		sys \
78		system \
79		data \
80	) \
81	$(TARGET_OUT_DATA)
82
83$(DIRS):
84	@echo Directory: $@
85	@mkdir -p $@
86
87ALL_PREBUILT += $(DIRS)
88