aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurt Lien <burt.lien@linaro.org>2016-08-31 16:11:04 +0800
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2016-09-05 15:31:51 +0200
commit56f2441d9ba37e53358108183621985c746e7a10 (patch)
treee94788ce7d9d0bfbb6f46851acd8a953f3750604
parentfc6a8b2b29aceb375aaed226820b50bc3716d6fc (diff)
downloadlibsmaf-56f2441d9ba37e53358108183621985c746e7a10.tar.gz
add makefiles for Android projectsHEADmaster
Signed-off-by: Burt Lien <burt.lien@linaro.org>
-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;
}