summaryrefslogtreecommitdiffstats
path: root/src/egl/main/Makefile
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2011-01-07 16:30:08 +0800
committerChia-I Wu <[email protected]>2011-01-10 11:50:34 +0800
commitc98ea26e16b6458b4385d6558936696e4d099455 (patch)
treeca75d5d0355fe29e95375db7683e13e26e80fc5b /src/egl/main/Makefile
parent15f0223931e32ef5ff82b39a2b6c433400edbd9d (diff)
egl: Make egl_dri2 and egl_glx built-in drivers.
These two drivers are small in size. Making them built-in should simplify packaging.
Diffstat (limited to 'src/egl/main/Makefile')
-rw-r--r--src/egl/main/Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
index b4ca20c094a..0eb309c1969 100644
--- a/src/egl/main/Makefile
+++ b/src/egl/main/Makefile
@@ -52,6 +52,19 @@ OBJECTS = $(SOURCES:.c=.o)
# use dl*() to load drivers
LOCAL_CFLAGS = -D_EGL_OS_UNIX=1
+LOCAL_LIBS =
+
+# egl_dri2 and egl_glx are built-ins
+ifeq ($(filter dri2, $(EGL_DRIVERS_DIRS)),dri2)
+LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_DRI2
+LOCAL_LIBS += $(TOP)/src/egl/drivers/dri2/libegl_dri2.a
+EGL_LIB_DEPS += $(XCB_DRI2_LIBS) $(LIBUDEV_LIBS) $(DLOPEN_LIBS) $(LIBDRM_LIB)
+endif
+ifeq ($(filter glx, $(EGL_DRIVERS_DIRS)),glx)
+LOCAL_CFLAGS += -D_EGL_BUILT_IN_DRIVER_GLX
+LOCAL_LIBS += $(TOP)/src/egl/drivers/glx/libegl_glx.a
+EGL_LIB_DEPS += $(X11_LIBS) $(DLOPEN_LIBS)
+endif
# translate --with-egl-platforms to _EGLPlatformType
EGL_NATIVE_PLATFORM=_EGL_INVALID_PLATFORM
@@ -84,7 +97,8 @@ $(TOP)/$(LIB_DIR)/$(EGL_LIB_NAME): $(OBJECTS)
$(MKLIB) -o $(EGL_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \
-major $(EGL_MAJOR) -minor $(EGL_MINOR) \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
- $(EGL_LIB_DEPS) $(OBJECTS)
+ -L$(TOP)/$(LIB_DIR) $(EGL_LIB_DEPS) \
+ $(OBJECTS) $(LOCAL_LIBS)
install-headers:
$(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/KHR