Mmesa: egl Mekefile

git-svn-id: svn://kolibrios.org@4379 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2013-12-19 08:49:07 +00:00
parent 9048c15650
commit 74e3156491
5 changed files with 565 additions and 427 deletions

View File

@ -0,0 +1,70 @@
EGL = egl
CC = gcc
CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -O2 -march=i686 -msse2
CFLAGS_OPT+= -fomit-frame-pointer -fno-builtin-printf -mno-stack-arg-probe
CFLAGS_OPT+= -mpreferred-stack-boundary=2 -mincoming-stack-boundary=2 -mno-ms-bitfields -flto
CFLAGS = -c $(CFLAGS_OPT)
LD = ld
LDFLAGS = -nostdlib,-shared,-s,--image-base,0,-T,../newlib/dll.lds,--out-implib,lib$(EGL).dll.a,-e,_DllStartup
STRIP = $(PREFIX)strip
INCLUDES= -I./include -I../libdrm -I../libdrm/include/drm -I./src/egl/main -I./src/gbm/backends/dri -I./src/gbm/main -I../newlib/include
LIBPATH:= -L../../lib
LIBS:= -ldll -ldrm.dll -lc.dll -lgcc
MESA_DEFS= -DMESA_DLL -DBUILD_GL32 -DMAPI_MODE_UTIL -DMAPI_TABLE_NUM_STATIC=87 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_SSE_ASM -DMAPI_TABLE_NUM_DYNAMIC=256
MESA_DEFS+= -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_VERSION=\"9.2.2\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"
MESA_DEFS+= -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
MESA_DEFS+= -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
EGL_DEFS = -DHAVE_DRM_PLATFORM -D__unix__ -DMESA_EGL_NO_X11_HEADERS -D_EGL_BUILT_IN_DRIVER_DRI2
EGL_SRC = \
src/egl/drivers/dri2/egl_dri2.c \
src/egl/drivers/dri2/platform_drm.c \
src/egl/main/eglapi.c \
src/egl/main/eglarray.c \
src/egl/main/eglconfig.c \
src/egl/main/eglcontext.c \
src/egl/main/eglcurrent.c \
src/egl/main/egldisplay.c \
src/egl/main/egldriver.c \
src/egl/main/eglfallbacks.c \
src/egl/main/eglglobals.c \
src/egl/main/eglimage.c \
src/egl/main/egllog.c \
src/egl/main/eglmisc.c \
src/egl/main/eglmode.c \
src/egl/main/eglscreen.c \
src/egl/main/eglstring.c \
src/egl/main/eglsurface.c \
src/egl/main/eglsync.c \
src/gbm/backends/dri/gbm_dri.c \
src/gbm/main/backend.c \
src/gbm/main/gbm.c \
$(NULL)
EGL_OBJS = $(patsubst %.c, %.o, $(EGL_SRC))
# targets
all:$(EGL).dll
$(EGL).dll: $(EGL_OBJS) Makefile
$(CC) $(CFLAGS_OPT) -fwhole-program -nostdlib -Wl,$(LIBPATH),$(LDFLAGS) -o $@ egl.def $(EGL_OBJS) $(LIBS)
$(STRIP) $@
# sed -e "s/ @[^ ]*//" egl1.def > egl.def
mv -f $@ ../../bin
mv -f lib$(EGL).dll.a ../../lib
%.o : %.c Makefile
$(CC) $(CFLAGS) $(MESA_DEFS) $(EGL_DEFS) $(INCLUDES) -o $@ $<

View File

@ -0,0 +1,66 @@
EXPORTS
DllStartup
eglBindAPI
eglBindTexImage
eglBindWaylandDisplayWL
eglChooseConfig
eglChooseModeMESA
eglClientWaitSyncKHR
eglCopyBuffers
eglCopyContextMESA
eglCreateContext
eglCreateDRMImageMESA
eglCreateImageKHR
eglCreatePbufferFromClientBuffer
eglCreatePbufferSurface
eglCreatePixmapSurface
eglCreateScreenSurfaceMESA
eglCreateSyncKHR
eglCreateWindowSurface
eglDestroyContext
eglDestroyImageKHR
eglDestroySurface
eglDestroySyncKHR
eglExportDRMImageMESA
eglGetConfigAttrib
eglGetConfigs
eglGetCurrentContext
eglGetCurrentDisplay
eglGetCurrentSurface
eglGetDRMDisplayMESA
eglGetDisplay
eglGetError
eglGetModeAttribMESA
eglGetModesMESA
eglGetProcAddress
eglGetScreensMESA
eglGetSyncAttribKHR
eglInitialize
eglMakeCurrent
eglPostSubBufferNV
eglQueryAPI
eglQueryContext
eglQueryModeStringMESA
eglQueryScreenMESA
eglQueryScreenModeMESA
eglQueryScreenSurfaceMESA
eglQueryString
eglQuerySurface
eglQueryWaylandBufferWL
eglReleaseTexImage
eglReleaseThread
eglScreenPositionMESA
eglShowScreenSurfaceMESA
eglSignalSyncKHR
eglSurfaceAttrib
eglSwapBuffers
eglSwapBuffersRegionNOK
eglSwapBuffersWithDamageEXT
eglSwapInterval
eglTerminate
eglUnbindWaylandDisplayWL
eglWaitClient
eglWaitGL
eglWaitNative
gbm_create_device
gbm_surface_create

View File

@ -46,8 +46,10 @@
* KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
*/ */
#ifndef EGLAPI #if defined(BUILD_GL32)
#define EGLAPI KHRONOS_APICALL # define EGLAPI __declspec(dllexport)
#else
# define EGLAPI __declspec(dllimport)
#endif #endif
#ifndef EGLAPIENTRY #ifndef EGLAPIENTRY

View File

@ -1,4 +1,4 @@
/* /*
* Copyright © 2011 Intel Corporation * Copyright © 2011 Intel Corporation
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
@ -46,9 +46,9 @@
void* load_library(const char *name); void* load_library(const char *name);
void *get_proc_address(void *module, char *proc_name); void *get_proc_address(void *module, char *proc_name);
int (*blit_bitmap_from_handle)(bitmap_t *bitmap, uint32_t handle); static int (*blit_bitmap_from_handle)(bitmap_t *bitmap, uint32_t handle);
void (*blit_set_bo_handle)(bitmap_t *bitmap, int handle); static void (*blit_set_bo_handle)(bitmap_t *bitmap, int handle);
int (*blit_blit_tex)(bitmap_t *bitmap, int scale, int vsync, int dst_x, int dst_y, static int (*blit_blit_tex)(bitmap_t *bitmap, int scale, int vsync, int dst_x, int dst_y,
int w, int h, int src_x, int src_y); int w, int h, int src_x, int src_y);
static struct gbm_bo * static struct gbm_bo *