mesa: build gbm_gallium_drm.dll

git-svn-id: svn://kolibrios.org@5081 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2014-09-01 20:27:45 +00:00
parent ebd6772509
commit d08e7bcd0c
3 changed files with 42 additions and 30 deletions

View File

@ -17,7 +17,7 @@ INC_I965:= -I$(SRC_DIR)/libdrm/intel -I$(SRC_DIR)/libdrm/include/drm
LIBPATH:= -L$(SDK_DIR)/lib -L/home/autobuild/tools/win32/mingw32/lib LIBPATH:= -L$(SDK_DIR)/lib -L/home/autobuild/tools/win32/mingw32/lib
LIBS:= -ldll -lglsl -lGL.dll -lsupc++ -lgcc_eh -ldrm.dll -lexpat -lc.dll -lgcc LIBS:= -ldll -lgallium -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= -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.5\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" MESA_DEFS+= -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_VERSION=\"9.2.5\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"
@ -156,27 +156,34 @@ GALLIUM_SRC:= \
auxiliary/vl/vl_video_buffer.c auxiliary/vl/vl_video_buffer.c
GBM_SRC = \ GBM_SRC = \
auxiliary/pipe-loader/pipe_loader.c \
auxiliary/pipe-loader/pipe_loader_drm.c \
auxiliary/pipe-loader/pipe_loader_sw.c \
state_trackers/gbm/gbm_drm.c \ state_trackers/gbm/gbm_drm.c \
targets/gbm/gbm.c targets/gbm/gbm.c \
WINSYS_SRC = \
winsys/sw/null/null_sw_winsys.c winsys/sw/null/null_sw_winsys.c
I965_SRC = \ I965_SRC = \
$(NULL) $(NULL)
GALLIUM_OBJS = $(patsubst %.c, %.o, $(patsubst %.S, %.o, $(patsubst %.cpp, %.o, $(GALLIUM_SRC)))) GALLIUM_OBJS = $(patsubst %.c, %.o, $(patsubst %.S, %.o, $(patsubst %.cpp, %.o, $(GALLIUM_SRC))))
GBM_OBJS = $(patsubst %.c, %.o, $(GBM_SRC))
OSMESA_OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(OSMESA_SRC))) OSMESA_OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(OSMESA_SRC)))
I965_OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(I965_SRC))) I965_OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(I965_SRC)))
# targets # targets
all: libgallium.a all: libgallium.a gbm_gallium_drm.dll
libgallium.a: $(GALLIUM_OBJS) Makefile libgallium.a: $(GALLIUM_OBJS) Makefile
$(AR) crs $@ $(GALLIUM_OBJS) $(AR) crs $@ $(GALLIUM_OBJS)
mv -f $@ $(SDK_DIR)/lib mv -f $@ $(SDK_DIR)/lib
gbm_gallium_drm.dll: libgallium.a $(GBM_OBJS) Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(GBM_OBJS) gbm.def $(LIBS)
mv -f $@ $(SDK_DIR)/bin
i965_dri.drv: $(I965_OBJS) $(MESA_OBJS) dri.def Makefile i965_dri.drv: $(I965_OBJS) $(MESA_OBJS) dri.def Makefile
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(I965_OBJS) $(MESA_OBJS) dri.def $(LIBS) $(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(I965_OBJS) $(MESA_OBJS) dri.def $(LIBS)
mv -f $@ $(SDK_DIR)/bin mv -f $@ $(SDK_DIR)/bin

View File

@ -0,0 +1,4 @@
VERSION 6.5
EXPORTS
DllStartup
gbm_backend DATA

View File

@ -213,7 +213,8 @@ uint32_t get_os_button()
static inline uint32_t get_service(char *name) static inline uint32_t get_service(char *name)
{ {
uint32_t retval = 0; uint32_t retval = 0;
asm volatile ("int $0x40" __asm__ __volatile__(
"int $0x40"
:"=a"(retval) :"=a"(retval)
:"a"(68),"b"(16),"c"(name) :"a"(68),"b"(16),"c"(name)
:"memory"); :"memory");
@ -225,7 +226,8 @@ static inline int call_service(ioctl_t *io)
{ {
int retval; int retval;
asm volatile("int $0x40" __asm__ __volatile__(
"int $0x40"
:"=a"(retval) :"=a"(retval)
:"a"(68),"b"(17),"c"(io) :"a"(68),"b"(17),"c"(io)
:"memory","cc"); :"memory","cc");
@ -461,7 +463,6 @@ static inline void Blit(void *bitmap, int dst_x, int dst_y,
__asm__ __volatile__( __asm__ __volatile__(
"int $0x40" "int $0x40"
::"a"(73),"b"(0),"c"(&bc.dstx)); ::"a"(73),"b"(0),"c"(&bc.dstx));
}; };
#endif #endif