Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Haitao Huang (1): Android.mk: use LOCAL_COPY_HEADERS to export headers.
Android.mk | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 ++++---- intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Makefile.am | 9 ++++---- intel/sources.mk | 30 +++++++++++++++++++++++++++ sources.mk | 30 +++++++++++++++++++++++++++ 6 files changed, 187 insertions(+), 10 deletions(-) create mode 100644 Android.mk create mode 100644 intel/Android.mk create mode 100644 intel/sources.mk create mode 100644 sources.mk
From: Chad Versace chad.versace@linux.intel.com
Factor the source file list for libdrm.so from Makefile.am into sources.mk. Ditto for libdrm_intel.so.
This is in preparation for adding support for Android. The sources.mk's will be shared between autotools and Android.
Rationale: The most commonly changed parts of any makefile are the source lists. So, by sharing the lists between the two build systems, we can reduce the frequency at which modifications to the Linux build breaks the Android build.
Signed-off-by: Chad Versace chad.versace@linux.intel.com Signed-off-by: Sean V Kelley sean.v.kelley@intel.com Signed-off-by: Tapani Pälli tapani.palli@intel.com --- Makefile.am | 9 ++++----- intel/Makefile.am | 9 ++++----- intel/sources.mk | 30 ++++++++++++++++++++++++++++++ sources.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 intel/sources.mk create mode 100644 sources.mk
diff --git a/Makefile.am b/Makefile.am index 8ecd9d9..b854703 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,9 @@ if HAVE_EXYNOS EXYNOS_SUBDIR = exynos endif
+# Import variable LIBDRM_SOURCES. +include sources.mk + SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) $(OMAP_SUBDIR) $(EXYNOS_SUBDIR) tests include man
libdrm_la_LTLIBRARIES = libdrm.la @@ -59,11 +62,7 @@ libdrm_la_LIBADD = @CLOCK_LIB@ libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm
libdrm_la_SOURCES = \ - xf86drm.c \ - xf86drmHash.c \ - xf86drmRandom.c \ - xf86drmSL.c \ - xf86drmMode.c \ + $(LIBDRM_SOURCES) \ xf86atomic.h \ libdrm_lists.h
diff --git a/intel/Makefile.am b/intel/Makefile.am index f49b099..e937c4b 100644 --- a/intel/Makefile.am +++ b/intel/Makefile.am @@ -22,6 +22,9 @@ # Authors: # Eric Anholt eric@anholt.net
+# Import variable LIBDRM_INTEL_SOURCES. +include sources.mk + AM_CFLAGS = \ $(WARN_CFLAGS) \ -I$(top_srcdir) \ @@ -40,13 +43,9 @@ libdrm_intel_la_LIBADD = ../libdrm.la \ @CLOCK_LIB@
libdrm_intel_la_SOURCES = \ - intel_bufmgr.c \ + $(LIBDRM_INTEL_SOURCES) \ intel_bufmgr_priv.h \ - intel_bufmgr_fake.c \ - intel_bufmgr_gem.c \ - intel_decode.c \ intel_chipset.h \ - mm.c \ mm.h
intel_bufmgr_gem_o_CFLAGS = $(AM_CFLAGS) -c99 diff --git a/intel/sources.mk b/intel/sources.mk new file mode 100644 index 0000000..2f6f744 --- /dev/null +++ b/intel/sources.mk @@ -0,0 +1,30 @@ +# +# Copyright © 2012 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +# for libdrm_intel.so +LIBDRM_INTEL_SOURCES := \ + intel_bufmgr.c \ + intel_bufmgr_fake.c \ + intel_bufmgr_gem.c \ + intel_decode.c \ + mm.c diff --git a/sources.mk b/sources.mk new file mode 100644 index 0000000..19aa059 --- /dev/null +++ b/sources.mk @@ -0,0 +1,30 @@ +# +# Copyright © 2012 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +# for libdrm.so +LIBDRM_SOURCES := \ + xf86drm.c \ + xf86drmHash.c \ + xf86drmRandom.c \ + xf86drmSL.c \ + xf86drmMode.c
On Mon, Oct 08, 2012 at 08:50:24AM +0300, Tapani Pälli wrote:
From: Chad Versace chad.versace@linux.intel.com
Factor the source file list for libdrm.so from Makefile.am into sources.mk. Ditto for libdrm_intel.so.
This is in preparation for adding support for Android. The sources.mk's will be shared between autotools and Android.
Rationale: The most commonly changed parts of any makefile are the source lists. So, by sharing the lists between the two build systems, we can reduce the frequency at which modifications to the Linux build breaks the Android build.
Signed-off-by: Chad Versace chad.versace@linux.intel.com Signed-off-by: Sean V Kelley sean.v.kelley@intel.com Signed-off-by: Tapani Pälli tapani.palli@intel.com
Reviewed-by: Oliver McFadden oliver.mcfadden@linux.intel.com
Makefile.am | 9 ++++----- intel/Makefile.am | 9 ++++----- intel/sources.mk | 30 ++++++++++++++++++++++++++++++ sources.mk | 30 ++++++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 intel/sources.mk create mode 100644 sources.mk
diff --git a/Makefile.am b/Makefile.am index 8ecd9d9..b854703 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,9 @@ if HAVE_EXYNOS EXYNOS_SUBDIR = exynos endif
+# Import variable LIBDRM_SOURCES. +include sources.mk
SUBDIRS = . $(LIBKMS_SUBDIR) $(INTEL_SUBDIR) $(NOUVEAU_SUBDIR) $(RADEON_SUBDIR) $(OMAP_SUBDIR) $(EXYNOS_SUBDIR) tests include man
libdrm_la_LTLIBRARIES = libdrm.la @@ -59,11 +62,7 @@ libdrm_la_LIBADD = @CLOCK_LIB@ libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm
libdrm_la_SOURCES = \
- xf86drm.c \
- xf86drmHash.c \
- xf86drmRandom.c \
- xf86drmSL.c \
- xf86drmMode.c \
- $(LIBDRM_SOURCES) \ xf86atomic.h \ libdrm_lists.h
diff --git a/intel/Makefile.am b/intel/Makefile.am index f49b099..e937c4b 100644 --- a/intel/Makefile.am +++ b/intel/Makefile.am @@ -22,6 +22,9 @@ # Authors: # Eric Anholt eric@anholt.net
+# Import variable LIBDRM_INTEL_SOURCES. +include sources.mk
AM_CFLAGS = \ $(WARN_CFLAGS) \ -I$(top_srcdir) \ @@ -40,13 +43,9 @@ libdrm_intel_la_LIBADD = ../libdrm.la \ @CLOCK_LIB@
libdrm_intel_la_SOURCES = \
- intel_bufmgr.c \
- $(LIBDRM_INTEL_SOURCES) \ intel_bufmgr_priv.h \
- intel_bufmgr_fake.c \
- intel_bufmgr_gem.c \
- intel_decode.c \ intel_chipset.h \
- mm.c \ mm.h
intel_bufmgr_gem_o_CFLAGS = $(AM_CFLAGS) -c99 diff --git a/intel/sources.mk b/intel/sources.mk new file mode 100644 index 0000000..2f6f744 --- /dev/null +++ b/intel/sources.mk @@ -0,0 +1,30 @@ +# +# Copyright © 2012 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +#
+# for libdrm_intel.so +LIBDRM_INTEL_SOURCES := \
- intel_bufmgr.c \
- intel_bufmgr_fake.c \
- intel_bufmgr_gem.c \
- intel_decode.c \
- mm.c
diff --git a/sources.mk b/sources.mk new file mode 100644 index 0000000..19aa059 --- /dev/null +++ b/sources.mk @@ -0,0 +1,30 @@ +# +# Copyright © 2012 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +#
+# for libdrm.so +LIBDRM_SOURCES := \
- xf86drm.c \
- xf86drmHash.c \
- xf86drmRandom.c \
- xf86drmSL.c \
- xf86drmMode.c
-- 1.7.11.7
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
From: Chad Versace chad.versace@linux.intel.com
This enables libdrm.so and libdrm_intel.so to build on Android IceCreamSandwich.
v2: Link libdrm_intel to libpciaccess.
Signed-off-by: Chad Versace chad.versace@linux.intel.com --- Android.mk | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 Android.mk create mode 100644 intel/Android.mk
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..1029dc6 --- /dev/null +++ b/Android.mk @@ -0,0 +1,52 @@ +# +# Copyright © 2011 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +LIBDRM_VALID_GPU_DRIVERS := i915 i965 + +# Skip this makefile if we're not building for a known GPU. +ifneq ($(filter $(BOARD_GPU_DRIVERS), $(LIBDRM_VALID_GPU_DRIVERS)),) + +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LIBDRM_TOP := $(LOCAL_PATH) + +# Import variable LIBDRM_SOURCES. +include $(LOCAL_PATH)/sources.mk + +LOCAL_MODULE := libdrm +LOCAL_MODULE_TAGS := optional + +LOCAL_SRC_FILES := $(LIBDRM_SOURCES) + +LOCAL_C_INCLUDES := \ + $(LIBDRM_TOP)/include/drm + +LOCAL_CFLAGS := \ + -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 + +include $(BUILD_SHARED_LIBRARY) + +include $(LOCAL_PATH)/intel/Android.mk + +endif # BOARD_GPU_DRIVERS diff --git a/intel/Android.mk b/intel/Android.mk new file mode 100644 index 0000000..3647a14 --- /dev/null +++ b/intel/Android.mk @@ -0,0 +1,57 @@ +# +# Copyright © 2011 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# + +LIBDRM_INTEL_VALID_GPU_DRIVERS := i915 i965 + +# Skip this makefile if we're not building for an Intel GPU. +ifneq ($(filter $(BOARD_GPU_DRIVERS), $(LIBDRM_INTEL_VALID_GPU_DRIVERS)),) + +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +# Import variable LIBDRM_INTEL_SOURCES. +include $(LOCAL_PATH)/sources.mk + +LOCAL_MODULE := libdrm_intel +LOCAL_MODULE_TAGS := optional + +LOCAL_SHARED_LIBRARIES := libdrm + +LOCAL_SRC_FILES := $(LIBDRM_INTEL_SOURCES) + +LOCAL_C_INCLUDES := \ + $(LIBDRM_TOP) \ + $(LIBDRM_TOP)/intel \ + $(LIBDRM_TOP)/include/drm \ + external/libpciaccess/include + +LOCAL_CFLAGS := \ + -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 + +LOCAL_SHARED_LIBRARIES := \ + libdrm \ + libpciaccess + +include $(BUILD_SHARED_LIBRARY) + +endif # BOARD_GPU_DRIVERS
On Mon, Oct 08, 2012 at 08:50:25AM +0300, Tapani Pälli wrote:
From: Chad Versace chad.versace@linux.intel.com
This enables libdrm.so and libdrm_intel.so to build on Android IceCreamSandwich.
v2: Link libdrm_intel to libpciaccess.
Signed-off-by: Chad Versace chad.versace@linux.intel.com
Reviewed-by: Oliver McFadden oliver.mcfadden@linux.intel.com
Android.mk | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 Android.mk create mode 100644 intel/Android.mk
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..1029dc6 --- /dev/null +++ b/Android.mk @@ -0,0 +1,52 @@ +# +# Copyright © 2011 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +#
+LIBDRM_VALID_GPU_DRIVERS := i915 i965
+# Skip this makefile if we're not building for a known GPU. +ifneq ($(filter $(BOARD_GPU_DRIVERS), $(LIBDRM_VALID_GPU_DRIVERS)),)
+LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS)
+LIBDRM_TOP := $(LOCAL_PATH)
+# Import variable LIBDRM_SOURCES. +include $(LOCAL_PATH)/sources.mk
+LOCAL_MODULE := libdrm +LOCAL_MODULE_TAGS := optional
+LOCAL_SRC_FILES := $(LIBDRM_SOURCES)
+LOCAL_C_INCLUDES := \
- $(LIBDRM_TOP)/include/drm
+LOCAL_CFLAGS := \
- -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+include $(BUILD_SHARED_LIBRARY)
+include $(LOCAL_PATH)/intel/Android.mk
+endif # BOARD_GPU_DRIVERS diff --git a/intel/Android.mk b/intel/Android.mk new file mode 100644 index 0000000..3647a14 --- /dev/null +++ b/intel/Android.mk @@ -0,0 +1,57 @@ +# +# Copyright © 2011 Intel Corporation +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +#
+LIBDRM_INTEL_VALID_GPU_DRIVERS := i915 i965
+# Skip this makefile if we're not building for an Intel GPU. +ifneq ($(filter $(BOARD_GPU_DRIVERS), $(LIBDRM_INTEL_VALID_GPU_DRIVERS)),)
+LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS)
+# Import variable LIBDRM_INTEL_SOURCES. +include $(LOCAL_PATH)/sources.mk
+LOCAL_MODULE := libdrm_intel +LOCAL_MODULE_TAGS := optional
+LOCAL_SHARED_LIBRARIES := libdrm
+LOCAL_SRC_FILES := $(LIBDRM_INTEL_SOURCES)
+LOCAL_C_INCLUDES := \
- $(LIBDRM_TOP) \
- $(LIBDRM_TOP)/intel \
- $(LIBDRM_TOP)/include/drm \
- external/libpciaccess/include
+LOCAL_CFLAGS := \
- -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_SHARED_LIBRARIES := \
- libdrm \
- libpciaccess
+include $(BUILD_SHARED_LIBRARY)
+endif # BOARD_GPU_DRIVERS
1.7.11.7
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
From: Haitao Huang haitao.huang@intel.com
Export necessary header files used by other components for Android, such as libva intel-driver, gralloc, hwcomposer, etc.
Change-Id: I2feabf6941379ef4d756e942f30eba059de641f1 Signed-off-by: Haitao Huang haitao.huang@intel.com [chad: Fixed inconsistent indentation.] Signed-off-by: Chad Versace chad.versace@linux.intel.com --- Android.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Android.mk b/Android.mk index 1029dc6..68db5df 100644 --- a/Android.mk +++ b/Android.mk @@ -1,5 +1,5 @@ # -# Copyright © 2011 Intel Corporation +# Copyright © 2011-2012 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -45,6 +45,16 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_COPY_HEADERS := \ + xf86drm.h \ + include/drm/drm_fourcc.h \ + include/drm/drm.h \ + include/drm/drm_mode.h \ + include/drm/drm_sarea.h \ + include/drm/i915_drm.h \ + intel/intel_bufmgr.h \ + +LOCAL_COPY_HEADERS_TO := libdrm include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH)/intel/Android.mk
On Mon, Oct 08, 2012 at 08:50:26AM +0300, Tapani Pälli wrote:
From: Haitao Huang haitao.huang@intel.com
Export necessary header files used by other components for Android, such as libva intel-driver, gralloc, hwcomposer, etc.
Change-Id: I2feabf6941379ef4d756e942f30eba059de641f1 Signed-off-by: Haitao Huang haitao.huang@intel.com [chad: Fixed inconsistent indentation.] Signed-off-by: Chad Versace chad.versace@linux.intel.com
Please put "[chad: Fixed inconsistent indentation.]" after the triple-dash, so that it will not be immortalized into the Git history. Otherwise, looks fine, does what it says on the box.
Reviewed-by: Oliver McFadden oliver.mcfadden@linux.intel.com
Android.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/Android.mk b/Android.mk index 1029dc6..68db5df 100644 --- a/Android.mk +++ b/Android.mk @@ -1,5 +1,5 @@ # -# Copyright © 2011 Intel Corporation +# Copyright © 2011-2012 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -45,6 +45,16 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+LOCAL_COPY_HEADERS := \
- xf86drm.h \
- include/drm/drm_fourcc.h \
- include/drm/drm.h \
- include/drm/drm_mode.h \
- include/drm/drm_sarea.h \
- include/drm/i915_drm.h \
- intel/intel_bufmgr.h \
+LOCAL_COPY_HEADERS_TO := libdrm include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH)/intel/Android.mk
1.7.11.7
dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel
Tapani Pälli tapani.palli@intel.com writes:
Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Couldn't this just be done with androgenizer without making a maintenance mess in the upstream code?
On 10/08/2012 06:37 PM, Eric Anholt wrote:
Tapani Pälli tapani.palli@intel.com writes:
Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Couldn't this just be done with androgenizer without making a maintenance mess in the upstream code?
We do not have androgenizer tool in our Android tree but I will check if it can successfully compile libdrm and if we would be able to use it.
My main goal here is to get setup where we could use libdrm master as it is without patching it, we have some additional patches on top of these too but I want to make myself more familiar with those before sending them.
Thanks;
On 10/07/2012 10:50 PM, Tapani Pälli wrote:
Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Haitao Huang (1): Android.mk: use LOCAL_COPY_HEADERS to export headers.
Android.mk | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 ++++---- intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Makefile.am | 9 ++++---- intel/sources.mk | 30 +++++++++++++++++++++++++++ sources.mk | 30 +++++++++++++++++++++++++++
This series looks good to me. Before committing, though, I'd like to see either an Acked-by or an "Sure, whatever" from one of the regular libdrm_intel committers.
-Chad
On 10/10/2012 08:05 PM, Chad Versace wrote:
On 10/07/2012 10:50 PM, Tapani Pälli wrote:
Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Haitao Huang (1): Android.mk: use LOCAL_COPY_HEADERS to export headers.
Android.mk | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 ++++---- intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Makefile.am | 9 ++++---- intel/sources.mk | 30 +++++++++++++++++++++++++++ sources.mk | 30 +++++++++++++++++++++++++++
This series looks good to me. Before committing, though, I'd like to see either an Acked-by or an "Sure, whatever" from one of the regular libdrm_intel committers.
Thanks for checking it out. I've tried out androgenizer as Eric suggested but not really convinced we would like to start using it.
-Chad
On Thu, Oct 11, 2012 at 12:39 PM, Tapani Pälli tapani.palli@intel.com wrote:
On 10/10/2012 08:05 PM, Chad Versace wrote:
On 10/07/2012 10:50 PM, Tapani Pälli wrote:
Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Haitao Huang (1): Android.mk: use LOCAL_COPY_HEADERS to export headers.
Android.mk | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 ++++---- intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Makefile.am | 9 ++++---- intel/sources.mk | 30 +++++++++++++++++++++++++++ sources.mk | 30 +++++++++++++++++++++++++++
This series looks good to me. Before committing, though, I'd like to see either an Acked-by or an "Sure, whatever" from one of the regular libdrm_intel committers.
Thanks for checking it out. I've tried out androgenizer as Eric suggested but not really convinced we would like to start using it.
To bring an pro-argument for Tapani, this is how it looks to make it work with androgenizer. As you can see, it's not much different from the Android.mk itself, only the variable names changes.
diff --git a/Makefile.am b/Makefile.am index 273abf9..b200509 100644 --- a/Makefile.am +++ b/Makefile.am @@ -77,3 +77,23 @@ copy-headers : commit-headers : copy-headers git add include git commit -am "Copy headers from kernel $$(GIT_DIR=$(kernel_source)/.gi + +Android.mk: Makefile.am + androgenizer \ + -:PROJECT testlib \ + -:REL_TOP $(top_srcdir) \ + -:ABS_TOP $(abs_top_srcdir) \ + -:SHARED libdrm \ + -:SOURCES $(LIBDRM_SOURCES) \ + -:LDFLAGS $(libdrm_la_LDFLAGS) \ + -:CPPFLAGS $(libdrm_la_CPPFLAGS) \ + -:TAGS optional\ + -:HEADERS xf86drm.h \ + include/drm/drm_fourcc.h \ + include/drm/drm.h \ + include/drm/drm_mode.h \ + include/drm/drm_sarea.h \ + include/drm/i915_drm.h \ + intel/intel_bufmgr.h \ + -:HEADER_TARGET libdrm \ + > $@
Negreanu Marius groleo@gmail.com writes:
On Thu, Oct 11, 2012 at 12:39 PM, Tapani Pälli tapani.palli@intel.com wrote:
On 10/10/2012 08:05 PM, Chad Versace wrote:
On 10/07/2012 10:50 PM, Tapani Pälli wrote:
Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Haitao Huang (1): Android.mk: use LOCAL_COPY_HEADERS to export headers.
Android.mk | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 ++++---- intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Makefile.am | 9 ++++---- intel/sources.mk | 30 +++++++++++++++++++++++++++ sources.mk | 30 +++++++++++++++++++++++++++
This series looks good to me. Before committing, though, I'd like to see either an Acked-by or an "Sure, whatever" from one of the regular libdrm_intel committers.
Thanks for checking it out. I've tried out androgenizer as Eric suggested but not really convinced we would like to start using it.
To bring an pro-argument for Tapani, this is how it looks to make it work with androgenizer. As you can see, it's not much different from the Android.mk itself, only the variable names changes.
If this is all there is to using androgenizer, I suspect it will stay working for longer than the custom Android.mks. Our experience in Mesa has been that basically any time anybody touches the build system for anything but a file addition, android gets broken. By using androgenizer, hopefully we rely on a tool that reflects the upstream build system better in android, and maybe over time that tool can be improved so that android building of upstream projects is less of a burden (seriously, why should you have to manually name the sources and flags variables?).
That said, doesn't the use of _SOURCES in the LIBDRM_SOURCES variable result in complaints from automake?
On Fri, 12 Oct 2012 15:27:27 -0700 Eric Anholt eric@anholt.net wrote:
Negreanu Marius groleo@gmail.com writes:
On Thu, Oct 11, 2012 at 12:39 PM, Tapani Pälli tapani.palli@intel.com wrote:
On 10/10/2012 08:05 PM, Chad Versace wrote:
On 10/07/2012 10:50 PM, Tapani Pälli wrote:
Upstreaming old set of patches here to enable Android support in libdrm. Some little rebasing was required for the first one.
Chad Versace (2): libdrm,intel: Factor source file lists into sources.mk libdrm,intel: Add Android makefiles (v2)
Haitao Huang (1): Android.mk: use LOCAL_COPY_HEADERS to export headers.
Android.mk | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 9 ++++---- intel/Android.mk | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ intel/Makefile.am | 9 ++++---- intel/sources.mk | 30 +++++++++++++++++++++++++++ sources.mk | 30 +++++++++++++++++++++++++++
This series looks good to me. Before committing, though, I'd like to see either an Acked-by or an "Sure, whatever" from one of the regular libdrm_intel committers.
Thanks for checking it out. I've tried out androgenizer as Eric suggested but not really convinced we would like to start using it.
To bring an pro-argument for Tapani, this is how it looks to make it work with androgenizer. As you can see, it's not much different from the Android.mk itself, only the variable names changes.
If this is all there is to using androgenizer, I suspect it will stay working for longer than the custom Android.mks. Our experience in Mesa has been that basically any time anybody touches the build system for anything but a file addition, android gets broken. By using androgenizer, hopefully we rely on a tool that reflects the upstream build system better in android, and maybe over time that tool can be improved so that android building of upstream projects is less of a burden (seriously, why should you have to manually name the sources and flags variables?).
Some of the benefits of androgenizer are, that it filters the contents of the automake variables you pass to it, so you don't have to manually write only slightly different things in Android-specific files. As you saw, some Android specific code is still needed in the build system:
- to pass the automake variables to androgenizer, which cannot parse automake files itself. This way we let GNU Make parse the automake files, and androgenizer gets the final values.
- a top-level hand-written Android.mk that will execute ./configure and everything related, and cause the androgenizer-generated Android.mk files to be created. We have managed to create such makefiles, that these steps get executed automatically as needed during the full Android system build. Whenever new makefiles are being generated, GNU Make notices that, and automatically restarts the whole build to read them in. (This is not about androgenizer but Android builds in general.)
Androgenizer also fixes up all the file paths to be relative to the Android build root dir, so you don't have to mess with generating file lists with different path prefixes for automake vs. Android builds.
Or at least that is what androgenizer should do, it may have bugs of course. Androgenizer is no magic tool that automatically makes an autotools project building for Android, but it should help with the most common pains.
I have some patches in Androgenizer, and I have androgenized few projects for Collabora. I'd be happy to answer questions about androgenizer. Please, use my work email (cc'd): ppaalanen@gmail.com
Thanks, pq
dri-devel@lists.freedesktop.org