This patch makes EGL/X progs link to libX11. Originally, libEGL linked
to libX11 and thus there was no need for progs to link to libX11.
However, libEGL is changed not to link to libX11, and thus progs should.
There are two reasonings for the change
* libEGL is window system neutral and it is already used on non-X
system.
* It is progs that create native windows. They should link to native
window system libraries.
--
Regards,
olv
>From 646842905d482f64baf27a51b13a945293d394d3 Mon Sep 17 00:00:00 2001
From: Chia-I Wu <olva...@gmail.com>
Date: Wed, 26 Aug 2009 12:44:02 +0800
Subject: [PATCH] progs: EGL/X progs should link to libX11.
Since 5a459d58fca2b71cb77c39f98df8a81ce6298421, libEGL no longer links
to libX11. Add the dependency to affected progs and cleanup
prog/egl/Makefile.
Signed-off-by: Chia-I Wu <olva...@gmail.com>
---
progs/egl/Makefile | 99 +++++++++++-----------------------------
progs/openvg/demos/Makefile | 2 +-
progs/openvg/trivial/Makefile | 2 +-
3 files changed, 29 insertions(+), 74 deletions(-)
diff --git a/progs/egl/Makefile b/progs/egl/Makefile
index fd72f54..7c4787b 100644
--- a/progs/egl/Makefile
+++ b/progs/egl/Makefile
@@ -7,6 +7,9 @@ include $(TOP)/configs/current
INCLUDE_DIRS = -I$(TOP)/include
HEADERS = $(TOP)/include/GLES/egl.h
+LIBS = $(TOP)/$(LIB_DIR)/libEGL.so
+
+LDFLAGS = -L$(TOP)/$(LIB_DIR) -lEGL -lGL
PROGRAMS = \
demo1 \
@@ -30,90 +33,42 @@ PROGRAMS = \
default: $(PROGRAMS)
+demo1: demo1.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
-demo1: demo1.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) demo1.o -L$(TOP)/$(LIB_DIR) -lEGL $(LIBDRM_LIB) -o $@
-
-demo1.o: demo1.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include demo1.c
-
-
-demo2: demo2.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) demo2.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-demo2.o: demo2.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include demo2.c
-
-
-demo3: demo3.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) demo3.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-demo3.o: demo3.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include demo3.c
-
-
-egltri: egltri.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) egltri.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) -o $@
-
-egltri.o: egltri.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include egltri.c
-
+demo2: demo2.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
-eglinfo: eglinfo.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) eglinfo.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) -o $@
+demo3: demo3.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
-eglinfo.o: eglinfo.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include eglinfo.c
+egltri: egltri.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
+eglinfo: eglinfo.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
-eglgears: eglgears.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) eglgears.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
+eglgears: eglgears.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
-eglgears.o: eglgears.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include eglgears.c
+eglscreen: eglscreen.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
-eglscreen: eglscreen.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) $(LDFLAGS) eglscreen.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
+peglgears: peglgears.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBDRM_LIB)
-eglscreen.o: eglscreen.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include eglscreen.c
+xeglbindtex: xeglbindtex.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lX11
-peglgears: peglgears.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) peglgears.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
+xeglgears: xeglgears.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lX11
-peglgears.o: peglgears.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include peglgears.c
-
-
-xeglbindtex: xeglbindtex.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) xeglbindtex.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-xeglbindtex.o: xeglbindtex.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include xeglbindtex.c
-
-xeglgears: xeglgears.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) xeglgears.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-xeglgears.o: xeglgears.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include xeglgears.c
-
-
-xeglthreads: xeglthreads.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) xeglthreads.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-xeglthreads.o: xeglthreads.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include xeglthreads.c
-
-
-xegl_tri: xegl_tri.o $(TOP)/$(LIB_DIR)/libEGL.so
- $(CC) $(CFLAGS) xegl_tri.o -L$(TOP)/$(LIB_DIR) -lEGL -lGL $(LIBDRM_LIB) $(APP_LIB_DEPS) -o $@
-
-xegl_tri.o: xegl_tri.c $(HEADERS)
- $(CC) -c $(CFLAGS) -I$(TOP)/include xegl_tri.c
+xeglthreads: xeglthreads.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lX11
+xegl_tri: xegl_tri.o $(HEADERS) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< -lX11
clean:
-rm -f *.o *~
- -rm -f *.so
-rm -f $(PROGRAMS)
-
diff --git a/progs/openvg/demos/Makefile b/progs/openvg/demos/Makefile
index 6e15342..89b0ce4 100644
--- a/progs/openvg/demos/Makefile
+++ b/progs/openvg/demos/Makefile
@@ -3,7 +3,7 @@
TOP = ../../..
include $(TOP)/configs/current
-VG_LIBS=-lm -pthread -lEGL -lOpenVG
+VG_LIBS=-lm -pthread -lX11 -lEGL -lOpenVG
INCLUDE_DIRS = -I$(TOP)/include
PROGRAMS = \
diff --git a/progs/openvg/trivial/Makefile b/progs/openvg/trivial/Makefile
index 362360e..fcb3484 100644
--- a/progs/openvg/trivial/Makefile
+++ b/progs/openvg/trivial/Makefile
@@ -5,7 +5,7 @@ TOP = ../../../
include $(TOP)/configs/current
INCLUDES = -I. -I$(TOP)/include
-LIBS=-L$(TOP)/$(LIB_DIR) -lm -lEGL -lOpenVG -lpthread
+LIBS=-L$(TOP)/$(LIB_DIR) -lm -lX11 -lEGL -lOpenVG -lpthread
CFLAGS += $(INCLUDES)
HEADERS=eglcommon.h
--
1.6.2.4
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev