1LOCAL_PATH := $(call my-dir)
2
3libext2_e2p_src_files := \
4	feature.c \
5	fgetflags.c \
6	fsetflags.c \
7	fgetversion.c \
8	fsetversion.c \
9	getflags.c \
10	getversion.c \
11	hashstr.c \
12	iod.c \
13	ls.c \
14	mntopts.c \
15	parse_num.c \
16	pe.c \
17	pf.c \
18	ps.c \
19	setflags.c \
20	setversion.c \
21	uuid.c \
22	ostype.c \
23	percent.c
24
25libext2_e2p_c_includes := external/e2fsprogs/lib
26
27libext2_e2p_cflags := -O2 -g -W -Wall \
28	-DHAVE_UNISTD_H \
29	-DHAVE_ERRNO_H \
30	-DHAVE_NETINET_IN_H \
31	-DHAVE_SYS_IOCTL_H \
32	-DHAVE_SYS_MMAN_H \
33	-DHAVE_SYS_MOUNT_H \
34	-DHAVE_SYS_PRCTL_H \
35	-DHAVE_SYS_RESOURCE_H \
36	-DHAVE_SYS_SELECT_H \
37	-DHAVE_SYS_STAT_H \
38	-DHAVE_SYS_TYPES_H \
39	-DHAVE_STDLIB_H \
40	-DHAVE_STRDUP \
41	-DHAVE_MMAP \
42	-DHAVE_UTIME_H \
43	-DHAVE_GETPAGESIZE \
44	-DHAVE_LSEEK64 \
45	-DHAVE_LSEEK64_PROTOTYPE \
46	-DHAVE_EXT2_IOCTLS \
47	-DHAVE_LINUX_FD_H \
48	-DHAVE_TYPE_SSIZE_T \
49	-DHAVE_SYS_TIME_H \
50        -DHAVE_SYS_PARAM_H \
51	-DHAVE_SYSCONF
52
53libext2_e2p_system_shared_libraries := libc
54
55libext2_e2p_system_static_libraries := libc
56
57include $(CLEAR_VARS)
58
59LOCAL_SRC_FILES := $(libext2_e2p_src_files)
60LOCAL_C_INCLUDES := $(libext2_e2p_c_includes)
61LOCAL_CFLAGS := $(libext2_e2p_cflags)
62LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_e2p_system_shared_libraries)
63LOCAL_MODULE := libext2_e2p
64LOCAL_MODULE_TAGS := optional
65
66include $(BUILD_SHARED_LIBRARY)
67
68include $(CLEAR_VARS)
69
70LOCAL_SRC_FILES := $(libext2_e2p_src_files)
71LOCAL_C_INCLUDES := $(libext2_e2p_c_includes)
72LOCAL_CFLAGS := $(libext2_e2p_cflags)
73LOCAL_STATIC_LIBRARIES := $(libext2_e2p_system_static_libraries)
74LOCAL_MODULE := libext2_e2p
75LOCAL_MODULE_TAGS := optional
76
77include $(BUILD_STATIC_LIBRARY)
78
79include $(CLEAR_VARS)
80
81LOCAL_SRC_FILES := $(libext2_e2p_src_files)
82LOCAL_C_INCLUDES := $(libext2_e2p_c_includes)
83LOCAL_CFLAGS := $(libext2_e2p_cflags)
84LOCAL_MODULE := libext2_e2p_host
85LOCAL_MODULE_TAGS := optional
86
87include $(BUILD_HOST_SHARED_LIBRARY)
88