aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Android.mk20
-rw-r--r--lib/Android.mk16
-rw-r--r--tests/test_smaf.c5
3 files changed, 39 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
new file mode 100644
index 0000000..59fbe22
--- /dev/null
+++ b/Android.mk
@@ -0,0 +1,20 @@
+################################################################################
+# Android test_smaf makefile #
+################################################################################
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_CFLAGS += -DANDROID_BUILD
+LOCAL_CFLAGS += -Wall
+
+LOCAL_SRC_FILES += tests/test_smaf.c
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/lib \
+
+LOCAL_SHARED_LIBRARIES := libsmaf
+LOCAL_MODULE := test_smaf
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_EXECUTABLE)
+
+# build smaf lib
+include $(LOCAL_PATH)/lib/Android.mk
diff --git a/lib/Android.mk b/lib/Android.mk
new file mode 100644
index 0000000..7eb182a
--- /dev/null
+++ b/lib/Android.mk
@@ -0,0 +1,16 @@
+################################################################################
+# Android libsmaf makefile #
+################################################################################
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_CFLAGS += -DANDROID_BUILD
+LOCAL_CFLAGS += -Wall
+
+LOCAL_SRC_FILES += libsmaf.c
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH) \
+
+LOCAL_MODULE := libsmaf
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/test_smaf.c b/tests/test_smaf.c
index 86caadf..ad569d9 100644
--- a/tests/test_smaf.c
+++ b/tests/test_smaf.c
@@ -233,11 +233,11 @@ end:
close(fd);
}
-void main (void)
+int main (void)
{
if (smaf_open()) {
printf("Can't open /dev/smaf\n");
- return;
+ return 0;
}
test_create_unnamed();
@@ -253,4 +253,5 @@ void main (void)
test_mmap_secure();
smaf_close();
+ return 0;
}