blob: 329be7f94a7fe975b6075d2c9159c22d5bd90518 [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
San Mehat2dfe4902009-08-31 08:04:49 -070010ifeq ($(TARGET_PRODUCT),generic)
San Mehat5184fc52009-12-17 07:13:16 -080011copy_from += etc/vold.fstab
David 'Digit' Turnerca8177d2009-09-08 15:55:36 -070012endif
13
David 'Digit' Turnera0c98ef2009-09-23 11:19:20 -070014# the /system/etc/init.goldfish.sh is needed to enable emulator support
15# in the system image. In theory, we don't need these for -user builds
16# which are device-specific. However, these builds require at the moment
17# to run the dex pre-optimization *in* the emulator. So keep the file until
18# we are capable of running dex preopt on the host.
19#
David 'Digit' Turnerca8177d2009-09-08 15:55:36 -070020copy_from += etc/init.goldfish.sh
San Mehat2dfe4902009-08-31 08:04:49 -070021
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080022copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
23copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))
24
25$(copy_to) : PRIVATE_MODULE := system_etcdir
26$(copy_to) : $(TARGET_OUT)/% : $(LOCAL_PATH)/% | $(ACP)
27 $(transform-prebuilt-to-target)
28
29ALL_PREBUILT += $(copy_to)
30
31
32# files that live under /...
33
34# Only copy init.rc if the target doesn't have its own.
35ifneq ($(TARGET_PROVIDES_INIT_RC),true)
36file := $(TARGET_ROOT_OUT)/init.rc
37$(file) : $(LOCAL_PATH)/init.rc | $(ACP)
38 $(transform-prebuilt-to-target)
39ALL_PREBUILT += $(file)
Colin Crossdc61c9c2010-04-09 12:39:16 -070040$(INSTALLED_RAMDISK_TARGET): $(file)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080041endif
42
Colin Cross44b65d02010-04-20 14:32:50 -070043file := $(TARGET_ROOT_OUT)/ueventd.rc
44$(file) : $(LOCAL_PATH)/ueventd.rc | $(ACP)
45 $(transform-prebuilt-to-target)
46ALL_PREBUILT += $(file)
47$(INSTALLED_RAMDISK_TARGET): $(file)
48
David 'Digit' Turnera0c98ef2009-09-23 11:19:20 -070049# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
50# to allow -user builds to properly run the dex pre-optimization pass in
51# the emulator.
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080052file := $(TARGET_ROOT_OUT)/init.goldfish.rc
53$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
54 $(transform-prebuilt-to-target)
55ALL_PREBUILT += $(file)
Colin Cross44b65d02010-04-20 14:32:50 -070056$(INSTALLED_RAMDISK_TARGET): $(file)
57
58file := $(TARGET_ROOT_OUT)/ueventd.goldfish.rc
59$(file) : $(LOCAL_PATH)/etc/ueventd.goldfish.rc | $(ACP)
60 $(transform-prebuilt-to-target)
61ALL_PREBUILT += $(file)
62$(INSTALLED_RAMDISK_TARGET): $(file)
The Android Open Source Projectdd7bc332009-03-03 19:32:55 -080063
64# create some directories (some are mount points)
65DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
66 sbin \
67 dev \
68 proc \
69 sys \
70 system \
71 data \
72 ) \
73 $(TARGET_OUT_DATA)
74
75$(DIRS):
76 @echo Directory: $@
77 @mkdir -p $@
78
79ALL_PREBUILT += $(DIRS)