aboutsummaryrefslogtreecommitdiffstats
blob: b09e693e15ffe1c0a99c9b13ad678441f1246b2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Copyright 2010-2012, The Android-x86 Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0

# Since this is a directory insight omap, we'll fix the GPU here
BOARD_GPU_DRIVERS := omapdrm

ifneq ($(strip $(BOARD_GPU_DRIVERS)),)

LOCAL_PATH := $(call my-dir)

################ DRM Lib #######################

include $(CLEAR_VARS)

LOCAL_SRC_FILES :=			\
	xf86drm.c			\
	xf86drmHash.c			\
	xf86drmMode.c			\
	xf86drmRandom.c			\
	xf86drmSL.c

LOCAL_C_INCLUDES +=			\
	$(LOCAL_PATH)/include/drm

LOCAL_MODULE := libdrm
LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)

################ OMAP DRM Lib #######################

include $(CLEAR_VARS)

LOCAL_SRC_FILES :=			\
	omap/omap_drm.c			\

LOCAL_C_INCLUDES +=			\
	$(LOCAL_PATH)/include/drm	\
	$(LOCAL_PATH)/omap

LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1

LOCAL_MODULE := libdrm_omap
LOCAL_MODULE_TAGS := optional

LOCAL_SHARED_LIBRARIES := libdrm

include $(BUILD_SHARED_LIBRARY)

################ KMS Lib #######################

include $(CLEAR_VARS)

LOCAL_SRC_FILES :=			\
	libkms/api.c			\
	libkms/dumb.c			\
	libkms/omap.c			\
	libkms/intel.c			\
	libkms/linux.c

LOCAL_C_INCLUDES +=				\
	$(LOCAL_PATH)/include/drm	\
	$(LOCAL_PATH)/omap			\

LOCAL_MODULE := libkms
LOCAL_MODULE_TAGS := optional

LOCAL_SHARED_LIBRARIES := libdrm libdrm_omap

include $(BUILD_SHARED_LIBRARY)

################ Test Apps #######################

include $(CLEAR_VARS)

LOCAL_SRC_FILES :=				\
	tests/modetest/modetest.c		\
	tests/modetest/buffers.c

LOCAL_C_INCLUDES +=				\
	$(LOCAL_PATH)/include/drm		\
	$(LOCAL_PATH)/libkms			\
	$(LOCAL_PATH)/omap			\
	$(LOCAL_PATH)/tests/modetest

LOCAL_MODULE := modetest
LOCAL_MODULE_TAGS := debug

LOCAL_SHARED_LIBRARIES :=			\
	libdrm							\
	libkms							\
	libdrm_omap

include $(BUILD_EXECUTABLE)

endif