From 8dafe470fc29cada5f3beab114e2be19fd01dabe Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 6 Jun 2008 15:52:33 -0600 Subject: egl: EGL->DRI adaptor/driver Allows regular DRI drivers to work with libEGL. --- src/egl/drivers/xdri/Makefile | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 src/egl/drivers/xdri/Makefile (limited to 'src/egl/drivers/xdri/Makefile') diff --git a/src/egl/drivers/xdri/Makefile b/src/egl/drivers/xdri/Makefile new file mode 100644 index 0000000000..477a75184a --- /dev/null +++ b/src/egl/drivers/xdri/Makefile @@ -0,0 +1,67 @@ +# src/egl/drivers/xdri/Makefile + +# Build XEGL DRI driver loader library: egl_xdri.so + + +TOP = ../../../.. +include $(TOP)/configs/current + + +DRIVER_NAME = egl_xdri.so + + +INCLUDE_DIRS = \ + -I. \ + -I/usr/include \ + -I/usr/include/drm \ + -I$(TOP)/include \ + -I$(TOP)/include/GL/internal \ + -I$(TOP)/src/mesa/glapi \ + -I$(TOP)/src/mesa/drivers/dri/common \ + -I$(TOP)/src/egl/main \ + -I$(TOP)/src/glx/x11 + +SOURCES = egl_xdri.c + +OBJECTS = $(SOURCES:.c=.o) + +DRM_LIB = `pkg-config --libs libdrm` + + +.c.o: + $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ + + +.PHONY: library + + +default: depend library Makefile + + +library: $(TOP)/$(LIB_DIR)/$(DRIVER_NAME) + + +# Make the egl_xdri.so library +$(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS) + $(TOP)/bin/mklib -o $(DRIVER_NAME) \ + -noprefix \ + -major 1 -minor 0 \ + -install $(TOP)/$(LIB_DIR) \ + -ldl $(OBJECTS) $(DRM_LIB) + + +clean: + rm -f *.o + rm -f *.so + rm -f depend depend.bak + + +depend: $(SOURCES) $(HEADERS) + @ echo "running $(MKDEP)" + @ rm -f depend + @ touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) \ + $(SOURCES) $(HEADERS) >/dev/null 2>/dev/null + +include depend +# DO NOT DELETE -- cgit v1.2.3 From e3b13dba4df0522cce11c55c34a9e3e7d0f3a32c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 9 Jul 2008 15:49:59 -0600 Subject: egl: link libEGL w/ additional libs --- src/egl/drivers/xdri/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/egl/drivers/xdri/Makefile') diff --git a/src/egl/drivers/xdri/Makefile b/src/egl/drivers/xdri/Makefile index 477a75184a..252d00b6c2 100644 --- a/src/egl/drivers/xdri/Makefile +++ b/src/egl/drivers/xdri/Makefile @@ -27,6 +27,8 @@ OBJECTS = $(SOURCES:.c=.o) DRM_LIB = `pkg-config --libs libdrm` +MISC_LIBS = -ldl -lXext -lGL + .c.o: $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ @@ -47,7 +49,7 @@ $(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS) -noprefix \ -major 1 -minor 0 \ -install $(TOP)/$(LIB_DIR) \ - -ldl $(OBJECTS) $(DRM_LIB) + $(OBJECTS) $(DRM_LIB) $(MISC_LIBS) clean: -- cgit v1.2.3 From 912488a8d016834349273acac88be85a6afadcc0 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Thu, 21 Aug 2008 10:40:55 -0700 Subject: egl_dri/egl_xdri: Makefiles should use pkg-config to find libdrm. --- src/egl/drivers/xdri/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/egl/drivers/xdri/Makefile') diff --git a/src/egl/drivers/xdri/Makefile b/src/egl/drivers/xdri/Makefile index 252d00b6c2..9a2b7e0a9d 100644 --- a/src/egl/drivers/xdri/Makefile +++ b/src/egl/drivers/xdri/Makefile @@ -13,7 +13,7 @@ DRIVER_NAME = egl_xdri.so INCLUDE_DIRS = \ -I. \ -I/usr/include \ - -I/usr/include/drm \ + $(shell pkg-config --cflags-only-I libdrm) \ -I$(TOP)/include \ -I$(TOP)/include/GL/internal \ -I$(TOP)/src/mesa/glapi \ -- cgit v1.2.3 From 7d3d5fb7a57d01c99645f30189244287260239f0 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Thu, 21 Aug 2008 10:41:19 -0700 Subject: egl_xdri: Add the top-level lib dir so we link against the libGL we built. --- src/egl/drivers/xdri/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'src/egl/drivers/xdri/Makefile') diff --git a/src/egl/drivers/xdri/Makefile b/src/egl/drivers/xdri/Makefile index 9a2b7e0a9d..afd551dea5 100644 --- a/src/egl/drivers/xdri/Makefile +++ b/src/egl/drivers/xdri/Makefile @@ -48,6 +48,7 @@ $(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS) $(TOP)/bin/mklib -o $(DRIVER_NAME) \ -noprefix \ -major 1 -minor 0 \ + -L $(TOP)/$(LIB_DIR) \ -install $(TOP)/$(LIB_DIR) \ $(OBJECTS) $(DRM_LIB) $(MISC_LIBS) -- cgit v1.2.3 From 5b60d6d07b79124499a1d75a2830cf2e5949d1ad Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 26 Sep 2008 11:16:44 -0600 Subject: egl: remove space after -L flag --- src/egl/drivers/xdri/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/egl/drivers/xdri/Makefile') diff --git a/src/egl/drivers/xdri/Makefile b/src/egl/drivers/xdri/Makefile index afd551dea5..a721b997e6 100644 --- a/src/egl/drivers/xdri/Makefile +++ b/src/egl/drivers/xdri/Makefile @@ -48,7 +48,7 @@ $(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(OBJECTS) $(TOP)/bin/mklib -o $(DRIVER_NAME) \ -noprefix \ -major 1 -minor 0 \ - -L $(TOP)/$(LIB_DIR) \ + -L$(TOP)/$(LIB_DIR) \ -install $(TOP)/$(LIB_DIR) \ $(OBJECTS) $(DRM_LIB) $(MISC_LIBS) -- cgit v1.2.3