]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blob - lib/ext2fs/Android.mk
Add files to build on Android
[thirdparty/e2fsprogs.git] / lib / ext2fs / Android.mk
1 LOCAL_PATH := $(call my-dir)
2
3 libext2fs_src_files := \
4 ext2_err.c \
5 alloc.c \
6 alloc_sb.c \
7 alloc_stats.c \
8 alloc_tables.c \
9 badblocks.c \
10 bb_inode.c \
11 bitmaps.c \
12 bitops.c \
13 blkmap64_ba.c \
14 blkmap64_rb.c \
15 blknum.c \
16 block.c \
17 bmap.c \
18 check_desc.c \
19 crc16.c \
20 crc32c.c \
21 csum.c \
22 closefs.c \
23 dblist.c \
24 dblist_dir.c \
25 dirblock.c \
26 dirhash.c \
27 dir_iterate.c \
28 dupfs.c \
29 expanddir.c \
30 ext_attr.c \
31 extent.c \
32 fileio.c \
33 finddev.c \
34 flushb.c \
35 freefs.c \
36 gen_bitmap.c \
37 gen_bitmap64.c \
38 get_num_dirs.c \
39 get_pathname.c \
40 getsize.c \
41 getsectsize.c \
42 i_block.c \
43 icount.c \
44 ind_block.c \
45 initialize.c \
46 inline.c \
47 inline_data.c \
48 inode.c \
49 io_manager.c \
50 ismounted.c \
51 link.c \
52 llseek.c \
53 lookup.c \
54 mmp.c \
55 mkdir.c \
56 mkjournal.c \
57 namei.c \
58 native.c \
59 newdir.c \
60 openfs.c \
61 progress.c \
62 punch.c \
63 rbtree.c \
64 read_bb.c \
65 read_bb_file.c \
66 res_gdt.c \
67 rw_bitmaps.c \
68 swapfs.c \
69 symlink.c \
70 tdb.c \
71 undo_io.c \
72 unix_io.c \
73 unlink.c \
74 valid_blk.c \
75 version.c
76
77 # get rid of this?!
78 libext2fs_src_files += test_io.c
79
80 libext2fs_shared_libraries := \
81 libext2_com_err \
82 libext2_uuid \
83 libext2_blkid \
84 libext2_e2p
85
86 libext2fs_system_shared_libraries := libc
87
88 libext2fs_c_includes := external/e2fsprogs/lib
89
90 libext2fs_cflags := -O2 -g -W -Wall \
91 -DHAVE_UNISTD_H \
92 -DHAVE_ERRNO_H \
93 -DHAVE_NETINET_IN_H \
94 -DHAVE_SYS_IOCTL_H \
95 -DHAVE_SYS_MMAN_H \
96 -DHAVE_SYS_MOUNT_H \
97 -DHAVE_SYS_RESOURCE_H \
98 -DHAVE_SYS_SELECT_H \
99 -DHAVE_SYS_STAT_H \
100 -DHAVE_SYS_TYPES_H \
101 -DHAVE_STDLIB_H \
102 -DHAVE_STRDUP \
103 -DHAVE_MMAP \
104 -DHAVE_UTIME_H \
105 -DHAVE_GETPAGESIZE \
106 -DHAVE_EXT2_IOCTLS \
107 -DHAVE_TYPE_SSIZE_T \
108 -DHAVE_SYS_TIME_H \
109 -DHAVE_SYS_PARAM_H \
110 -DHAVE_SYSCONF
111
112 libext2fs_cflags_linux := \
113 -DHAVE_MALLOC_H=1 \
114 -DHAVE_LINUX_FD_H=1 \
115 -DHAVE_SYS_PRCTL_H=1 \
116 -DHAVE_LSEEK64=1 \
117 -DHAVE_LSEEK64_PROTOTYPE=1
118
119 include $(CLEAR_VARS)
120
121 LOCAL_SRC_FILES := $(libext2fs_src_files)
122 LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2fs_system_shared_libraries)
123 LOCAL_SHARED_LIBRARIES := $(libext2fs_shared_libraries)
124 LOCAL_C_INCLUDES := $(libext2fs_c_includes)
125 LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
126 LOCAL_MODULE := libext2fs
127 LOCAL_MODULE_TAGS := optional
128
129 include $(BUILD_SHARED_LIBRARY)
130
131 include $(CLEAR_VARS)
132
133 LOCAL_SRC_FILES := $(libext2fs_src_files)
134 LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2fs_shared_libraries))
135 LOCAL_C_INCLUDES := $(libext2fs_c_includes)
136 ifeq ($(HOST_OS),linux)
137 LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
138 else
139 LOCAL_CFLAGS := $(libext2fs_cflags)
140 endif
141 LOCAL_MODULE := libext2fs_host
142 LOCAL_MODULE_TAGS := optional
143
144 include $(BUILD_HOST_SHARED_LIBRARY)