Android.mk revision dc61c9cda5d1b9ec455ff4b26595f523a36557c8
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),generic)
11copy_from += etc/vold.fstab
12endif
13
14# 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#
20copy_from += etc/init.goldfish.sh
21
22copy_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)
40$(INSTALLED_RAMDISK_TARGET): $(file)
41endif
42
43# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
44# to allow -user builds to properly run the dex pre-optimization pass in
45# the emulator.
46file := $(TARGET_ROOT_OUT)/init.goldfish.rc
47$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
48	$(transform-prebuilt-to-target)
49ALL_PREBUILT += $(file)
50
51# create some directories (some are mount points)
52DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
53		sbin \
54		dev \
55		proc \
56		sys \
57		system \
58		data \
59	) \
60	$(TARGET_OUT_DATA)
61
62$(DIRS):
63	@echo Directory: $@
64	@mkdir -p $@
65
66ALL_PREBUILT += $(DIRS)
67