aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers')
-rw-r--r--mesalib/src/mesa/drivers/dri/Android.mk62
-rw-r--r--mesalib/src/mesa/drivers/dri/Makefile.defines21
-rw-r--r--mesalib/src/mesa/drivers/dri/common/Android.mk41
-rw-r--r--mesalib/src/mesa/drivers/dri/common/Makefile.sources19
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/Makefile1
-rw-r--r--mesalib/src/mesa/drivers/windows/gdi/wgl.c23
6 files changed, 129 insertions, 38 deletions
diff --git a/mesalib/src/mesa/drivers/dri/Android.mk b/mesalib/src/mesa/drivers/dri/Android.mk
new file mode 100644
index 000000000..b8ccd0c1b
--- /dev/null
+++ b/mesalib/src/mesa/drivers/dri/Android.mk
@@ -0,0 +1,62 @@
+#
+# Copyright (C) 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 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+
+# Import mesa_dri_common_INCLUDES.
+include $(LOCAL_PATH)/common/Makefile.sources
+
+#-----------------------------------------------
+# Variables common to all DRI drivers
+
+MESA_DRI_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/dri
+MESA_DRI_MODULE_UNSTRIPPED_PATH := $(TARGET_OUT_SHARED_LIBRARIES_UNSTRIPPED)/dri
+
+MESA_DRI_C_INCLUDES := \
+ $(addprefix $(MESA_TOP)/, $(mesa_dri_common_INCLUDES)) \
+ $(DRM_TOP) \
+ $(DRM_TOP)/include/drm \
+ external/expat/lib
+
+MESA_DRI_WHOLE_STATIC_LIBRARIES := \
+ libmesa_glsl \
+ libmesa_dri_common \
+ libmesa_dricore
+
+MESA_DRI_SHARED_LIBRARIES := \
+ libcutils \
+ libdl \
+ libdrm \
+ libexpat \
+ libglapi \
+ liblog
+
+#-----------------------------------------------
+# Build drivers and libmesa_dri_common
+
+SUBDIRS := common
+
+ifneq ($(filter i965, $(MESA_GPU_DRIVERS)),)
+ SUBDIRS += i965
+endif
+
+include $(foreach d, $(SUBDIRS), $(LOCAL_PATH)/$(d)/Android.mk)
diff --git a/mesalib/src/mesa/drivers/dri/Makefile.defines b/mesalib/src/mesa/drivers/dri/Makefile.defines
index 19b6de8b8..6ff8df5c0 100644
--- a/mesalib/src/mesa/drivers/dri/Makefile.defines
+++ b/mesalib/src/mesa/drivers/dri/Makefile.defines
@@ -1,15 +1,13 @@
# -*-makefile-*-
+# Import mesa_dri_common_*
+include ../common/Makefile.sources
+
COMMON_GALLIUM_SOURCES = \
- ../common/utils.c \
- ../common/vblank.c \
- ../common/dri_util.c \
- ../common/xmlconfig.c
+ $(addprefix ../common/, $(mesa_dri_common_gallium_SOURCES))
-COMMON_SOURCES = $(COMMON_GALLIUM_SOURCES) \
- ../../common/driverfuncs.c \
- ../common/texmem.c \
- ../common/drirenderbuffer.c
+COMMON_SOURCES = \
+ $(addprefix ../common/, $(mesa_dri_common_SOURCES))
INCLUDES = $(SHARED_INCLUDES) $(EXPAT_INCLUDES)
@@ -21,13 +19,8 @@ OBJECTS = $(C_SOURCES:.c=.o) \
### Include directories
SHARED_INCLUDES = \
-I. \
- -I$(TOP)/src/mesa/drivers/dri/common \
-Iserver \
- -I$(TOP)/include \
- -I$(TOP)/src/mapi \
- -I$(TOP)/src/mesa \
- -I$(TOP)/src/egl/main \
- -I$(TOP)/src/egl/drivers/dri \
+ $(addprefix -I$(TOP)/, $(mesa_dri_common_INCLUDES)) \
$(LIBDRM_CFLAGS)
INCLUDES += $(API_DEFINES)
diff --git a/mesalib/src/mesa/drivers/dri/common/Android.mk b/mesalib/src/mesa/drivers/dri/common/Android.mk
new file mode 100644
index 000000000..76464a153
--- /dev/null
+++ b/mesalib/src/mesa/drivers/dri/common/Android.mk
@@ -0,0 +1,41 @@
+#
+# Mesa 3-D graphics library
+#
+# Copyright (C) 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 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.
+#
+
+#
+# Build libmesa_dri_common
+#
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+include $(LOCAL_PATH)/Makefile.sources
+
+LOCAL_MODULE := libmesa_dri_common
+LOCAL_MODULE_CLASS := STATIC_LIBRARIES
+
+LOCAL_C_INCLUDES := $(MESA_DRI_C_INCLUDES)
+LOCAL_SRC_FILES := $(mesa_dri_common_SOURCES)
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/mesalib/src/mesa/drivers/dri/common/Makefile.sources b/mesalib/src/mesa/drivers/dri/common/Makefile.sources
new file mode 100644
index 000000000..3432dda45
--- /dev/null
+++ b/mesalib/src/mesa/drivers/dri/common/Makefile.sources
@@ -0,0 +1,19 @@
+mesa_dri_common_gallium_SOURCES := \
+ utils.c \
+ vblank.c \
+ dri_util.c \
+ xmlconfig.c
+
+mesa_dri_common_SOURCES := \
+ $(mesa_dri_common_gallium_SOURCES) \
+ texmem.c \
+ drirenderbuffer.c
+
+# Paths are relative to MESA_TOP.
+mesa_dri_common_INCLUDES := \
+ include \
+ src/egl/drivers/dri \
+ src/egl/main \
+ src/mapi \
+ src/mesa \
+ src/mesa/drivers/dri/common
diff --git a/mesalib/src/mesa/drivers/dri/swrast/Makefile b/mesalib/src/mesa/drivers/dri/swrast/Makefile
index 4cb99fd0e..509fa28b6 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/Makefile
+++ b/mesalib/src/mesa/drivers/dri/swrast/Makefile
@@ -20,7 +20,6 @@ C_SOURCES = \
ASM_SOURCES =
SWRAST_COMMON_SOURCES = \
- ../../common/driverfuncs.c \
../common/utils.c \
../common/drisw_util.c
diff --git a/mesalib/src/mesa/drivers/windows/gdi/wgl.c b/mesalib/src/mesa/drivers/windows/gdi/wgl.c
index d9285c420..0756c27cc 100644
--- a/mesalib/src/mesa/drivers/windows/gdi/wgl.c
+++ b/mesalib/src/mesa/drivers/windows/gdi/wgl.c
@@ -29,31 +29,8 @@
*/
-/* We're essentially building part of GDI here, so define this so that
- * we get the right export linkage. */
-#ifdef __MINGW32__
-
-#include <stdarg.h>
-#include <windef.h>
-#include <wincon.h>
-#include <winbase.h>
-
-# if defined(BUILD_GL32)
-# define WINGDIAPI __declspec(dllexport)
-# else
-# define __W32API_USE_DLLIMPORT__
-# endif
-
-#include <wingdi.h>
-#include "GL/mesa_wgl.h"
-#include <stdlib.h>
-
-#else
-
-#define _GDI32_
#include <windows.h>
-#endif
#include "main/config.h"
#include "glapi/glapi.h"
#include "GL/wmesa.h" /* protos for wmesa* functions */