blob: 05a3079d41efb23c093b2728717712b0d1413605 [file] [log] [blame]
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +01001LOCAL_PATH := $(call my-dir)
2
3libext2fs_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 \
JP Abgralle0ed7402014-03-19 19:08:39 -070013 blkmap64_ba.c \
14 blkmap64_rb.c \
15 blknum.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010016 block.c \
17 bmap.c \
18 check_desc.c \
Alex Deymo62296a92015-09-08 21:18:58 -070019 closefs.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010020 crc16.c \
21 csum.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010022 dblist.c \
23 dblist_dir.c \
24 dirblock.c \
25 dirhash.c \
26 dir_iterate.c \
27 dupfs.c \
28 expanddir.c \
29 ext_attr.c \
30 extent.c \
JP Abgralle0ed7402014-03-19 19:08:39 -070031 fileio.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010032 finddev.c \
33 flushb.c \
34 freefs.c \
35 gen_bitmap.c \
JP Abgralle0ed7402014-03-19 19:08:39 -070036 gen_bitmap64.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010037 get_pathname.c \
38 getsize.c \
39 getsectsize.c \
40 i_block.c \
41 icount.c \
42 ind_block.c \
43 initialize.c \
44 inline.c \
45 inode.c \
46 io_manager.c \
47 ismounted.c \
48 link.c \
49 llseek.c \
50 lookup.c \
51 mkdir.c \
52 mkjournal.c \
Alex Deymo62296a92015-09-08 21:18:58 -070053 mmp.c \
54 namei.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010055 native.c \
56 newdir.c \
57 openfs.c \
JP Abgralle0ed7402014-03-19 19:08:39 -070058 progress.c \
59 punch.c \
Alex Deymo62296a92015-09-08 21:18:58 -070060 qcow2.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010061 read_bb.c \
62 read_bb_file.c \
63 res_gdt.c \
64 rw_bitmaps.c \
65 swapfs.c \
Alex Deymo62296a92015-09-08 21:18:58 -070066 symlink.c \
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010067 tdb.c \
68 undo_io.c \
69 unix_io.c \
70 unlink.c \
71 valid_blk.c \
Alex Deymo62296a92015-09-08 21:18:58 -070072 version.c \
73 rbtree.c
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010074
75# get rid of this?!
76libext2fs_src_files += test_io.c
77
78libext2fs_shared_libraries := \
79 libext2_com_err \
80 libext2_uuid \
81 libext2_blkid \
82 libext2_e2p
83
84libext2fs_system_shared_libraries := libc
85
JP Abgralld25948b2014-11-20 23:19:25 -080086libext2fs_static_libraries := \
87 libext2_com_err \
88 libext2_uuid_static \
89 libext2_blkid \
90 libext2_e2p
91
92libext2fs_system_static_libraries := libc
93
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +010094libext2fs_c_includes := external/e2fsprogs/lib
95
96libext2fs_cflags := -O2 -g -W -Wall \
97 -DHAVE_UNISTD_H \
98 -DHAVE_ERRNO_H \
99 -DHAVE_NETINET_IN_H \
100 -DHAVE_SYS_IOCTL_H \
101 -DHAVE_SYS_MMAN_H \
102 -DHAVE_SYS_MOUNT_H \
103 -DHAVE_SYS_RESOURCE_H \
104 -DHAVE_SYS_SELECT_H \
105 -DHAVE_SYS_STAT_H \
106 -DHAVE_SYS_TYPES_H \
107 -DHAVE_STDLIB_H \
108 -DHAVE_STRDUP \
109 -DHAVE_MMAP \
110 -DHAVE_UTIME_H \
111 -DHAVE_GETPAGESIZE \
112 -DHAVE_EXT2_IOCTLS \
113 -DHAVE_TYPE_SSIZE_T \
114 -DHAVE_SYS_TIME_H \
115 -DHAVE_SYS_PARAM_H \
116 -DHAVE_SYSCONF
117
118libext2fs_cflags_linux := \
119 -DHAVE_LINUX_FD_H \
120 -DHAVE_SYS_PRCTL_H \
121 -DHAVE_LSEEK64 \
122 -DHAVE_LSEEK64_PROTOTYPE
123
124include $(CLEAR_VARS)
125
126LOCAL_SRC_FILES := $(libext2fs_src_files)
127LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2fs_system_shared_libraries)
128LOCAL_SHARED_LIBRARIES := $(libext2fs_shared_libraries)
129LOCAL_C_INCLUDES := $(libext2fs_c_includes)
Alex Deymo941ca9e2015-09-02 19:07:46 -0700130LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +0100131LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +0100132LOCAL_MODULE := libext2fs
133LOCAL_MODULE_TAGS := optional
134
135include $(BUILD_SHARED_LIBRARY)
136
137include $(CLEAR_VARS)
138
139LOCAL_SRC_FILES := $(libext2fs_src_files)
JP Abgralld25948b2014-11-20 23:19:25 -0800140LOCAL_STATIC_LIBRARIES := $(libext2fs_static_libraries) $(libext2fs_system_static_libraries)
141LOCAL_C_INCLUDES := $(libext2fs_c_includes)
Alex Deymo941ca9e2015-09-02 19:07:46 -0700142LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
JP Abgralld25948b2014-11-20 23:19:25 -0800143LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
JP Abgralld25948b2014-11-20 23:19:25 -0800144LOCAL_MODULE := libext2fs
145LOCAL_MODULE_TAGS := optional
146
147include $(BUILD_STATIC_LIBRARY)
148
149include $(CLEAR_VARS)
150
151LOCAL_SRC_FILES := $(libext2fs_src_files)
Alex Deymo771a86a2015-12-09 18:15:25 -0800152LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2fs_shared_libraries))
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +0100153LOCAL_C_INCLUDES := $(libext2fs_c_includes)
Alex Deymo941ca9e2015-09-02 19:07:46 -0700154LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +0100155ifeq ($(HOST_OS),linux)
156LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
157else
158LOCAL_CFLAGS := $(libext2fs_cflags)
159endif
Alex Deymo771a86a2015-12-09 18:15:25 -0800160LOCAL_MODULE := libext2fs-host
Bernhard Rosenkränzer5fe0b412013-12-31 14:13:18 +0100161LOCAL_MODULE_TAGS := optional
162
163include $(BUILD_HOST_SHARED_LIBRARY)