blob: b952e362f0f6971d9298f4bb9fc1ae5608e2b546 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001ifneq ($(TARGET_SIMULATOR),true)
Dees_Troy51a0e822012-09-05 15:24:24 -04002
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08003LOCAL_PATH := $(call my-dir)
4include $(CLEAR_VARS)
5
6LOCAL_SRC_FILES := \
7 mtdutils.c \
Michael Bestas5f052552015-01-02 01:45:37 +02008 mounts.c
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08009
Humberto Borbaf58d0ec2014-07-05 12:15:41 -030010ifneq ($(filter rk30xx rk3188,$(TARGET_BOARD_PLATFORM)),)
Kra1o531679362014-06-20 19:06:06 +020011LOCAL_SRC_FILES += rk3xhack.c
12LOCAL_CFLAGS += -DRK3X
Sergey 'Jin' Bostandzhyan80a90ed2013-01-04 02:29:03 +010013endif
14
Michael Bestas5f052552015-01-02 01:45:37 +020015ifeq ($(TARGET_MTD_BY_NAME),true)
16LOCAL_CFLAGS += -DBYNAME
17endif
18
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080019LOCAL_MODULE := libmtdutils
Dees_Troy51a0e822012-09-05 15:24:24 -040020LOCAL_STATIC_LIBRARIES := libcutils libc
Tao Bao80e46e02015-06-03 10:49:29 -070021LOCAL_CLANG := true
Sergey 'Jin' Bostandzhyan80a90ed2013-01-04 02:29:03 +010022
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -080023include $(BUILD_STATIC_LIBRARY)
24
Dees_Troy2673cec2013-04-02 20:22:16 +000025include $(CLEAR_VARS)
26
27LOCAL_SRC_FILES := \
28 mtdutils.c \
Michael Bestas5f052552015-01-02 01:45:37 +020029 mounts.c
Dees_Troy2673cec2013-04-02 20:22:16 +000030
Humberto Borbaf58d0ec2014-07-05 12:15:41 -030031ifneq ($(filter rk30xx rk3188,$(TARGET_BOARD_PLATFORM)),)
Kra1o531679362014-06-20 19:06:06 +020032LOCAL_SRC_FILES += rk3xhack.c
33LOCAL_CFLAGS += -DRK3X
Dees_Troy2673cec2013-04-02 20:22:16 +000034endif
35
Michael Bestas5f052552015-01-02 01:45:37 +020036ifeq ($(TARGET_MTD_BY_NAME),true)
37LOCAL_CFLAGS += -DBYNAME
38endif
39
Dees_Troy2673cec2013-04-02 20:22:16 +000040LOCAL_MODULE := libmtdutils
Ethan Yonker03ea9782014-11-17 09:36:46 -060041LOCAL_SHARED_LIBRARIES := libcutils libc
Tao Bao80e46e02015-06-03 10:49:29 -070042LOCAL_CLANG := true
Dees_Troy2673cec2013-04-02 20:22:16 +000043
44include $(BUILD_SHARED_LIBRARY)
45
jt113419926ec2013-02-18 00:12:37 -060046ifeq ($(BOARD_USES_BML_OVER_MTD),true)
47include $(CLEAR_VARS)
48LOCAL_SRC_FILES := bml_over_mtd.c
Matt Mower55c75ca2014-08-31 11:30:15 -050049LOCAL_C_INCLUDES += $(commands_recovery_local_path)/mtdutils
jt113419926ec2013-02-18 00:12:37 -060050LOCAL_MODULE := libbml_over_mtd
bigbiffd58ba182020-03-23 10:02:29 -040051LOCAL_MODULE_TAGS := optional
jt113419926ec2013-02-18 00:12:37 -060052LOCAL_CFLAGS += -Dmain=bml_over_mtd_main
53include $(BUILD_STATIC_LIBRARY)
54
55include $(CLEAR_VARS)
56LOCAL_SRC_FILES := bml_over_mtd.c
57LOCAL_MODULE := bml_over_mtd
bigbiffd58ba182020-03-23 10:02:29 -040058LOCAL_MODULE_TAGS := optional
jt113419926ec2013-02-18 00:12:37 -060059LOCAL_MODULE_CLASS := UTILITY_EXECUTABLES
60LOCAL_MODULE_PATH := $(PRODUCT_OUT)/utilities
61LOCAL_UNSTRIPPED_PATH := $(PRODUCT_OUT)/symbols/utilities
62LOCAL_MODULE_STEM := bml_over_mtd
Matt Mower55c75ca2014-08-31 11:30:15 -050063LOCAL_C_INCLUDES += $(commands_recovery_local_path)/mtdutils
Ethan Yonker03ea9782014-11-17 09:36:46 -060064LOCAL_SHARED_LIBRARIES := libmtdutils libcutils liblog libc
jt113419926ec2013-02-18 00:12:37 -060065include $(BUILD_EXECUTABLE)
66endif
67
Dees_Troy51a0e822012-09-05 15:24:24 -040068endif # !TARGET_SIMULATOR
69