forked from KolibriOS/kolibrios
Mesa: Makefiles
git-svn-id: svn://kolibrios.org@4628 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3c5bbe7926
commit
0a1d397ded
@ -142,13 +142,25 @@ GLSL_SRC = \
|
||||
src/glsl/s_expression.cpp \
|
||||
src/glsl/strtod.c \
|
||||
$(NULL)
|
||||
|
||||
LIBGL_SRC = \
|
||||
src/mapi/glapi/glapi.c \
|
||||
src/mapi/glapi/glapi_dispatch.c \
|
||||
src/mapi/glapi/glapi_entrypoint.c \
|
||||
src/mapi/glapi/glapi_getproc.c \
|
||||
src/mapi/glapi/glapi_nop.c \
|
||||
src/mapi/glapi/glapi_x86.S \
|
||||
src/mapi/u_current.c \
|
||||
src/mapi/u_execmem.c \
|
||||
$(NULL)
|
||||
|
||||
EGL_OBJS = $(patsubst %.c, %.o, $(EGL_SRC))
|
||||
GLSL_OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(GLSL_SRC)))
|
||||
EGL_OBJS = $(patsubst %.c, %.o, $(EGL_SRC))
|
||||
GLSL_OBJS = $(patsubst %.cpp, %.o, $(patsubst %.c, %.o, $(GLSL_SRC)))
|
||||
LIBGL_OBJS = $(patsubst %.c, %.o, $(patsubst %.S, %.o, $(LIBGL_SRC)))
|
||||
|
||||
# targets
|
||||
|
||||
all:$(EGL).dll libglsl.a
|
||||
all: libGL.dll $(EGL).dll libglsl.a
|
||||
|
||||
$(EGL).dll: $(EGL_OBJS) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ egl.def $(EGL_OBJS) $(LIBS)
|
||||
@ -161,11 +173,21 @@ libglsl.a : $(GLSL_OBJS) Makefile
|
||||
ar cvrs libglsl.a $(GLSL_OBJS)
|
||||
mv -f libglsl.a ../../lib
|
||||
|
||||
libGL.dll: $(LIBGL_OBJS) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIBGL_OBJS) $(LIBS)
|
||||
$(STRIP) $@
|
||||
# sed -e "s/ @[^ ]*//" egl1.def > egl.def
|
||||
mv -f $@ ../../bin
|
||||
mv -f libGL.dll.a ../../lib
|
||||
|
||||
src/glsl/glcpp/%.o : src/glsl/glcpp/%.c Makefile
|
||||
$(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $<
|
||||
|
||||
src/glsl/%.o : src/glsl/%.c Makefile
|
||||
$(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $<
|
||||
|
||||
src/mapi/glapi/%.o : src/mapi/glapi/%.c Makefile
|
||||
$(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $<
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) $(MESA_DEFS) $(EGL_DEFS) $(INC_EGL) -o $@ $<
|
||||
|
74
contrib/sdk/sources/Mesa/Makefile.new
Normal file
74
contrib/sdk/sources/Mesa/Makefile.new
Normal file
@ -0,0 +1,74 @@
|
||||
|
||||
EGL = egl
|
||||
|
||||
CC = gcc
|
||||
|
||||
CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -Os
|
||||
CFLAGS_OPT+= -fomit-frame-pointer -mno-ms-bitfields
|
||||
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
|
||||
|
||||
export SDK_DIR:= $(abspath ../..)
|
||||
|
||||
INC_MESA= -I../newlib/include -I./include -I./src -I./src/glsl -I./src/mesa -I./src/mapi
|
||||
INC_EGL= -I../newlib/include -I../../includes -I./include -I../libdrm -I../libdrm/include/drm -I./src/egl/main -I./src/gbm/backends/dri -I./src/gbm/main
|
||||
|
||||
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.5\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"
|
||||
MESA_DEFS+= -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.5\" -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
|
||||
|
||||
SUBDIRS = src/egl src/glsl
|
||||
|
||||
# targets
|
||||
|
||||
all:
|
||||
@echo $(SDK_DIR); \
|
||||
for i in $(SUBDIRS); do \
|
||||
$(MAKE) -C $$i; \
|
||||
done
|
||||
|
||||
$(EGL).dll: $(EGL_OBJS) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ egl.def $(EGL_OBJS) $(LIBS)
|
||||
$(STRIP) $@
|
||||
# sed -e "s/ @[^ ]*//" egl1.def > egl.def
|
||||
mv -f $@ ../../bin
|
||||
mv -f lib$(EGL).dll.a ../../lib
|
||||
|
||||
libglsl.a : $(GLSL_OBJS) Makefile
|
||||
ar cvrs libglsl.a $(GLSL_OBJS)
|
||||
mv -f libglsl.a ../../lib
|
||||
|
||||
libGL.dll: $(LIBGL_OBJS) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(LIBGL_OBJS) $(LIBS)
|
||||
$(STRIP) $@
|
||||
# sed -e "s/ @[^ ]*//" egl1.def > egl.def
|
||||
mv -f $@ ../../bin
|
||||
mv -f libGL.dll.a ../../lib
|
||||
|
||||
src/glsl/glcpp/%.o : src/glsl/glcpp/%.c Makefile
|
||||
$(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $<
|
||||
|
||||
src/glsl/%.o : src/glsl/%.c Makefile
|
||||
$(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $<
|
||||
|
||||
src/mapi/glapi/%.o : src/mapi/glapi/%.c Makefile
|
||||
$(CC) $(CFLAGS) -std=c99 $(MESA_DEFS) $(INC_MESA) -o $@ $<
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) $(MESA_DEFS) $(EGL_DEFS) $(INC_EGL) -o $@ $<
|
||||
|
||||
|
||||
%.o : %.cpp Makefile
|
||||
$(CC) $(CFLAGS) $(MESA_DEFS) $(INC_MESA) -o $@ $<
|
||||
|
75
contrib/sdk/sources/Mesa/src/egl/Makefile
Normal file
75
contrib/sdk/sources/Mesa/src/egl/Makefile
Normal file
@ -0,0 +1,75 @@
|
||||
CC = gcc
|
||||
|
||||
SRC_DIR:=$(SDK_DIR)/sources
|
||||
MESA_SRC:= $(SRC_DIR)/Mesa/src
|
||||
|
||||
CFLAGS_OPT = -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER -Os
|
||||
CFLAGS_OPT+= -fomit-frame-pointer -mno-ms-bitfields
|
||||
CFLAGS = -c $(CFLAGS_OPT)
|
||||
|
||||
LD = ld
|
||||
LDFLAGS = -nostdlib -shared -s --image-base 0 -T $(SRC_DIR)/newlib/dll.lds --out-implib libegl.dll.a -e _DllStartup
|
||||
|
||||
STRIP = $(PREFIX)strip
|
||||
|
||||
|
||||
INC_EGL:= -I$(SRC_DIR)/newlib/include -I$(SDK_DIR)/includes -I$(SRC_DIR)/Mesa/include
|
||||
INC_EGL+= -I$(SRC_DIR)/libdrm -I$(SRC_DIR)/libdrm/include/drm -I./main
|
||||
INC_EGL+= -I$(MESA_SRC)/gbm/backends/dri -I$(MESA_SRC)/gbm/main
|
||||
|
||||
LIBPATH:= -L$(SDK_DIR)/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.5\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"
|
||||
MESA_DEFS+= -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.5\" -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 = \
|
||||
drivers/dri2/egl_dri2.c \
|
||||
drivers/dri2/platform_drm.c \
|
||||
main/eglapi.c \
|
||||
main/eglarray.c \
|
||||
main/eglconfig.c \
|
||||
main/eglcontext.c \
|
||||
main/eglcurrent.c \
|
||||
main/egldisplay.c \
|
||||
main/egldriver.c \
|
||||
main/eglfallbacks.c \
|
||||
main/eglglobals.c \
|
||||
main/eglimage.c \
|
||||
main/egllog.c \
|
||||
main/eglmisc.c \
|
||||
main/eglmode.c \
|
||||
main/eglscreen.c \
|
||||
main/eglstring.c \
|
||||
main/eglsurface.c \
|
||||
main/eglsync.c \
|
||||
$(MESA_SRC)/gbm/backends/dri/driver_name.c \
|
||||
$(MESA_SRC)/gbm/backends/dri/gbm_dri.c \
|
||||
$(MESA_SRC)/gbm/main/backend.c \
|
||||
$(MESA_SRC)/gbm/main/gbm.c \
|
||||
$(NULL)
|
||||
|
||||
|
||||
EGL_OBJS = $(patsubst %.c, %.o, $(EGL_SRC))
|
||||
|
||||
# targets
|
||||
|
||||
all: libegl.dll
|
||||
|
||||
libegl.dll: $(EGL_OBJS) Makefile
|
||||
$(LD) $(LDFLAGS) $(LIBPATH) -o $@ $(MESA_SRC)/../egl.def $(EGL_OBJS) $(LIBS)
|
||||
$(STRIP) $@
|
||||
# sed -e "s/ @[^ ]*//" egl1.def > egl.def
|
||||
mv -f $@ $(SDK_DIR)/bin
|
||||
mv -f libegl.dll.a $(SDK_DIR)/lib
|
||||
|
||||
%.o : %.c Makefile
|
||||
$(CC) $(CFLAGS) $(MESA_DEFS) $(EGL_DEFS) $(INC_EGL) -o $@ $<
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user