1 LOCAL_PATH
:= $(call my-dir
)
3 #include $(call all-subdir-makefiles)
5 CFLAGS
:= -g
-O1
-Wall
-D_FORTIFY_SOURCE
=2 -include config.h \
6 -DBTRFS_FLAT_INCLUDES
-D_XOPEN_SOURCE
=700 -fno-strict-aliasing
-fPIC
8 LDFLAGS
:= -static
-rdynamic
10 LIBS
:= -luuid
-lblkid
-lz
-llzo2
-L.
-lpthread
11 LIBBTRFS_LIBS
:= $(LIBS
)
13 STATIC_CFLAGS
:= $(CFLAGS
) -ffunction-sections
-fdata-sections
14 STATIC_LDFLAGS
:= -static
-Wl
,--gc-sections
15 STATIC_LIBS
:= -luuid
-lblkid
-luuid
-lz
-llzo2
-L.
-pthread
17 btrfs_shared_libraries
:= libext2_uuid \
20 objects
:= ctree.c disk-io.c radix-tree.c extent-tree.c print-tree.c \
21 root-tree.c dir-item.c file-item.c inode-item.c inode-map.c \
22 extent-cache.c extent_io.c volumes.c utils.c repair.c \
23 qgroup.c raid6.c free-space-cache.c list_sort.c props.c \
24 ulist.c qgroup-verify.c backref.c string-table.c task-utils.c \
25 inode.c file.c find-root.c
26 cmds_objects
:= cmds-subvolume.c cmds-filesystem.c cmds-device.c cmds-scrub.c \
27 cmds-inspect.c cmds-balance.c cmds-send.c cmds-receive.c \
28 cmds-quota.c cmds-qgroup.c cmds-replace.c cmds-check.c \
29 cmds-restore.c cmds-rescue.c chunk-recover.c super-recover.c \
30 cmds-property.c cmds-fi-usage.c
31 libbtrfs_objects
:= send-stream.c send-utils.c rbtree.c btrfs-list.c crc32c.c \
32 uuid-tree.c utils-lib.c rbtree-utils.c
33 libbtrfs_headers
:= send-stream.h send-utils.h send.h rbtree.h btrfs-list.h \
34 crc32c.h list.h kerncompat.h radix-tree.h extent-cache.h \
35 extent_io.h ioctl.h ctree.h btrfsck.h version.h
36 TESTS
:= fsck-tests.sh convert-tests.sh
37 blkid_objects
:= partition
/ superblocks
/ topology
/
40 # external/e2fsprogs/lib is needed for uuid/uuid.h
41 common_C_INCLUDES
:= $(LOCAL_PATH
) external
/e2fsprogs
/lib
/ external
/lzo
/include/ external
/zlib
/
43 #----------------------------------------------------------
45 LOCAL_SRC_FILES
:= $(libbtrfs_objects
)
46 LOCAL_CFLAGS
:= $(STATIC_CFLAGS
)
47 LOCAL_MODULE
:= libbtrfs
48 LOCAL_C_INCLUDES
:= $(common_C_INCLUDES
)
49 include $(BUILD_STATIC_LIBRARY
)
51 #----------------------------------------------------------
54 #LOCAL_FORCE_STATIC_EXECUTABLE := true
61 LOCAL_C_INCLUDES
:= $(common_C_INCLUDES
)
62 LOCAL_CFLAGS
:= $(STATIC_CFLAGS
)
63 #LOCAL_LDLIBS := $(LIBBTRFS_LIBS)
64 #LOCAL_LDFLAGS := $(STATIC_LDFLAGS)
65 LOCAL_SHARED_LIBRARIES
:= $(btrfs_shared_libraries
)
66 LOCAL_STATIC_LIBRARIES
:= libbtrfs liblzo-static libz
67 LOCAL_SYSTEM_SHARED_LIBRARIES
:= libc libcutils
69 LOCAL_EXPORT_C_INCLUDES
:= $(common_C_INCLUDES
)
70 #LOCAL_MODULE_TAGS := optional
71 include $(BUILD_EXECUTABLE
)
73 #----------------------------------------------------------
75 LOCAL_MODULE
:= mkfs.btrfs
80 LOCAL_C_INCLUDES
:= $(common_C_INCLUDES
)
81 LOCAL_CFLAGS
:= $(STATIC_CFLAGS
)
82 #LOCAL_LDLIBS := $(LIBBTRFS_LIBS)
83 #LOCAL_LDFLAGS := $(STATIC_LDFLAGS)
84 LOCAL_SHARED_LIBRARIES
:= $(btrfs_shared_libraries
)
85 LOCAL_STATIC_LIBRARIES
:= libbtrfs liblzo-static
86 LOCAL_SYSTEM_SHARED_LIBRARIES
:= libc libcutils
88 LOCAL_EXPORT_C_INCLUDES
:= $(common_C_INCLUDES
)
89 #LOCAL_MODULE_TAGS := optional
90 include $(BUILD_EXECUTABLE
)
92 #---------------------------------------------------------------
94 LOCAL_MODULE
:= btrfstune
99 LOCAL_C_INCLUDES
:= $(common_C_INCLUDES
)
100 LOCAL_CFLAGS
:= $(STATIC_CFLAGS
)
101 LOCAL_SHARED_LIBRARIES
:= $(btrfs_shared_libraries
)
102 #LOCAL_LDLIBS := $(LIBBTRFS_LIBS)
103 #LOCAL_LDFLAGS := $(STATIC_LDFLAGS)
104 LOCAL_SHARED_LIBRARIES
:= $(btrfs_shared_libraries
)
105 LOCAL_STATIC_LIBRARIES
:= libbtrfs liblzo-static
106 LOCAL_SYSTEM_SHARED_LIBRARIES
:= libc libcutils
108 LOCAL_EXPORT_C_INCLUDES
:= $(common_C_INCLUDES
)
109 LOCAL_MODULE_TAGS
:= optional
110 include $(BUILD_EXECUTABLE
)
111 #--------------------------------------------------------------