OSDN Git Service

Android: fix logcat support building in AOSP.
[android-x86/external-exfat.git] / Android.mk
1 #
2 # Free exFAT implementation.
3 # Copyright (C) 2017  liminghao
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License along
16 # with this program; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 #
19
20 LOCAL_PATH:= $(call my-dir)
21
22 exfat_common_cflags := \
23     -std=gnu99 \
24     -D_FILE_OFFSET_BITS=64 \
25     -DPACKAGE='"exfat"' \
26     -DVERSION='"1.2.8"'
27
28 ########################################
29 # static library: libexfat.a
30
31 libexfat_src_files := \
32     libexfat/cluster.c \
33     libexfat/io.c \
34     libexfat/log.c \
35     libexfat/lookup.c \
36     libexfat/mount.c \
37     libexfat/node.c \
38     libexfat/time.c \
39     libexfat/utf.c \
40     libexfat/utils.c
41
42 libexfat_headers := $(LOCAL_PATH)/libexfat
43
44 libexfat_shared_libraries := \
45     liblog
46
47 ## TARGET ##
48 include $(CLEAR_VARS)
49
50 LOCAL_MODULE := libexfat
51 LOCAL_MODULE_TAGS := optional
52 LOCAL_SRC_FILES := $(libexfat_src_files)
53 LOCAL_CFLAGS := $(exfat_common_cflags)
54 LOCAL_C_INCLUDES := $(libexfat_headers)
55 LOCAL_SHARED_LIBRARIES := $(libexfat_shared_libraries)
56
57 include $(BUILD_STATIC_LIBRARY)
58
59 ## HOST ##
60 include $(CLEAR_VARS)
61
62 LOCAL_MODULE := libexfat
63 LOCAL_MODULE_TAGS := optional
64 LOCAL_SRC_FILES := $(libexfat_src_files)
65 LOCAL_CFLAGS := $(exfat_common_cflags)
66 LOCAL_C_INCLUDES := $(libexfat_headers)
67
68 include $(BUILD_HOST_STATIC_LIBRARY)
69
70
71 ########################################
72 # executable: mkexfatfs
73
74 mkexfatfs_src_files := \
75     mkfs/cbm.c \
76     mkfs/fat.c \
77     mkfs/main.c \
78     mkfs/mkexfat.c \
79     mkfs/rootdir.c \
80     mkfs/uct.c \
81     mkfs/uctc.c \
82     mkfs/vbr.c
83
84 mkexfatfs_headers := \
85     $(libexfat_headers) \
86     $(LOCAL_PATH)/mkfs
87
88 ## TARGET ##
89 include $(CLEAR_VARS)
90
91 LOCAL_MODULE := mkexfatfs
92 LOCAL_MODULE_TAGS := optional
93 LOCAL_SRC_FILES := $(mkexfatfs_src_files)
94 LOCAL_CFLAGS := $(exfat_common_cflags)
95 LOCAL_C_INCLUDES := $(mkexfatfs_headers)
96 LOCAL_STATIC_LIBRARIES := libexfat
97
98 include $(BUILD_EXECUTABLE)
99
100 ## HOST ##
101 include $(CLEAR_VARS)
102
103 LOCAL_MODULE := mkexfatfs
104 LOCAL_MODULE_TAGS := optional
105 LOCAL_SRC_FILES := $(mkexfatfs_src_files)
106 LOCAL_CFLAGS := $(exfat_common_cflags)
107 LOCAL_C_INCLUDES := $(mkexfatfs_headers)
108 LOCAL_STATIC_LIBRARIES := libexfat
109
110 include $(BUILD_HOST_EXECUTABLE)
111
112 ########################################
113 # executable: exfatfsck
114
115 exfatfsck_src_files := fsck/main.c
116
117 exfatfsck_headers := \
118     $(libexfat_headers) \
119     $(LOCAL_PATH)/fsck
120
121 ## TARGET ##
122 include $(CLEAR_VARS)
123
124 LOCAL_MODULE := exfatfsck
125 LOCAL_MODULE_TAGS := optional
126 LOCAL_SRC_FILES := $(exfatfsck_src_files)
127 LOCAL_CFLAGS := $(exfat_common_cflags)
128 LOCAL_C_INCLUDES := $(exfatfsck_headers)
129 LOCAL_STATIC_LIBRARIES := libexfat
130
131 include $(BUILD_EXECUTABLE)
132
133 ## HOST ##
134 include $(CLEAR_VARS)
135
136 LOCAL_MODULE := exfatfsck
137 LOCAL_MODULE_TAGS := optional
138 LOCAL_SRC_FILES := $(exfatfsck_src_files)
139 LOCAL_CFLAGS := $(exfat_common_cflags)
140 LOCAL_C_INCLUDES := $(exfatfsck_headers)
141 LOCAL_STATIC_LIBRARIES := libexfat
142
143 include $(BUILD_HOST_EXECUTABLE)
144
145 ########################################
146 # executable: dumpexfat
147
148 dumpexfat_src_files := dump/main.c
149
150 dumpexfat_headers := \
151     $(libexfat_headers) \
152     $(LOCAL_PATH)/dump
153
154 ## TARGET ##
155 include $(CLEAR_VARS)
156
157 LOCAL_MODULE := dumpexfat
158 LOCAL_MODULE_TAGS := optional
159 LOCAL_SRC_FILES := $(dumpexfat_src_files)
160 LOCAL_CFLAGS := $(exfat_common_cflags)
161 LOCAL_C_INCLUDES := $(dumpexfat_headers)
162 LOCAL_STATIC_LIBRARIES := libexfat
163
164 include $(BUILD_EXECUTABLE)
165
166 ## HOST ##
167 include $(CLEAR_VARS)
168
169 LOCAL_MODULE := dumpexfat
170 LOCAL_MODULE_TAGS := optional
171 LOCAL_SRC_FILES := $(dumpexfat_src_files)
172 LOCAL_CFLAGS := $(exfat_common_cflags)
173 LOCAL_C_INCLUDES := $(dumpexfat_headers)
174 LOCAL_STATIC_LIBRARIES := libexfat
175
176 include $(BUILD_HOST_EXECUTABLE)
177
178 ########################################
179 # executable: exfatlabel
180
181 exfatlabel_src_files := label/main.c
182
183 exfatlabel_headers := \
184     $(libexfat_headers) \
185     $(LOCAL_PATH)/label
186
187 ## TARGET ##
188 include $(CLEAR_VARS)
189
190 LOCAL_MODULE := exfatlabel
191 LOCAL_MODULE_TAGS := optional
192 LOCAL_SRC_FILES := $(exfatlabel_src_files)
193 LOCAL_CFLAGS := $(exfat_common_cflags)
194 LOCAL_C_INCLUDES := $(exfatlabel_headers)
195 LOCAL_STATIC_LIBRARIES := libexfat
196
197 include $(BUILD_EXECUTABLE)
198
199 ## HOST ##
200 include $(CLEAR_VARS)
201
202 LOCAL_MODULE := exfatlabel
203 LOCAL_MODULE_TAGS := optional
204 LOCAL_SRC_FILES := $(exfatlabel_src_files)
205 LOCAL_CFLAGS := $(exfat_common_cflags)
206 LOCAL_C_INCLUDES := $(exfatlabel_headers)
207 LOCAL_STATIC_LIBRARIES := libexfat
208
209 include $(BUILD_HOST_EXECUTABLE)