blob: 64ff522445ab214fb35f1389444cc58f078872f1 [file] [log] [blame]
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08001LOCAL_PATH:= $(call my-dir)
2include $(CLEAR_VARS)
3
4# files that live under /system/etc/...
5
6copy_from := \
7 etc/dbus.conf \
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -08008 etc/hosts
9
Ravi K Yenduri2ee12e72010-07-15 09:24:39 -050010ifeq ($(TARGET_PRODUCT),full)
San Mehat5184fc52009-12-17 07:13:16 -080011copy_from += etc/vold.fstab
David 'Digit' Turnerca8177d2009-09-08 15:55:36 -070012endif
13
Jun Nakajima0db09212011-02-13 21:10:40 -080014ifeq ($(TARGET_PRODUCT),full_x86)
15copy_from += etc/vold.fstab
16endif
17
Bhanu Chetlapallia7fbf8a2012-06-07 15:15:52 -070018ifeq ($(TARGET_PRODUCT),full_mips)
19copy_from += etc/vold.fstab
20endif
21
David 'Digit' Turnera0c98ef2009-09-23 11:19:20 -070022# 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#
David 'Digit' Turnerca8177d2009-09-08 15:55:36 -070028copy_from += etc/init.goldfish.sh
San Mehat2dfe4902009-08-31 08:04:49 -070029
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080030copy_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)
Colin Crossdc61c9c2010-04-09 12:39:16 -070048$(INSTALLED_RAMDISK_TARGET): $(file)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080049endif
50
Colin Cross44b65d02010-04-20 14:32:50 -070051file := $(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
Mike Lockwood4f5d5172012-04-04 11:26:59 -070057# init.usb.rc is handled by build/target/product/core.rc
58
David 'Digit' Turnera0c98ef2009-09-23 11:19:20 -070059# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
60# to allow -user builds to properly run the dex pre-optimization pass in
61# the emulator.
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080062file := $(TARGET_ROOT_OUT)/init.goldfish.rc
63$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
64 $(transform-prebuilt-to-target)
65ALL_PREBUILT += $(file)
Colin Cross44b65d02010-04-20 14:32:50 -070066$(INSTALLED_RAMDISK_TARGET): $(file)
67
68file := $(TARGET_ROOT_OUT)/ueventd.goldfish.rc
69$(file) : $(LOCAL_PATH)/etc/ueventd.goldfish.rc | $(ACP)
70 $(transform-prebuilt-to-target)
71ALL_PREBUILT += $(file)
72$(INSTALLED_RAMDISK_TARGET): $(file)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080073
74# create some directories (some are mount points)
75DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
76 sbin \
77 dev \
78 proc \
79 sys \
80 system \
81 data \
82 ) \
83 $(TARGET_OUT_DATA)
84
85$(DIRS):
86 @echo Directory: $@
87 @mkdir -p $@
88
89ALL_PREBUILT += $(DIRS)