OSDN Git Service

Add support for building on Android
authorSteve Kondik <shade@chemlab.org>
Sun, 7 Jul 2013 07:13:57 +0000 (00:13 -0700)
committerSteve Kondik <shade@chemlab.org>
Mon, 8 Jul 2013 01:23:54 +0000 (18:23 -0700)
Android.mk [new file with mode: 0644]
fsck/Android.mk [new file with mode: 0644]
fuse/Android.mk [new file with mode: 0644]
libexfat/Android.mk [new file with mode: 0644]
libexfat/compiler.h
libexfat/platform.h
mkfs/Android.mk [new file with mode: 0644]

diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..5053e7d
--- /dev/null
@@ -0,0 +1 @@
+include $(call all-subdir-makefiles)
diff --git a/fsck/Android.mk b/fsck/Android.mk
new file mode 100644 (file)
index 0000000..145384a
--- /dev/null
@@ -0,0 +1,16 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := fsck.exfat
+LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64
+LOCAL_SRC_FILES =  main.c
+LOCAL_C_INCLUDES += $(LOCAL_PATH) \
+                                       external/exfat/libexfat \
+                                       external/fuse/include
+LOCAL_SHARED_LIBRARIES += libz libc libexfat libdl 
+LOCAL_STATIC_LIBRARIES += libfuse
+
+include $(BUILD_EXECUTABLE)
+
diff --git a/fuse/Android.mk b/fuse/Android.mk
new file mode 100644 (file)
index 0000000..cf7688f
--- /dev/null
@@ -0,0 +1,15 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := mount.exfat
+LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64
+LOCAL_SRC_FILES = main.c 
+LOCAL_C_INCLUDES += $(LOCAL_PATH) \
+                                       external/exfat/libexfat \
+                                       external/fuse/include \
+                                       external/fuse/android
+LOCAL_SHARED_LIBRARIES += libz libc libexfat libdl 
+LOCAL_STATIC_LIBRARIES += libfuse
+
+include $(BUILD_EXECUTABLE)
diff --git a/libexfat/Android.mk b/libexfat/Android.mk
new file mode 100644 (file)
index 0000000..39a7faa
--- /dev/null
@@ -0,0 +1,12 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libexfat
+LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64
+LOCAL_SRC_FILES = cluster.c io.c log.c lookup.c mount.c node.c time.c utf.c utils.c 
+LOCAL_C_INCLUDES += $(LOCAL_PATH) \
+LOCAL_SHARED_LIBRARIES += libc
+
+include $(BUILD_SHARED_LIBRARY)
index 3bb5278..b102b67 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef COMPILER_H_INCLUDED
 #define COMPILER_H_INCLUDED
 
-#if __STDC_VERSION__ < 199901L
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901L)
 #error C99-compliant compiler is required
 #endif
 
index c7d97e0..1537283 100644 (file)
@@ -38,7 +38,7 @@
 #define __LITTLE_ENDIAN LITTLE_ENDIAN
 #define __BIG_ENDIAN BIG_ENDIAN
 
-#elif defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__)
+#elif defined(__ANDROID__) || defined(__FreeBSD__) || defined(__DragonFlyBSD__) || defined(__NetBSD__)
 
 #include <sys/endian.h>
 #define bswap_16(x) bswap16(x)
diff --git a/mkfs/Android.mk b/mkfs/Android.mk
new file mode 100644 (file)
index 0000000..4ca91bc
--- /dev/null
@@ -0,0 +1,15 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := mkfs.exfat
+LOCAL_MODULE_TAGS := optional
+LOCAL_CFLAGS = -D_FILE_OFFSET_BITS=64
+LOCAL_SRC_FILES =  cbm.c fat.c main.c mkexfat.c rootdir.c uct.c uctc.c vbr.c
+LOCAL_C_INCLUDES += $(LOCAL_PATH) \
+                                       external/exfat/libexfat \
+                                       external/fuse/include
+LOCAL_SHARED_LIBRARIES += libz libc libexfat libdl 
+LOCAL_STATIC_LIBRARIES += libfuse
+
+include $(BUILD_EXECUTABLE)