From f5ba2cdeb902993b993187a958aad89c5ac79d6b Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 24 Mar 2010 10:58:45 +0100 Subject: gallium: Move egl drivers to targets Atteched output from git commit: rename src/gallium/{winsys/drm => targets}/Makefile.egl (100%) rename src/gallium/{winsys/drm/intel/egl => targets/egl-i915}/Makefile (86%) rename src/gallium/{winsys/drm/i965/egl => targets/egl-i915}/dummy.c (100%) rename src/gallium/{winsys/drm/i965/egl => targets/egl-i965}/Makefile (86%) rename src/gallium/{winsys/drm/intel/egl => targets/egl-i965}/dummy.c (100%) rename src/gallium/{winsys/drm/nouveau/egl => targets/egl-nouveau}/Makefile (88%) rename src/gallium/{winsys/drm/nouveau/egl => targets/egl-nouveau}/dummy.c (100%) rename src/gallium/{winsys/drm/radeon/egl => targets/egl-radeon}/Makefile (87%) rename src/gallium/{winsys/drm/radeon/egl => targets/egl-radeon}/dummy.c (100%) create mode 100644 src/gallium/targets/egl-swrast/Makefile create mode 100644 src/gallium/targets/egl-swrast/swrast_glue.c rename src/gallium/{winsys/drm/vmware/egl => targets/egl-vmwgfx}/Makefile (86%) rename src/gallium/{winsys/drm/swrast/egl => targets/egl-vmwgfx}/dummy.c (100%) delete mode 100644 src/gallium/winsys/drm/swrast/Makefile delete mode 100644 src/gallium/winsys/drm/swrast/core/Makefile delete mode 100644 src/gallium/winsys/drm/swrast/core/swrast_drm_api.c delete mode 100644 src/gallium/winsys/drm/swrast/egl/Makefile delete mode 100644 src/gallium/winsys/drm/vmware/egl/dummy.c --- src/gallium/targets/Makefile.egl | 64 ++++++++++++++++++++++++++++ src/gallium/targets/egl-i915/Makefile | 14 ++++++ src/gallium/targets/egl-i915/dummy.c | 3 ++ src/gallium/targets/egl-i965/Makefile | 14 ++++++ src/gallium/targets/egl-i965/dummy.c | 3 ++ src/gallium/targets/egl-nouveau/Makefile | 15 +++++++ src/gallium/targets/egl-nouveau/dummy.c | 3 ++ src/gallium/targets/egl-radeon/Makefile | 14 ++++++ src/gallium/targets/egl-radeon/dummy.c | 3 ++ src/gallium/targets/egl-swrast/Makefile | 12 ++++++ src/gallium/targets/egl-swrast/swrast_glue.c | 17 ++++++++ src/gallium/targets/egl-vmwgfx/Makefile | 14 ++++++ src/gallium/targets/egl-vmwgfx/dummy.c | 3 ++ 13 files changed, 179 insertions(+) create mode 100644 src/gallium/targets/Makefile.egl create mode 100644 src/gallium/targets/egl-i915/Makefile create mode 100644 src/gallium/targets/egl-i915/dummy.c create mode 100644 src/gallium/targets/egl-i965/Makefile create mode 100644 src/gallium/targets/egl-i965/dummy.c create mode 100644 src/gallium/targets/egl-nouveau/Makefile create mode 100644 src/gallium/targets/egl-nouveau/dummy.c create mode 100644 src/gallium/targets/egl-radeon/Makefile create mode 100644 src/gallium/targets/egl-radeon/dummy.c create mode 100644 src/gallium/targets/egl-swrast/Makefile create mode 100644 src/gallium/targets/egl-swrast/swrast_glue.c create mode 100644 src/gallium/targets/egl-vmwgfx/Makefile create mode 100644 src/gallium/targets/egl-vmwgfx/dummy.c (limited to 'src/gallium/targets') diff --git a/src/gallium/targets/Makefile.egl b/src/gallium/targets/Makefile.egl new file mode 100644 index 0000000..bc5dd3a --- /dev/null +++ b/src/gallium/targets/Makefile.egl @@ -0,0 +1,64 @@ +# src/gallium/winsys/drm/Makefile.egl + +# The driver Makefile should define +# +# EGL_DRIVER_NAME, the name of the driver +# EGL_DRIVER_SOURCES, the sources of the driver +# EGL_DRIVER_LIBS, extra libraries needed by the driver +# EGL_DRIVER_PIPES, the pipe drivers of the driver +# +# before including this file. + +EGL_DRIVER_OBJECTS = $(EGL_DRIVER_SOURCES:.c=.o) + +common_LIBS = -ldrm -lm -ldl + +x11_ST = $(TOP)/src/gallium/state_trackers/egl/libeglx11.a \ + $(TOP)/src/gallium/winsys/xlib/libws_xlib.a +x11_LIBS = $(common_LIBS) -lX11 -lXext -lXfixes + +kms_ST = $(TOP)/src/gallium/state_trackers/egl/libeglkms.a +kms_LIBS = $(common_LIBS) + +##### RULES ##### + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + + +##### TARGETS ##### + +EGL_DISPLAY_DRIVERS = $(foreach dpy, $(EGL_DISPLAYS), egl_$(dpy)_$(EGL_DRIVER_NAME).so) + +EGL_DISPLAY_LIBS = $(foreach drv, $(EGL_DISPLAY_DRIVERS), $(TOP)/$(LIB_DIR)/$(drv)) + +default: $(EGL_DISPLAY_LIBS) + +$(EGL_DISPLAY_LIBS): $(TOP)/$(LIB_DIR)/%.so: %.so + $(INSTALL) $< $(TOP)/$(LIB_DIR) + +define mklib-egl +$(MKLIB) -o $@ -noprefix -linker '$(CC)' -ldflags '$(LDFLAGS)' \ + $(MKLIB_OPTIONS) $(EGL_DRIVER_OBJECTS) \ + -Wl,--start-group $($(1)_ST) $(EGL_DRIVER_PIPES) \ + $(GALLIUM_AUXILIARIES) -Wl,--end-group \ + $($(1)_LIBS) $(EGL_DRIVER_LIBS) +endef + +egl_x11_$(EGL_DRIVER_NAME).so: $(EGL_DRIVER_OBJECTS) $(x11_ST) $(EGL_DRIVER_PIPES) $(GALLIUM_AUXILIARIES) Makefile + $(call mklib-egl,x11) + +egl_kms_$(EGL_DRIVER_NAME).so: $(EGL_DRIVER_OBJECTS) $(kms_ST) $(EGL_DRIVER_PIPES) $(GALLIUM_AUXILIARIES) Makefile + $(call mklib-egl,kms) + +clean: + -rm -f $(EGL_DRIVER_OBJECTS) + -rm -f $(EGL_DISPLAY_DRIVERS) + +install: $(EGL_DISPLAY_LIBS) + $(INSTALL) -d $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR) + for lib in $(EGL_DISPLAY_LIBS); do \ + $(MINSTALL) -m 755 "$$lib" $(DESTDIR)$(EGL_DRIVER_INSTALL_DIR); \ + done + +depend: diff --git a/src/gallium/targets/egl-i915/Makefile b/src/gallium/targets/egl-i915/Makefile new file mode 100644 index 0000000..596dd09 --- /dev/null +++ b/src/gallium/targets/egl-i915/Makefile @@ -0,0 +1,14 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +EGL_DRIVER_NAME = i915 +EGL_DRIVER_SOURCES = dummy.c +EGL_DRIVER_LIBS = -ldrm_intel + +EGL_DRIVER_PIPES = \ + $(TOP)/src/gallium/winsys/drm/intel/gem/libinteldrm.a \ + $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ + $(TOP)/src/gallium/drivers/trace/libtrace.a \ + $(TOP)/src/gallium/drivers/i915/libi915.a + +include ../Makefile.egl diff --git a/src/gallium/targets/egl-i915/dummy.c b/src/gallium/targets/egl-i915/dummy.c new file mode 100644 index 0000000..3181d0b --- /dev/null +++ b/src/gallium/targets/egl-i915/dummy.c @@ -0,0 +1,3 @@ +/* A poor man's --whole-archive for EGL drivers */ +void *_eglMain(void *); +void *_eglWholeArchive = (void *) _eglMain; diff --git a/src/gallium/targets/egl-i965/Makefile b/src/gallium/targets/egl-i965/Makefile new file mode 100644 index 0000000..e4c1a88 --- /dev/null +++ b/src/gallium/targets/egl-i965/Makefile @@ -0,0 +1,14 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +EGL_DRIVER_NAME = i965 +EGL_DRIVER_SOURCES = dummy.c +EGL_DRIVER_LIBS = -ldrm_intel + +EGL_DRIVER_PIPES = \ + $(TOP)/src/gallium/winsys/drm/i965/gem/libi965drm.a \ + $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ + $(TOP)/src/gallium/drivers/trace/libtrace.a \ + $(TOP)/src/gallium/drivers/i965/libi965.a + +include ../Makefile.egl diff --git a/src/gallium/targets/egl-i965/dummy.c b/src/gallium/targets/egl-i965/dummy.c new file mode 100644 index 0000000..3181d0b --- /dev/null +++ b/src/gallium/targets/egl-i965/dummy.c @@ -0,0 +1,3 @@ +/* A poor man's --whole-archive for EGL drivers */ +void *_eglMain(void *); +void *_eglWholeArchive = (void *) _eglMain; diff --git a/src/gallium/targets/egl-nouveau/Makefile b/src/gallium/targets/egl-nouveau/Makefile new file mode 100644 index 0000000..46fcdf5 --- /dev/null +++ b/src/gallium/targets/egl-nouveau/Makefile @@ -0,0 +1,15 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +EGL_DRIVER_NAME = nouveau +EGL_DRIVER_SOURCES = dummy.c +EGL_DRIVER_LIBS = -ldrm_nouveau + +EGL_DRIVER_PIPES = \ + $(TOP)/src/gallium/winsys/drm/nouveau/drm/libnouveaudrm.a \ + $(TOP)/src/gallium/drivers/nvfx/libnvfx.a \ + $(TOP)/src/gallium/drivers/nv50/libnv50.a \ + $(TOP)/src/gallium/drivers/nouveau/libnouveau.a \ + $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a + +include ../Makefile.egl diff --git a/src/gallium/targets/egl-nouveau/dummy.c b/src/gallium/targets/egl-nouveau/dummy.c new file mode 100644 index 0000000..3181d0b --- /dev/null +++ b/src/gallium/targets/egl-nouveau/dummy.c @@ -0,0 +1,3 @@ +/* A poor man's --whole-archive for EGL drivers */ +void *_eglMain(void *); +void *_eglWholeArchive = (void *) _eglMain; diff --git a/src/gallium/targets/egl-radeon/Makefile b/src/gallium/targets/egl-radeon/Makefile new file mode 100644 index 0000000..5681836 --- /dev/null +++ b/src/gallium/targets/egl-radeon/Makefile @@ -0,0 +1,14 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +EGL_DRIVER_NAME = radeon +EGL_DRIVER_SOURCES = dummy.c +EGL_DRIVER_LIBS = -ldrm_radeon + +EGL_DRIVER_PIPES = \ + $(TOP)/src/gallium/winsys/drm/radeon/core/libradeonwinsys.a \ + $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ + $(TOP)/src/gallium/drivers/trace/libtrace.a \ + $(TOP)/src/gallium/drivers/r300/libr300.a + +include ../Makefile.egl diff --git a/src/gallium/targets/egl-radeon/dummy.c b/src/gallium/targets/egl-radeon/dummy.c new file mode 100644 index 0000000..3181d0b --- /dev/null +++ b/src/gallium/targets/egl-radeon/dummy.c @@ -0,0 +1,3 @@ +/* A poor man's --whole-archive for EGL drivers */ +void *_eglMain(void *); +void *_eglWholeArchive = (void *) _eglMain; diff --git a/src/gallium/targets/egl-swrast/Makefile b/src/gallium/targets/egl-swrast/Makefile new file mode 100644 index 0000000..937343d --- /dev/null +++ b/src/gallium/targets/egl-swrast/Makefile @@ -0,0 +1,12 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +# Do propperly +CFLAGS+="-I$(TOP)/src/gallium/include" + +EGL_DRIVER_NAME = swrast +EGL_DRIVER_SOURCES = swrast_glue.c +EGL_DRIVER_LIBS = +EGL_DRIVER_PIPES = $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a + +include ../Makefile.egl diff --git a/src/gallium/targets/egl-swrast/swrast_glue.c b/src/gallium/targets/egl-swrast/swrast_glue.c new file mode 100644 index 0000000..9db8089 --- /dev/null +++ b/src/gallium/targets/egl-swrast/swrast_glue.c @@ -0,0 +1,17 @@ +#include "state_tracker/drm_api.h" + +static struct drm_api swrast_drm_api = +{ + .name = "swrast", +}; + +struct drm_api * +drm_api_create() +{ + (void) swrast_drm_api; + return NULL; +} + +/* A poor man's --whole-archive for EGL drivers */ +void *_eglMain(void *); +void *_eglWholeArchive = (void *) _eglMain; diff --git a/src/gallium/targets/egl-vmwgfx/Makefile b/src/gallium/targets/egl-vmwgfx/Makefile new file mode 100644 index 0000000..007158a --- /dev/null +++ b/src/gallium/targets/egl-vmwgfx/Makefile @@ -0,0 +1,14 @@ +TOP = ../../../.. +include $(TOP)/configs/current + +EGL_DRIVER_NAME = vmwgfx +EGL_DRIVER_SOURCES = dummy.c +EGL_DRIVER_LIBS = + +EGL_DRIVER_PIPES = \ + $(TOP)/src/gallium/winsys/drm/vmware/core/libsvgadrm.a \ + $(TOP)/src/gallium/drivers/softpipe/libsoftpipe.a \ + $(TOP)/src/gallium/drivers/trace/libtrace.a \ + $(TOP)/src/gallium/drivers/svga/libsvga.a + +include ../Makefile.egl diff --git a/src/gallium/targets/egl-vmwgfx/dummy.c b/src/gallium/targets/egl-vmwgfx/dummy.c new file mode 100644 index 0000000..3181d0b --- /dev/null +++ b/src/gallium/targets/egl-vmwgfx/dummy.c @@ -0,0 +1,3 @@ +/* A poor man's --whole-archive for EGL drivers */ +void *_eglMain(void *); +void *_eglWholeArchive = (void *) _eglMain; -- cgit v1.1