blob: 1a9e06f6d417889addcdd10ec3358b9cf38c4ef9 [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
David 'Digit' Turnera0c98ef2009-09-23 11:19:20 -070018# the /system/etc/init.goldfish.sh is needed to enable emulator support
19# in the system image. In theory, we don't need these for -user builds
20# which are device-specific. However, these builds require at the moment
21# to run the dex pre-optimization *in* the emulator. So keep the file until
22# we are capable of running dex preopt on the host.
23#
David 'Digit' Turnerca8177d2009-09-08 15:55:36 -070024copy_from += etc/init.goldfish.sh
San Mehat2dfe4902009-08-31 08:04:49 -070025
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080026copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
27copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))
28
29$(copy_to) : PRIVATE_MODULE := system_etcdir
30$(copy_to) : $(TARGET_OUT)/% : $(LOCAL_PATH)/% | $(ACP)
31 $(transform-prebuilt-to-target)
32
33ALL_PREBUILT += $(copy_to)
34
35
36# files that live under /...
37
38# Only copy init.rc if the target doesn't have its own.
39ifneq ($(TARGET_PROVIDES_INIT_RC),true)
40file := $(TARGET_ROOT_OUT)/init.rc
41$(file) : $(LOCAL_PATH)/init.rc | $(ACP)
42 $(transform-prebuilt-to-target)
43ALL_PREBUILT += $(file)
Colin Crossdc61c9c2010-04-09 12:39:16 -070044$(INSTALLED_RAMDISK_TARGET): $(file)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080045endif
46
Colin Cross44b65d02010-04-20 14:32:50 -070047file := $(TARGET_ROOT_OUT)/ueventd.rc
48$(file) : $(LOCAL_PATH)/ueventd.rc | $(ACP)
49 $(transform-prebuilt-to-target)
50ALL_PREBUILT += $(file)
51$(INSTALLED_RAMDISK_TARGET): $(file)
52
David 'Digit' Turnera0c98ef2009-09-23 11:19:20 -070053# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
54# to allow -user builds to properly run the dex pre-optimization pass in
55# the emulator.
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080056file := $(TARGET_ROOT_OUT)/init.goldfish.rc
57$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
58 $(transform-prebuilt-to-target)
59ALL_PREBUILT += $(file)
Colin Cross44b65d02010-04-20 14:32:50 -070060$(INSTALLED_RAMDISK_TARGET): $(file)
61
62file := $(TARGET_ROOT_OUT)/ueventd.goldfish.rc
63$(file) : $(LOCAL_PATH)/etc/ueventd.goldfish.rc | $(ACP)
64 $(transform-prebuilt-to-target)
65ALL_PREBUILT += $(file)
66$(INSTALLED_RAMDISK_TARGET): $(file)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080067
68# create some directories (some are mount points)
69DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
70 sbin \
71 dev \
72 proc \
73 sys \
74 system \
75 data \
76 ) \
77 $(TARGET_OUT_DATA)
78
79$(DIRS):
80 @echo Directory: $@
81 @mkdir -p $@
82
83ALL_PREBUILT += $(DIRS)