1LOCAL_PATH := $(call my-dir)
2
3libext2_blkid_src_files := \
4	cache.c \
5	dev.c \
6	devname.c \
7	devno.c \
8	getsize.c \
9	llseek.c \
10	probe.c \
11	read.c \
12	resolve.c \
13	save.c \
14	tag.c \
15	version.c \
16
17
18libext2_blkid_shared_libraries := libext2_uuid
19
20libext2_blkid_system_shared_libraries := libc
21
22libext2_blkid_static_libraries := libext2_uuid_static
23
24libext2_blkid_system_static_libraries := libc
25
26libext2_blkid_c_includes := external/e2fsprogs/lib
27
28libext2_blkid_cflags := -O2 -g -W -Wall -fno-strict-aliasing \
29	-DHAVE_UNISTD_H \
30	-DHAVE_ERRNO_H \
31	-DHAVE_NETINET_IN_H \
32	-DHAVE_SYS_IOCTL_H \
33	-DHAVE_SYS_MMAN_H \
34	-DHAVE_SYS_MOUNT_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_EXT2_IOCTLS \
45	-DHAVE_TYPE_SSIZE_T \
46	-DHAVE_SYS_TIME_H \
47        -DHAVE_SYS_PARAM_H \
48	-DHAVE_SYSCONF
49
50libext2_blkid_cflags_linux := \
51	-DHAVE_LINUX_FD_H \
52	-DHAVE_SYS_PRCTL_H \
53	-DHAVE_LSEEK64 \
54	-DHAVE_LSEEK64_PROTOTYPE
55
56include $(CLEAR_VARS)
57
58LOCAL_SRC_FILES := $(libext2_blkid_src_files)
59LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_blkid_system_shared_libraries)
60LOCAL_SHARED_LIBRARIES := $(libext2_blkid_shared_libraries)
61LOCAL_C_INCLUDES := $(libext2_blkid_c_includes)
62LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux) -fno-strict-aliasing
63LOCAL_MODULE := libext2_blkid
64LOCAL_MODULE_TAGS := optional
65
66include $(BUILD_SHARED_LIBRARY)
67
68include $(CLEAR_VARS)
69
70LOCAL_SRC_FILES := $(libext2_blkid_src_files)
71LOCAL_STATIC_LIBRARIES := $(libext2_blkid_static_libraries) $(libext2_blkid_system_static_libraries)
72LOCAL_C_INCLUDES := $(libext2_blkid_c_includes)
73LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux) -fno-strict-aliasing
74LOCAL_MODULE := libext2_blkid
75LOCAL_MODULE_TAGS := optional
76
77include $(BUILD_STATIC_LIBRARY)
78
79include $(CLEAR_VARS)
80
81LOCAL_SRC_FILES := $(libext2_blkid_src_files)
82LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2_blkid_shared_libraries))
83LOCAL_C_INCLUDES := $(libext2_blkid_c_includes)
84ifeq ($(HOST_OS),linux)
85LOCAL_CFLAGS := $(libext2_blkid_cflags) $(libext2_blkid_cflags_linux)
86else
87LOCAL_CFLAGS := $(libext2_blkid_cflags)
88endif
89LOCAL_MODULE := libext2_blkid-host
90LOCAL_MODULE_TAGS := optional
91
92include $(BUILD_HOST_SHARED_LIBRARY)
93