summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@stericsson.com>2012-11-01 16:47:43 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2012-11-01 17:22:24 +0100
commit738e81382a7ad92750fb2ff2343075173cbac90b (patch)
treee18be4210413c7140f2816e1635b13570de8d32e
parentafdf8937f85f7a30648eb1d4fdb30c6f90885c51 (diff)
modetest: Add support for Android build system
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--Android.mk4
-rw-r--r--tests/modetest/Android.mk19
-rw-r--r--tests/modetest/buffers.c3
-rw-r--r--tests/modetest/modetest.c2
4 files changed, 26 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index 39ba22c7..2eeecc58 100644
--- a/Android.mk
+++ b/Android.mk
@@ -1,3 +1,4 @@
+BASE_PATH := $(call my-dir)
LOCAL_PATH := $(call my-dir)
#
@@ -34,4 +35,5 @@ include $(BUILD_SHARED_LIBRARY)
# KMS
#
-include $(LOCAL_PATH)/libkms/Android.mk
+include $(BASE_PATH)/libkms/Android.mk
+include $(BASE_PATH)/tests/modetest/Android.mk
diff --git a/tests/modetest/Android.mk b/tests/modetest/Android.mk
new file mode 100644
index 00000000..3cea6c15
--- /dev/null
+++ b/tests/modetest/Android.mk
@@ -0,0 +1,19 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ buffers.c \
+ modetest.c
+
+LOCAL_MODULE := modetest
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/../.. \
+ $(LOCAL_PATH)/../../include/drm \
+ $(LOCAL_PATH)/../../libkms
+
+LOCAL_SHARED_LIBRARIES := libdrm libkms
+
+include $(BUILD_EXECUTABLE)
diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c
index 50863811..45bd34d3 100644
--- a/tests/modetest/buffers.c
+++ b/tests/modetest/buffers.c
@@ -23,8 +23,9 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
-
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <assert.h>
#include <errno.h>
diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index c91bb9d1..c111c791 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -37,7 +37,9 @@
* TODO: use cairo to write the mode info on the selected output once
* the mode has been programmed, along with possible test patterns.
*/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <assert.h>
#include <stdio.h>