Home | History | Annotate | Download | only in ext4_utils
      1 # Copyright 2010 The Android Open Source Project
      2 
      3 LOCAL_PATH:= $(call my-dir)
      4 
      5 libext4_utils_src_files := \
      6     make_ext4fs.c \
      7     ext4fixup.c \
      8     ext4_utils.c \
      9     allocate.c \
     10     contents.c \
     11     extent.c \
     12     indirect.c \
     13     uuid.c \
     14     sha1.c \
     15     wipe.c \
     16     crc16.c
     17 
     18 #
     19 # -- All host/targets including windows
     20 #
     21 
     22 include $(CLEAR_VARS)
     23 LOCAL_SRC_FILES := $(libext4_utils_src_files)
     24 LOCAL_MODULE := libext4_utils_host
     25 LOCAL_STATIC_LIBRARIES := \
     26     libsparse_host \
     27     libz
     28 ifneq ($(HOST_OS),windows)
     29   LOCAL_STATIC_LIBRARIES += libselinux
     30 endif
     31 include $(BUILD_HOST_STATIC_LIBRARY)
     32 
     33 
     34 include $(CLEAR_VARS)
     35 LOCAL_SRC_FILES := make_ext4fs_main.c
     36 LOCAL_MODULE := make_ext4fs
     37 LOCAL_STATIC_LIBRARIES += \
     38     libext4_utils_host \
     39     libsparse_host \
     40     libz
     41 ifeq ($(HOST_OS),windows)
     42   LOCAL_LDLIBS += -lws2_32
     43 else
     44   LOCAL_STATIC_LIBRARIES += libselinux
     45   LOCAL_CFLAGS := -DHOST
     46 endif
     47 include $(BUILD_HOST_EXECUTABLE)
     48 
     49 
     50 #
     51 # -- All host/targets excluding windows
     52 #
     53 
     54 ifneq ($(HOST_OS),windows)
     55 
     56 include $(CLEAR_VARS)
     57 LOCAL_SRC_FILES := $(libext4_utils_src_files)
     58 LOCAL_MODULE := libext4_utils
     59 LOCAL_SHARED_LIBRARIES := \
     60     libselinux \
     61     libsparse \
     62     libz
     63 include $(BUILD_SHARED_LIBRARY)
     64 
     65 
     66 include $(CLEAR_VARS)
     67 LOCAL_SRC_FILES := $(libext4_utils_src_files)
     68 LOCAL_MODULE := libext4_utils_static
     69 LOCAL_STATIC_LIBRARIES += \
     70     libselinux \
     71     libsparse_static
     72 include $(BUILD_STATIC_LIBRARY)
     73 
     74 
     75 include $(CLEAR_VARS)
     76 LOCAL_SRC_FILES := make_ext4fs_main.c
     77 LOCAL_MODULE := make_ext4fs
     78 LOCAL_SHARED_LIBRARIES := \
     79     libext4_utils \
     80     libselinux \
     81     libz
     82 include $(BUILD_EXECUTABLE)
     83 
     84 
     85 include $(CLEAR_VARS)
     86 LOCAL_SRC_FILES := ext2simg.c
     87 LOCAL_MODULE := ext2simg
     88 LOCAL_SHARED_LIBRARIES += \
     89     libext4_utils \
     90     libselinux \
     91     libsparse \
     92     libz
     93 include $(BUILD_EXECUTABLE)
     94 
     95 
     96 include $(CLEAR_VARS)
     97 LOCAL_SRC_FILES := ext2simg.c
     98 LOCAL_MODULE := ext2simg
     99 LOCAL_STATIC_LIBRARIES += \
    100     libext4_utils_host \
    101     libselinux \
    102     libsparse_host \
    103     libz
    104 include $(BUILD_HOST_EXECUTABLE)
    105 
    106 
    107 include $(CLEAR_VARS)
    108 LOCAL_SRC_FILES := setup_fs.c
    109 LOCAL_MODULE := setup_fs
    110 LOCAL_SHARED_LIBRARIES += libcutils
    111 include $(BUILD_EXECUTABLE)
    112 
    113 
    114 include $(CLEAR_VARS)
    115 LOCAL_SRC_FILES := ext4fixup_main.c
    116 LOCAL_MODULE := ext4fixup
    117 LOCAL_SHARED_LIBRARIES += \
    118     libext4_utils \
    119     libsparse \
    120     libz
    121 include $(BUILD_EXECUTABLE)
    122 
    123 
    124 include $(CLEAR_VARS)
    125 LOCAL_SRC_FILES := ext4fixup_main.c
    126 LOCAL_MODULE := ext4fixup
    127 LOCAL_STATIC_LIBRARIES += \
    128     libext4_utils_host \
    129     libsparse_host \
    130     libz
    131 include $(BUILD_HOST_EXECUTABLE)
    132 
    133 
    134 include $(CLEAR_VARS)
    135 LOCAL_MODULE := mkuserimg.sh
    136 LOCAL_SRC_FILES := mkuserimg.sh
    137 LOCAL_MODULE_CLASS := EXECUTABLES
    138 # We don't need any additional suffix.
    139 LOCAL_MODULE_SUFFIX :=
    140 LOCAL_BUILT_MODULE_STEM := $(notdir $(LOCAL_SRC_FILES))
    141 LOCAL_IS_HOST_MODULE := true
    142 include $(BUILD_PREBUILT)
    143 
    144 endif
    145 
    146