1# Copyright (C) 2015 The Android Open Source Project 2 3LOCAL_PATH:= $(call my-dir) 4 5# squashfs-tools depends on Linux Kernel specific headers (e.g. sysinfo.h). 6ifeq ($(HOST_OS),linux) 7 8include $(CLEAR_VARS) 9 10# The LOCAL_MODULE name is referenced by the code. Don't change it. 11LOCAL_MODULE := mksquashfs 12 13mksquashfs_files := mksquashfs.c squashfs_fs.h squashfs_swap.h mksquashfs.h \ 14 sort.h pseudo.h compressor.h xattr.h action.h error.h progressbar.h \ 15 info.h caches-queues-lists.h read_fs.h restore.h process_fragments.h 16 17read_fs_files := read_fs.c squashfs_fs.h squashfs_swap.h compressor.h xattr.h \ 18 error.h mksquashfs.h 19 20sort_files := sort.c squashfs_fs.h mksquashfs.h sort.h error.h progressbar.h 21 22swap_files := swap.c 23 24pseudo_files := pseudo.c pseudo.h error.h progressbar.h 25 26compressor_files := compressor.c compressor.h squashfs_fs.h 27 28xattr_files := xattr.c squashfs_fs.h squashfs_swap.h mksquashfs.h xattr.h error.h \ 29 progressbar.h 30 31read_xattrs_files := read_xattrs.c squashfs_fs.h squashfs_swap.h xattr.h error.h 32 33action_files := action.c squashfs_fs.h mksquashfs.h action.h error.h 34 35progressbar_files := progressbar.c error.h 36 37read_file_files := read_file.c error.h 38 39info_files := info.c squashfs_fs.h mksquashfs.h error.h progressbar.h \ 40 caches-queues-lists.h 41 42restore_files := restore.c caches-queues-lists.h squashfs_fs.h mksquashfs.h error.h \ 43 progressbar.h info.h 44 45process_fragments_files := process_fragments.c process_fragments.h 46 47caches_queues_lists_files := caches-queues-lists.c error.h caches-queues-lists.h 48 49gzip_wrapper_files := gzip_wrapper.c squashfs_fs.h gzip_wrapper.h compressor.h 50 51android_files := android.c android.h 52 53lz4_wrapper_files := lz4_wrapper.c squashfs_fs.h lz4_wrapper.h compressor.h 54 55LOCAL_SRC_FILES := $(mksquashfs_files) $(read_fs_files) $(action_files) $(swap_files) \ 56 $(pseudo_files) $(compressor_files) $(sort_files) $(progressbar_files) \ 57 $(read_file_files) $(info_files) $(restore_files) \ 58 $(process_fragments_files) $(caches_queues_lists_files) $(xattr_files) \ 59 $(read_xattrs_files) $(gzip_wrapper_files) $(android_files) \ 60 $(lz4_wrapper_files) 61 62LOCAL_CFLAGS := -I -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -Wall \ 63 -DCOMP_DEFAULT="\"lz4\"" -DGZIP_SUPPORT -DLZ4_SUPPORT -DXATTR_SUPPORT -DXATTR_DEFAULT 64 65LOCAL_LDLIBS := -lpthread -lm -lz 66 67LOCAL_C_INCLUDES := external/lz4/lib 68 69LOCAL_SHARED_LIBRARIES := libcutils libselinux 70LOCAL_STATIC_LIBRARIES := liblz4 71 72LOCAL_MODULE_TAGS := optional 73 74include $(BUILD_HOST_EXECUTABLE) 75 76endif 77