diff options
Diffstat (limited to 'src/egl/main/Makefile')
-rw-r--r-- | src/egl/main/Makefile | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index 82fd855b1d5..be27d9450f4 100644 --- a/src/egl/main/Makefile +++ b/src/egl/main/Makefile @@ -7,7 +7,7 @@ include $(TOP)/configs/current EGL_MAJOR = 1 EGL_MINOR = 0 -INCLUDE_DIRS = -I$(TOP)/include $(X11_CFLAGS) +INCLUDE_DIRS = -I$(TOP)/include HEADERS = \ eglcompiler.h \ @@ -49,12 +49,25 @@ OBJECTS = $(SOURCES:.c=.o) # use dl*() to load drivers -LOCAL_CFLAGS = -D_EGL_PLATFORM_POSIX=1 - -EGL_DEFAULT_DISPLAY = $(word 1, $(EGL_DISPLAYS)) +LOCAL_CFLAGS = -D_EGL_OS_UNIX=1 + +EGL_DEFAULT_PLATFORM = $(firstword $(EGL_PLATFORMS)) + +# translate --with-egl-platforms to _EGLPlatformType +EGL_NATIVE_PLATFORM=_EGL_INVALID_PLATFORM +ifeq ($(firstword $(EGL_PLATFORMS)),x11) +EGL_NATIVE_PLATFORM=_EGL_PLATFORM_X11 +endif +ifeq ($(firstword $(EGL_PLATFORMS)),kms) +EGL_NATIVE_PLATFORM=_EGL_PLATFORM_DRM +endif +ifeq ($(firstword $(EGL_PLATFORMS)),fbdev) +EGL_NATIVE_PLATFORM=_EGL_PLATFORM_FBDEV +endif LOCAL_CFLAGS += \ - -D_EGL_DEFAULT_DISPLAY=\"$(EGL_DEFAULT_DISPLAY)\" \ + -D_EGL_NATIVE_PLATFORM=$(EGL_NATIVE_PLATFORM) \ + -D_EGL_DEFAULT_PLATFORM=\"$(EGL_DEFAULT_PLATFORM)\" \ -D_EGL_DRIVER_SEARCH_DIR=\"$(EGL_DRIVER_INSTALL_DIR)\" .c.o: |