• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_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 \
13	blkmap64_ba.c \
14	blkmap64_rb.c \
15	blknum.c \
16	block.c \
17	bmap.c \
18	check_desc.c \
19	closefs.c \
20	crc16.c \
21	csum.c \
22	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 \
31	fileio.c \
32	finddev.c \
33	flushb.c \
34	freefs.c \
35	gen_bitmap.c \
36	gen_bitmap64.c \
37	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 \
53	mmp.c \
54	namei.c \
55	native.c \
56	newdir.c \
57	openfs.c \
58	progress.c \
59	punch.c \
60	qcow2.c \
61	read_bb.c \
62	read_bb_file.c \
63	res_gdt.c \
64	rw_bitmaps.c \
65	swapfs.c \
66	symlink.c \
67	tdb.c \
68	undo_io.c \
69	unix_io.c \
70	unlink.c \
71	valid_blk.c \
72	version.c \
73	rbtree.c
74
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
86libext2fs_static_libraries := \
87	libext2_com_err \
88	libext2_uuid_static \
89	libext2_blkid \
90	libext2_e2p
91
92libext2fs_system_static_libraries := libc
93
94libext2fs_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)
130LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
131LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
132LOCAL_MODULE := libext2fs
133LOCAL_MODULE_TAGS := optional
134
135include $(BUILD_SHARED_LIBRARY)
136
137include $(CLEAR_VARS)
138
139LOCAL_SRC_FILES := $(libext2fs_src_files)
140LOCAL_STATIC_LIBRARIES := $(libext2fs_static_libraries) $(libext2fs_system_static_libraries)
141LOCAL_C_INCLUDES := $(libext2fs_c_includes)
142LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
143LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
144LOCAL_MODULE := libext2fs
145LOCAL_MODULE_TAGS := optional
146
147include $(BUILD_STATIC_LIBRARY)
148
149include $(CLEAR_VARS)
150
151LOCAL_SRC_FILES := $(libext2fs_src_files)
152LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2fs_shared_libraries))
153LOCAL_C_INCLUDES := $(libext2fs_c_includes)
154LOCAL_EXPORT_C_INCLUDE_DIRS := $(libext2fs_c_includes)
155ifeq ($(HOST_OS),linux)
156LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
157else
158LOCAL_CFLAGS := $(libext2fs_cflags)
159endif
160LOCAL_MODULE := libext2fs-host
161LOCAL_MODULE_TAGS := optional
162
163include $(BUILD_HOST_SHARED_LIBRARY)
164