aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Android.common.mk6
-rw-r--r--Android.mk17
-rw-r--r--amdgpu/Android.mk7
-rw-r--r--etnaviv/Android.mk7
-rw-r--r--freedreno/Android.mk7
-rw-r--r--intel/Android.mk7
-rw-r--r--libkms/Android.mk5
-rw-r--r--nouveau/Android.mk7
-rw-r--r--radeon/Android.mk7
-rw-r--r--tests/modetest/Android.mk3
-rw-r--r--tests/proptest/Android.mk3
-rw-r--r--tests/util/Android.mk6
12 files changed, 36 insertions, 46 deletions
diff --git a/Android.common.mk b/Android.common.mk
new file mode 100644
index 00000000..c6ab8f50
--- /dev/null
+++ b/Android.common.mk
@@ -0,0 +1,6 @@
1LOCAL_CFLAGS += \
2 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
3
4# Quiet down the build system and remove any .h files from the sources
5LOCAL_SRC_FILES := $(patsubst %.h, , $(LOCAL_SRC_FILES))
6LOCAL_EXPORT_C_INCLUDE_DIRS += $(LOCAL_PATH)
diff --git a/Android.mk b/Android.mk
index 6ecc4e1c..ec6d5322 100644
--- a/Android.mk
+++ b/Android.mk
@@ -21,6 +21,8 @@
21# IN THE SOFTWARE. 21# IN THE SOFTWARE.
22# 22#
23 23
24LIBDRM_COMMON_MK := $(call my-dir)/Android.common.mk
25
24LOCAL_PATH := $(call my-dir) 26LOCAL_PATH := $(call my-dir)
25include $(CLEAR_VARS) 27include $(CLEAR_VARS)
26 28
@@ -31,7 +33,7 @@ include $(LOCAL_PATH)/Makefile.sources
31include $(CLEAR_VARS) 33include $(CLEAR_VARS)
32LOCAL_MODULE := libdrm 34LOCAL_MODULE := libdrm
33 35
34LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_FILES)) 36LOCAL_SRC_FILES := $(LIBDRM_FILES)
35LOCAL_EXPORT_C_INCLUDE_DIRS := \ 37LOCAL_EXPORT_C_INCLUDE_DIRS := \
36 $(LOCAL_PATH) \ 38 $(LOCAL_PATH) \
37 $(LOCAL_PATH)/include/drm 39 $(LOCAL_PATH)/include/drm
@@ -40,25 +42,26 @@ LOCAL_C_INCLUDES := \
40 $(LOCAL_PATH)/include/drm 42 $(LOCAL_PATH)/include/drm
41 43
42LOCAL_CFLAGS := \ 44LOCAL_CFLAGS := \
43 -DHAVE_VISIBILITY=1 \ 45 -DHAVE_VISIBILITY=1
44 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 46
47include $(LIBDRM_COMMON_MK)
45include $(BUILD_STATIC_LIBRARY) 48include $(BUILD_STATIC_LIBRARY)
46 49
47# Shared library for the device 50# Shared library for the device
48include $(CLEAR_VARS) 51include $(CLEAR_VARS)
49LOCAL_MODULE := libdrm 52LOCAL_MODULE := libdrm
50 53
51LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_FILES)) 54LOCAL_SRC_FILES := $(LIBDRM_FILES)
52LOCAL_EXPORT_C_INCLUDE_DIRS := \ 55LOCAL_EXPORT_C_INCLUDE_DIRS := \
53 $(LOCAL_PATH) \
54 $(LOCAL_PATH)/include/drm 56 $(LOCAL_PATH)/include/drm
55 57
56LOCAL_C_INCLUDES := \ 58LOCAL_C_INCLUDES := \
57 $(LOCAL_PATH)/include/drm 59 $(LOCAL_PATH)/include/drm
58 60
59LOCAL_CFLAGS := \ 61LOCAL_CFLAGS := \
60 -DHAVE_VISIBILITY=1 \ 62 -DHAVE_VISIBILITY=1
61 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 63
64include $(LIBDRM_COMMON_MK)
62include $(BUILD_SHARED_LIBRARY) 65include $(BUILD_SHARED_LIBRARY)
63 66
64include $(call all-makefiles-under,$(LOCAL_PATH)) 67include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/amdgpu/Android.mk b/amdgpu/Android.mk
index 332d9570..bf0611ba 100644
--- a/amdgpu/Android.mk
+++ b/amdgpu/Android.mk
@@ -8,10 +8,7 @@ LOCAL_MODULE := libdrm_amdgpu
8 8
9LOCAL_SHARED_LIBRARIES := libdrm 9LOCAL_SHARED_LIBRARIES := libdrm
10 10
11LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_AMDGPU_FILES)) 11LOCAL_SRC_FILES := $(LIBDRM_AMDGPU_FILES)
12LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
13
14LOCAL_CFLAGS := \
15 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
16 12
13include $(LIBDRM_COMMON_MK)
17include $(BUILD_SHARED_LIBRARY) 14include $(BUILD_SHARED_LIBRARY)
diff --git a/etnaviv/Android.mk b/etnaviv/Android.mk
index a70eeac0..390f9a98 100644
--- a/etnaviv/Android.mk
+++ b/etnaviv/Android.mk
@@ -8,10 +8,7 @@ LOCAL_MODULE := libdrm_etnaviv
8 8
9LOCAL_SHARED_LIBRARIES := libdrm 9LOCAL_SHARED_LIBRARIES := libdrm
10 10
11LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_ETNAVIV_FILES)) 11LOCAL_SRC_FILES := $(LIBDRM_ETNAVIV_FILES)
12LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
13
14LOCAL_CFLAGS := \
15 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
16 12
13include $(LIBDRM_COMMON_MK)
17include $(BUILD_SHARED_LIBRARY) 14include $(BUILD_SHARED_LIBRARY)
diff --git a/freedreno/Android.mk b/freedreno/Android.mk
index d7e80e12..2b582aed 100644
--- a/freedreno/Android.mk
+++ b/freedreno/Android.mk
@@ -8,10 +8,7 @@ LOCAL_MODULE := libdrm_freedreno
8 8
9LOCAL_SHARED_LIBRARIES := libdrm 9LOCAL_SHARED_LIBRARIES := libdrm
10 10
11LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_FREEDRENO_FILES)) 11LOCAL_SRC_FILES := $(LIBDRM_FREEDRENO_FILES)
12LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
13
14LOCAL_CFLAGS := \
15 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
16 12
13include $(LIBDRM_COMMON_MK)
17include $(BUILD_SHARED_LIBRARY) 14include $(BUILD_SHARED_LIBRARY)
diff --git a/intel/Android.mk b/intel/Android.mk
index e7ec5a57..5407ff3e 100644
--- a/intel/Android.mk
+++ b/intel/Android.mk
@@ -29,14 +29,11 @@ include $(LOCAL_PATH)/Makefile.sources
29 29
30LOCAL_MODULE := libdrm_intel 30LOCAL_MODULE := libdrm_intel
31 31
32LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_INTEL_FILES)) 32LOCAL_SRC_FILES := $(LIBDRM_INTEL_FILES)
33LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
34
35LOCAL_CFLAGS := \
36 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
37 33
38LOCAL_SHARED_LIBRARIES := \ 34LOCAL_SHARED_LIBRARIES := \
39 libdrm \ 35 libdrm \
40 libpciaccess 36 libpciaccess
41 37
38include $(LIBDRM_COMMON_MK)
42include $(BUILD_SHARED_LIBRARY) 39include $(BUILD_SHARED_LIBRARY)
diff --git a/libkms/Android.mk b/libkms/Android.mk
index 0259ffbb..0be72054 100644
--- a/libkms/Android.mk
+++ b/libkms/Android.mk
@@ -26,7 +26,7 @@ LOCAL_PATH := $(call my-dir)
26include $(CLEAR_VARS) 26include $(CLEAR_VARS)
27include $(LOCAL_PATH)/Makefile.sources 27include $(LOCAL_PATH)/Makefile.sources
28 28
29LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBKMS_FILES)) 29LOCAL_SRC_FILES := $(LIBKMS_FILES)
30 30
31ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),) 31ifneq ($(filter $(vmwgfx_drivers), $(DRM_GPU_DRIVERS)),)
32LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES) 32LOCAL_SRC_FILES += $(LIBKMS_VMWGFX_FILES)
@@ -47,6 +47,5 @@ endif
47LOCAL_MODULE := libkms 47LOCAL_MODULE := libkms
48LOCAL_SHARED_LIBRARIES := libdrm 48LOCAL_SHARED_LIBRARIES := libdrm
49 49
50LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) 50include $(LIBDRM_COMMON_MK)
51
52include $(BUILD_SHARED_LIBRARY) 51include $(BUILD_SHARED_LIBRARY)
diff --git a/nouveau/Android.mk b/nouveau/Android.mk
index 451f9a73..b430af4f 100644
--- a/nouveau/Android.mk
+++ b/nouveau/Android.mk
@@ -8,10 +8,7 @@ LOCAL_MODULE := libdrm_nouveau
8 8
9LOCAL_SHARED_LIBRARIES := libdrm 9LOCAL_SHARED_LIBRARIES := libdrm
10 10
11LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_NOUVEAU_FILES)) 11LOCAL_SRC_FILES := $(LIBDRM_NOUVEAU_FILES)
12LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
13
14LOCAL_CFLAGS := \
15 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
16 12
13include $(LIBDRM_COMMON_MK)
17include $(BUILD_SHARED_LIBRARY) 14include $(BUILD_SHARED_LIBRARY)
diff --git a/radeon/Android.mk b/radeon/Android.mk
index 57cbc92a..71040dab 100644
--- a/radeon/Android.mk
+++ b/radeon/Android.mk
@@ -8,10 +8,7 @@ LOCAL_MODULE := libdrm_radeon
8 8
9LOCAL_SHARED_LIBRARIES := libdrm 9LOCAL_SHARED_LIBRARIES := libdrm
10 10
11LOCAL_SRC_FILES := $(patsubst %.h, , $(LIBDRM_RADEON_FILES)) 11LOCAL_SRC_FILES := $(LIBDRM_RADEON_FILES)
12LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
13
14LOCAL_CFLAGS := \
15 -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
16 12
13include $(LIBDRM_COMMON_MK)
17include $(BUILD_SHARED_LIBRARY) 14include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/modetest/Android.mk b/tests/modetest/Android.mk
index 6a7f4069..c1a71fd9 100644
--- a/tests/modetest/Android.mk
+++ b/tests/modetest/Android.mk
@@ -3,11 +3,12 @@ LOCAL_PATH := $(call my-dir)
3include $(CLEAR_VARS) 3include $(CLEAR_VARS)
4include $(LOCAL_PATH)/Makefile.sources 4include $(LOCAL_PATH)/Makefile.sources
5 5
6LOCAL_SRC_FILES := $(patsubst %.h, , $(MODETEST_FILES)) 6LOCAL_SRC_FILES := $(MODETEST_FILES)
7 7
8LOCAL_MODULE := modetest 8LOCAL_MODULE := modetest
9 9
10LOCAL_SHARED_LIBRARIES := libdrm 10LOCAL_SHARED_LIBRARIES := libdrm
11LOCAL_STATIC_LIBRARIES := libdrm_util 11LOCAL_STATIC_LIBRARIES := libdrm_util
12 12
13include $(LIBDRM_COMMON_MK)
13include $(BUILD_EXECUTABLE) 14include $(BUILD_EXECUTABLE)
diff --git a/tests/proptest/Android.mk b/tests/proptest/Android.mk
index badeb588..91a590fc 100644
--- a/tests/proptest/Android.mk
+++ b/tests/proptest/Android.mk
@@ -3,11 +3,12 @@ LOCAL_PATH := $(call my-dir)
3include $(CLEAR_VARS) 3include $(CLEAR_VARS)
4include $(LOCAL_PATH)/Makefile.sources 4include $(LOCAL_PATH)/Makefile.sources
5 5
6LOCAL_SRC_FILES := $(patsubst %.h, , $(PROPTEST_FILES)) 6LOCAL_SRC_FILES := $(PROPTEST_FILES)
7 7
8LOCAL_MODULE := proptest 8LOCAL_MODULE := proptest
9 9
10LOCAL_SHARED_LIBRARIES := libdrm 10LOCAL_SHARED_LIBRARIES := libdrm
11LOCAL_STATIC_LIBRARIES := libdrm_util 11LOCAL_STATIC_LIBRARIES := libdrm_util
12 12
13include $(LIBDRM_COMMON_MK)
13include $(BUILD_EXECUTABLE) 14include $(BUILD_EXECUTABLE)
diff --git a/tests/util/Android.mk b/tests/util/Android.mk
index c9d087e3..7656c4c2 100644
--- a/tests/util/Android.mk
+++ b/tests/util/Android.mk
@@ -30,9 +30,7 @@ LOCAL_MODULE := libdrm_util
30 30
31LOCAL_SHARED_LIBRARIES := libdrm 31LOCAL_SHARED_LIBRARIES := libdrm
32 32
33LOCAL_SRC_FILES := $(patsubst %.h, , $(UTIL_FILES)) 33LOCAL_SRC_FILES := $(UTIL_FILES)
34
35# avoid name clashes by requiring users to include util/*.h
36LOCAL_EXPORT_C_INCLUDE_DIRS := $(dir $(LOCAL_PATH))
37 34
35include $(LIBDRM_COMMON_MK)
38include $(BUILD_STATIC_LIBRARY) 36include $(BUILD_STATIC_LIBRARY)