blob: e62c3ea2624edd643a2c6ce17dcbae6ce5f0913b [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
Mike Lockwood4f5d5172012-04-04 11:26:59 -070053# init.usb.rc is handled by build/target/product/core.rc
54
David 'Digit' Turnera0c98ef2009-09-23 11:19:20 -070055# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
56# to allow -user builds to properly run the dex pre-optimization pass in
57# the emulator.
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080058file := $(TARGET_ROOT_OUT)/init.goldfish.rc
59$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
60 $(transform-prebuilt-to-target)
61ALL_PREBUILT += $(file)
Colin Cross44b65d02010-04-20 14:32:50 -070062$(INSTALLED_RAMDISK_TARGET): $(file)
63
64file := $(TARGET_ROOT_OUT)/ueventd.goldfish.rc
65$(file) : $(LOCAL_PATH)/etc/ueventd.goldfish.rc | $(ACP)
66 $(transform-prebuilt-to-target)
67ALL_PREBUILT += $(file)
68$(INSTALLED_RAMDISK_TARGET): $(file)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080069
70# create some directories (some are mount points)
71DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
72 sbin \
73 dev \
74 proc \
75 sys \
76 system \
77 data \
78 ) \
79 $(TARGET_OUT_DATA)
80
81$(DIRS):
82 @echo Directory: $@
83 @mkdir -p $@
84
85ALL_PREBUILT += $(DIRS)