Home | History | Annotate | Download | only in rootdir
      1 LOCAL_PATH:= $(call my-dir)
      2 include $(CLEAR_VARS)
      3 
      4 # files that live under /system/etc/...
      5 
      6 copy_from := \
      7 	etc/dbus.conf \
      8 	etc/hosts
      9 
     10 ifeq ($(TARGET_PRODUCT),full)
     11 copy_from += etc/vold.fstab
     12 endif
     13 
     14 ifeq ($(TARGET_PRODUCT),full_x86)
     15 copy_from += etc/vold.fstab
     16 endif
     17 
     18 # 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 #
     24 copy_from += etc/init.goldfish.sh
     25 
     26 copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
     27 copy_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 
     33 ALL_PREBUILT += $(copy_to)
     34 
     35 
     36 # files that live under /...
     37 
     38 # Only copy init.rc if the target doesn't have its own.
     39 ifneq ($(TARGET_PROVIDES_INIT_RC),true)
     40 file := $(TARGET_ROOT_OUT)/init.rc
     41 $(file) : $(LOCAL_PATH)/init.rc | $(ACP)
     42 	$(transform-prebuilt-to-target)
     43 ALL_PREBUILT += $(file)
     44 $(INSTALLED_RAMDISK_TARGET): $(file)
     45 endif
     46 
     47 file := $(TARGET_ROOT_OUT)/ueventd.rc
     48 $(file) : $(LOCAL_PATH)/ueventd.rc | $(ACP)
     49 	$(transform-prebuilt-to-target)
     50 ALL_PREBUILT += $(file)
     51 $(INSTALLED_RAMDISK_TARGET): $(file)
     52 
     53 # 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.
     56 file := $(TARGET_ROOT_OUT)/init.goldfish.rc
     57 $(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
     58 	$(transform-prebuilt-to-target)
     59 ALL_PREBUILT += $(file)
     60 $(INSTALLED_RAMDISK_TARGET): $(file)
     61 
     62 file := $(TARGET_ROOT_OUT)/ueventd.goldfish.rc
     63 $(file) : $(LOCAL_PATH)/etc/ueventd.goldfish.rc | $(ACP)
     64 	$(transform-prebuilt-to-target)
     65 ALL_PREBUILT += $(file)
     66 $(INSTALLED_RAMDISK_TARGET): $(file)
     67 
     68 # create some directories (some are mount points)
     69 DIRS := $(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 
     83 ALL_PREBUILT += $(DIRS)
     84