Android.mk revision 18a1444b4f1e6a0948fd38fa0de382d86cfe04de
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	crc16.c \
20	csum.c \
21	closefs.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	mmp.c \
52	mkdir.c \
53	mkjournal.c \
54	native.c \
55	newdir.c \
56	openfs.c \
57	progress.c \
58	punch.c \
59	rbtree.c \
60	read_bb.c \
61	read_bb_file.c \
62	res_gdt.c \
63	rw_bitmaps.c \
64	swapfs.c \
65	tdb.c \
66	undo_io.c \
67	unix_io.c \
68	unlink.c \
69	valid_blk.c \
70	version.c
71
72# get rid of this?!
73libext2fs_src_files += test_io.c
74
75libext2fs_shared_libraries := \
76	libext2_com_err \
77	libext2_uuid \
78	libext2_blkid \
79	libext2_e2p
80
81libext2fs_system_shared_libraries := libc
82
83libext2fs_c_includes := external/e2fsprogs/lib
84
85libext2fs_cflags := -O2 -g -W -Wall \
86	-DHAVE_UNISTD_H \
87	-DHAVE_ERRNO_H \
88	-DHAVE_NETINET_IN_H \
89	-DHAVE_SYS_IOCTL_H \
90	-DHAVE_SYS_MMAN_H \
91	-DHAVE_SYS_MOUNT_H \
92	-DHAVE_SYS_RESOURCE_H \
93	-DHAVE_SYS_SELECT_H \
94	-DHAVE_SYS_STAT_H \
95	-DHAVE_SYS_TYPES_H \
96	-DHAVE_STDLIB_H \
97	-DHAVE_STRDUP \
98	-DHAVE_MMAP \
99	-DHAVE_UTIME_H \
100	-DHAVE_GETPAGESIZE \
101	-DHAVE_EXT2_IOCTLS \
102	-DHAVE_TYPE_SSIZE_T \
103	-DHAVE_SYS_TIME_H \
104        -DHAVE_SYS_PARAM_H \
105	-DHAVE_SYSCONF
106
107libext2fs_cflags_linux := \
108	-DHAVE_LINUX_FD_H \
109	-DHAVE_SYS_PRCTL_H \
110	-DHAVE_LSEEK64 \
111	-DHAVE_LSEEK64_PROTOTYPE
112
113include $(CLEAR_VARS)
114
115LOCAL_SRC_FILES := $(libext2fs_src_files)
116LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2fs_system_shared_libraries)
117LOCAL_SHARED_LIBRARIES := $(libext2fs_shared_libraries)
118LOCAL_C_INCLUDES := $(libext2fs_c_includes)
119LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
120LOCAL_PRELINK_MODULE := false
121LOCAL_MODULE := libext2fs
122LOCAL_MODULE_TAGS := optional
123
124include $(BUILD_SHARED_LIBRARY)
125
126include $(CLEAR_VARS)
127
128LOCAL_SRC_FILES := $(libext2fs_src_files)
129LOCAL_SHARED_LIBRARIES := $(addsuffix _host, $(libext2fs_shared_libraries))
130LOCAL_C_INCLUDES := $(libext2fs_c_includes)
131ifeq ($(HOST_OS),linux)
132LOCAL_CFLAGS := $(libext2fs_cflags) $(libext2fs_cflags_linux)
133else
134LOCAL_CFLAGS := $(libext2fs_cflags)
135endif
136LOCAL_MODULE := libext2fs_host
137LOCAL_MODULE_TAGS := optional
138
139include $(BUILD_HOST_SHARED_LIBRARY)
140