egl/drivers: Convert to automake.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
88612029f6
commit
e5f895485e
|
@ -1952,6 +1952,8 @@ AC_CONFIG_FILES([configs/autoconf
|
|||
src/gbm/Makefile
|
||||
src/gbm/main/gbm.pc
|
||||
src/egl/drivers/Makefile
|
||||
src/egl/drivers/dri2/Makefile
|
||||
src/egl/drivers/glx/Makefile
|
||||
src/egl/main/Makefile
|
||||
src/egl/main/egl.pc
|
||||
src/egl/wayland/Makefile
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
# src/egl/drivers/Makefile.template
|
||||
#
|
||||
# Drivers should define
|
||||
#
|
||||
# EGL_DRIVER, the driver name
|
||||
# EGL_SOURCES, the driver sources
|
||||
# EGL_INCLUDES, the include pathes
|
||||
# EGL_CFLAGS, additional CFLAGS
|
||||
# EGL_LIBS, additional LIBS
|
||||
#
|
||||
# before including this template.
|
||||
#
|
||||
|
||||
EGL_OBJECTS = $(EGL_SOURCES:.c=.o)
|
||||
|
||||
all: depend lib$(EGL_DRIVER).a
|
||||
|
||||
lib$(EGL_DRIVER).a: $(EGL_OBJECTS) Makefile $(TOP)/src/egl/drivers/Makefile.template
|
||||
@$(MKLIB) -o $(EGL_DRIVER) -static $(EGL_OBJECTS)
|
||||
|
||||
.c.o:
|
||||
$(CC) -c $(EGL_INCLUDES) $(CFLAGS) $(EGL_CFLAGS) $< -o $@
|
||||
|
||||
install:
|
||||
|
||||
clean:
|
||||
rm -f $(EGL_DRIVER).so
|
||||
rm -f lib$(EGL_DRIVER).a
|
||||
rm -f $(EGL_OBJECTS)
|
||||
rm -f depend depend.bak
|
||||
|
||||
depend: $(EGL_SOURCES)
|
||||
@ echo "running $(MKDEP)"
|
||||
@ rm -f depend
|
||||
@ touch depend
|
||||
$(MKDEP) $(MKDEP_OPTIONS) $(EGL_INCLUDES) $(EGL_SOURCES) \
|
||||
>/dev/null 2>/dev/null
|
||||
|
||||
sinclude depend
|
||||
# DO NOT DELETE
|
|
@ -1,45 +0,0 @@
|
|||
# src/egl/drivers/dri2/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EGL_DRIVER = egl_dri2
|
||||
EGL_SOURCES = egl_dri2.c common.c
|
||||
|
||||
EGL_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/egl/main \
|
||||
-I$(TOP)/src/mapi \
|
||||
-I$(TOP)/src/gbm/main \
|
||||
-I$(TOP)/src/gbm/backends/dri \
|
||||
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
|
||||
$(LIBUDEV_CFLAGS) \
|
||||
$(LIBDRM_CFLAGS)
|
||||
|
||||
EGL_LIBS = $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
|
||||
|
||||
ifeq ($(SHARED_GLAPI),1)
|
||||
EGL_CFLAGS += -DHAVE_SHARED_GLAPI
|
||||
endif
|
||||
|
||||
ifneq ($(findstring x11, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_x11.c
|
||||
EGL_INCLUDES += -DHAVE_X11_PLATFORM $(XCB_DRI2_CFLAGS)
|
||||
EGL_LIBS += $(XCB_DRI2_LIBS)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring drm, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_drm.c
|
||||
EGL_INCLUDES += -DHAVE_DRM_PLATFORM
|
||||
endif
|
||||
|
||||
ifneq ($(findstring wayland, $(EGL_PLATFORMS)),)
|
||||
EGL_SOURCES += platform_wayland.c
|
||||
EGL_INCLUDES += -DHAVE_WAYLAND_PLATFORM $(WAYLAND_CFLAGS) \
|
||||
-I$(TOP)/src/egl/wayland/wayland-egl \
|
||||
-I$(TOP)/src/egl/wayland/wayland-drm
|
||||
EGL_LIBS += $(WAYLAND_LIBS) \
|
||||
$(TOP)/src/egl/wayland/wayland-drm/.libs/libwayland-drm.a
|
||||
endif
|
||||
|
||||
include ../Makefile.template
|
|
@ -0,0 +1,62 @@
|
|||
# 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.
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/egl/main \
|
||||
-I$(top_srcdir)/src/gbm/main \
|
||||
-I$(top_srcdir)/src/gbm/backends/dri \
|
||||
-I$(top_srcdir)/src/egl/wayland/wayland-egl \
|
||||
-I$(top_srcdir)/src/egl/wayland/wayland-drm \
|
||||
$(DEFINES) \
|
||||
$(LIBDRM_CFLAGS) \
|
||||
$(LIBUDEV_CFLAGS) \
|
||||
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\"
|
||||
|
||||
noinst_LTLIBRARIES = libegl_dri2.la
|
||||
|
||||
libegl_dri2_la_SOURCES = \
|
||||
egl_dri2.c \
|
||||
common.c
|
||||
|
||||
libegl_dri2_la_LIBADD = \
|
||||
$(EGL_LIB_DEPS)
|
||||
|
||||
if HAVE_SHARED_GLAPI
|
||||
AM_CFLAGS += -DHAVE_SHARED_GLAPI
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_X11
|
||||
libegl_dri2_la_SOURCES += platform_x11.c
|
||||
AM_CFLAGS += -DHAVE_X11_PLATFORM
|
||||
AM_CFLAGS += $(XCB_DRI2_CFLAGS)
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_WAYLAND
|
||||
libegl_dri2_la_SOURCES += platform_wayland.c
|
||||
AM_CFLAGS += -DHAVE_WAYLAND_PLATFORM
|
||||
AM_CFLAGS += $(WAYLAND_CFLAGS)
|
||||
endif
|
||||
|
||||
if HAVE_EGL_PLATFORM_DRM
|
||||
libegl_dri2_la_SOURCES += platform_drm.c
|
||||
AM_CFLAGS += -DHAVE_DRM_PLATFORM
|
||||
endif
|
|
@ -1,18 +0,0 @@
|
|||
# src/egl/drivers/glx/Makefile
|
||||
|
||||
TOP = ../../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
EGL_DRIVER = egl_glx
|
||||
EGL_SOURCES = egl_glx.c
|
||||
|
||||
EGL_INCLUDES = \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/egl/main
|
||||
|
||||
EGL_CFLAGS = $(X11_CFLAGS)
|
||||
EGL_LIBS = $(X11_LIBS) $(DLOPEN_LIBS)
|
||||
|
||||
EGL_BUILTIN = true
|
||||
|
||||
include ../Makefile.template
|
|
@ -0,0 +1,33 @@
|
|||
# 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.
|
||||
|
||||
AM_CFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/src/egl/main \
|
||||
$(X11_CFLAGS) \
|
||||
$(DEFINES)
|
||||
|
||||
noinst_LTLIBRARIES = libegl_glx.la
|
||||
|
||||
libegl_glx_la_SOURCES = egl_glx.c
|
||||
|
||||
libegl_glx_la_LIBADD = \
|
||||
$(EGL_LIB_DEPS)
|
|
@ -106,14 +106,14 @@ endif
|
|||
|
||||
if HAVE_EGL_DRIVER_GLX
|
||||
AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
|
||||
libEGL_la_LIBADD += ../drivers/glx/libegl_glx.a
|
||||
libEGL_la_LIBADD += ../drivers/glx/libegl_glx.la
|
||||
libEGL_la_LIBADD += $(X11_LIBS) $(DLOPEN_LIBS)
|
||||
endif
|
||||
|
||||
if HAVE_EGL_DRIVER_DRI2
|
||||
AM_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
|
||||
AM_CFLAGS += -DHAVE_XCB_DRI2
|
||||
libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.a
|
||||
libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la
|
||||
libEGL_la_LIBADD += $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIBS)
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue