blob: 925b98b61b6a42429710fc539356947f088fb48b [file] [log] [blame]
Colin Cross28fa5bc2012-05-20 13:28:05 -07001# Copyright 2010 The Android Open Source Project
2
3LOCAL_PATH:= $(call my-dir)
4
5libsparse_src_files := \
6 backed_block.c \
7 output_file.c \
8 sparse.c \
Colin Crossa21930b2012-04-26 14:24:35 -07009 sparse_crc32.c \
Colin Cross0c4c47f2012-04-25 19:02:58 -070010 sparse_err.c \
11 sparse_read.c
Colin Cross28fa5bc2012-05-20 13:28:05 -070012
Colin Cross28fa5bc2012-05-20 13:28:05 -070013
Joe Onorato20258b52012-07-23 19:15:14 -070014include $(CLEAR_VARS)
Colin Cross28fa5bc2012-05-20 13:28:05 -070015LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
16LOCAL_SRC_FILES := $(libsparse_src_files)
Joe Onorato20258b52012-07-23 19:15:14 -070017LOCAL_MODULE := libsparse_host
Colin Cross28fa5bc2012-05-20 13:28:05 -070018LOCAL_STATIC_LIBRARIES := libz
Trevor Drakea8403002014-12-12 04:19:27 +000019LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070020LOCAL_CFLAGS := -Werror
Colin Cross28fa5bc2012-05-20 13:28:05 -070021include $(BUILD_HOST_STATIC_LIBRARY)
22
Colin Cross28fa5bc2012-05-20 13:28:05 -070023
Joe Onorato20258b52012-07-23 19:15:14 -070024include $(CLEAR_VARS)
Colin Cross28fa5bc2012-05-20 13:28:05 -070025LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
26LOCAL_SRC_FILES := $(libsparse_src_files)
27LOCAL_MODULE := libsparse
Trevor Drakea8403002014-12-12 04:19:27 +000028LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
Joe Onorato20258b52012-07-23 19:15:14 -070029LOCAL_SHARED_LIBRARIES := \
30 libz
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070031LOCAL_CFLAGS := -Werror
Colin Cross28fa5bc2012-05-20 13:28:05 -070032include $(BUILD_SHARED_LIBRARY)
33
Colin Cross28fa5bc2012-05-20 13:28:05 -070034
Joe Onorato20258b52012-07-23 19:15:14 -070035include $(CLEAR_VARS)
Colin Cross28fa5bc2012-05-20 13:28:05 -070036LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
37LOCAL_SRC_FILES := $(libsparse_src_files)
Joe Onorato20258b52012-07-23 19:15:14 -070038LOCAL_MODULE := libsparse_static
Trevor Drakea8403002014-12-12 04:19:27 +000039LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
Colin Cross28fa5bc2012-05-20 13:28:05 -070040LOCAL_STATIC_LIBRARIES := libz
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070041LOCAL_CFLAGS := -Werror
Colin Cross28fa5bc2012-05-20 13:28:05 -070042include $(BUILD_STATIC_LIBRARY)
43
Colin Cross28fa5bc2012-05-20 13:28:05 -070044
Joe Onorato20258b52012-07-23 19:15:14 -070045include $(CLEAR_VARS)
46LOCAL_SRC_FILES := simg2img.c \
47 sparse_crc32.c
48LOCAL_MODULE := simg2img_host
49# Need a unique module name, but exe should still be called simg2img
50LOCAL_MODULE_STEM := simg2img
51LOCAL_STATIC_LIBRARIES := \
52 libsparse_host \
53 libz
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070054LOCAL_CFLAGS := -Werror
Joe Onorato20258b52012-07-23 19:15:14 -070055include $(BUILD_HOST_EXECUTABLE)
56
57
58include $(CLEAR_VARS)
Colin Cross28fa5bc2012-05-20 13:28:05 -070059LOCAL_SRC_FILES := simg2img.c \
60 sparse_crc32.c
61LOCAL_MODULE := simg2img
Joe Onorato20258b52012-07-23 19:15:14 -070062LOCAL_STATIC_LIBRARIES := \
63 libsparse_static \
64 libz
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070065LOCAL_CFLAGS := -Werror
Colin Cross28fa5bc2012-05-20 13:28:05 -070066include $(BUILD_EXECUTABLE)
67
Joe Onorato20258b52012-07-23 19:15:14 -070068
Colin Cross28fa5bc2012-05-20 13:28:05 -070069include $(CLEAR_VARS)
Colin Cross28fa5bc2012-05-20 13:28:05 -070070LOCAL_SRC_FILES := img2simg.c
Joe Onorato20258b52012-07-23 19:15:14 -070071LOCAL_MODULE := img2simg_host
72# Need a unique module name, but exe should still be called simg2img
73LOCAL_MODULE_STEM := img2simg
74LOCAL_STATIC_LIBRARIES := \
75 libsparse_host \
76 libz
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070077LOCAL_CFLAGS := -Werror
Colin Cross28fa5bc2012-05-20 13:28:05 -070078include $(BUILD_HOST_EXECUTABLE)
79
Colin Cross28fa5bc2012-05-20 13:28:05 -070080
Joe Onorato20258b52012-07-23 19:15:14 -070081include $(CLEAR_VARS)
Colin Cross28fa5bc2012-05-20 13:28:05 -070082LOCAL_SRC_FILES := img2simg.c
83LOCAL_MODULE := img2simg
Joe Onorato20258b52012-07-23 19:15:14 -070084LOCAL_STATIC_LIBRARIES := \
85 libsparse_static \
86 libz
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070087LOCAL_CFLAGS := -Werror
Colin Cross28fa5bc2012-05-20 13:28:05 -070088include $(BUILD_EXECUTABLE)
89
Colin Cross28fa5bc2012-05-20 13:28:05 -070090
Colin Cross0e3f47e2014-04-25 14:28:54 -070091ifneq ($(HOST_OS),windows)
92
Joe Onorato20258b52012-07-23 19:15:14 -070093include $(CLEAR_VARS)
Geremy Condrade807f22013-07-08 14:04:02 -070094LOCAL_SRC_FILES := append2simg.c
95LOCAL_MODULE := append2simg
Joe Onorato20258b52012-07-23 19:15:14 -070096LOCAL_STATIC_LIBRARIES := \
97 libsparse_host \
98 libz
Mark Salyzyn8116c8c2014-05-01 09:15:02 -070099LOCAL_CFLAGS := -Werror
Colin Crossbdc6d392012-05-02 15:18:22 -0700100include $(BUILD_HOST_EXECUTABLE)
101
Colin Cross0e3f47e2014-04-25 14:28:54 -0700102endif
Colin Crossbdc6d392012-05-02 15:18:22 -0700103
Joe Onorato20258b52012-07-23 19:15:14 -0700104include $(CLEAR_VARS)
Colin Cross28fa5bc2012-05-20 13:28:05 -0700105LOCAL_MODULE := simg_dump.py
Colin Cross28fa5bc2012-05-20 13:28:05 -0700106LOCAL_SRC_FILES := simg_dump.py
107LOCAL_MODULE_CLASS := EXECUTABLES
108LOCAL_IS_HOST_MODULE := true
Mark Salyzyn8116c8c2014-05-01 09:15:02 -0700109LOCAL_CFLAGS := -Werror
Colin Cross28fa5bc2012-05-20 13:28:05 -0700110include $(BUILD_PREBUILT)