glapi: Move to src/mapi/.

Move glapi to src/mapi/{glapi,es1api,es2api}.
This commit is contained in:
Chia-I Wu 2010-04-26 12:56:44 +08:00
parent 73ded0624d
commit 296adbd545
120 changed files with 282 additions and 163 deletions

View File

@ -52,7 +52,7 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -L$(INSTALL_DIR)/$(LIB_DIR) -L$(X11_DIR)/$(LIB_DIR) -lX11 -lXmu -lXt -lXi -lm
# omit glw lib for now: # omit glw lib for now:
SRC_DIRS = glsl glx/apple mesa gallium glu glut/glx glew SRC_DIRS = glsl mapi/glapi mapi/vgapi glx/apple mesa gallium glu glut/glx glew
GLU_DIRS = sgi GLU_DIRS = sgi
DRIVER_DIRS = osmesa DRIVER_DIRS = osmesa
#DRIVER_DIRS = dri #DRIVER_DIRS = dri

View File

@ -86,7 +86,8 @@ MOTIF_CFLAGS = -I/usr/include/Motif1.2
# Directories to build # Directories to build
LIB_DIR = lib LIB_DIR = lib
SRC_DIRS = glsl mesa gallium egl gallium/winsys gallium/targets glu glut/glx glew glw SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
gallium egl gallium/winsys gallium/targets glu glut/glx glew glw
GLU_DIRS = sgi GLU_DIRS = sgi
DRIVER_DIRS = x11 osmesa DRIVER_DIRS = x11 osmesa
# Which subdirs under $(TOP)/progs/ to enter: # Which subdirs under $(TOP)/progs/ to enter:

View File

@ -37,7 +37,8 @@ CXXFLAGS = $(COMMON_C_CPP_FLAGS)
# Omitting glw here: # Omitting glw here:
SRC_DIRS = glsl mesa gallium gallium/winsys gallium/targets glu glut/glx glew SRC_DIRS = glsl mapi/glapi mapi/vgapi mesa \
gallium gallium/winsys gallium/targets glu glut/glx glew
# Build no traditional Mesa drivers: # Build no traditional Mesa drivers:
DRIVER_DIRS = DRIVER_DIRS =

View File

@ -6,7 +6,8 @@ CONFIG_NAME = linux-opengl-es
# Directories to build # Directories to build
LIB_DIR = lib LIB_DIR = lib
SRC_DIRS = egl glsl mesa/es gallium gallium/winsys gallium/targets SRC_DIRS = egl glsl mapi/es1api mapi/es2api mesa/es \
gallium gallium/winsys gallium/targets
PROGRAM_DIRS = egl/eglut egl/opengles1 egl/opengles2 PROGRAM_DIRS = egl/eglut egl/opengles1 egl/opengles2
# egl st needs this # egl st needs this

View File

@ -463,7 +463,7 @@ dnl Driver specific build directories
dnl dnl
dnl this variable will be prepended to SRC_DIRS and is not exported dnl this variable will be prepended to SRC_DIRS and is not exported
CORE_DIRS="glsl mesa" CORE_DIRS="mapi/glapi glsl mesa"
SRC_DIRS="glew" SRC_DIRS="glew"
GLU_DIRS="sgi" GLU_DIRS="sgi"
@ -763,6 +763,7 @@ if test "x$enable_gles2" = xyes; then
APIS="$APIS es2" APIS="$APIS es2"
fi fi
if test "x$enable_gles1" = xyes -o "x$enable_gles2" = xyes; then if test "x$enable_gles1" = xyes -o "x$enable_gles2" = xyes; then
CORE_DIRS="mapi/es1api mapi/es2api $CORE_DIRS"
SRC_DIRS="$SRC_DIRS gles" SRC_DIRS="$SRC_DIRS gles"
fi fi
AC_SUBST([API_DEFINES]) AC_SUBST([API_DEFINES])
@ -1308,6 +1309,9 @@ yes)
HAVE_ST_XORG="yes" HAVE_ST_XORG="yes"
;; ;;
es) es)
if test "x$enable_gles1" != xyes -a "x$enable_gles2" != xyes; then
CORE_DIRS="mapi/es1api mapi/es2api $CORE_DIRS"
fi
# mesa/es is required to build es state tracker # mesa/es is required to build es state tracker
CORE_DIRS="$CORE_DIRS mesa/es" CORE_DIRS="$CORE_DIRS mesa/es"
;; ;;

View File

@ -1,6 +1,7 @@
Import('*') Import('*')
SConscript('glsl/SConscript') SConscript('glsl/SConscript')
SConscript('mapi/glapi/SConscript')
if 'mesa' in env['statetrackers']: if 'mesa' in env['statetrackers']:
SConscript('mesa/SConscript') SConscript('mesa/SConscript')

View File

@ -11,9 +11,9 @@ INCLUDE_DIRS = \
$(shell pkg-config --cflags-only-I libdrm) \ $(shell pkg-config --cflags-only-I libdrm) \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/include/GL/internal \ -I$(TOP)/include/GL/internal \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \ -I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
-I$(TOP)/src/mesa/math \ -I$(TOP)/src/mesa/math \
-I$(TOP)/src/mesa/transform \ -I$(TOP)/src/mesa/transform \
-I$(TOP)/src/mesa/shader \ -I$(TOP)/src/mesa/shader \

View File

@ -9,7 +9,7 @@ EGL_SOURCES = egl_dri2.c
EGL_INCLUDES = \ EGL_INCLUDES = \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/src/egl/main \ -I$(TOP)/src/egl/main \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mapi \
-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \ -DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
$(EGL_DRI2_CFLAGS) $(EGL_DRI2_CFLAGS)

View File

@ -5,6 +5,7 @@ LIBNAME = dridrm
LIBRARY_INCLUDES = \ LIBRARY_INCLUDES = \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
-I$(TOP)/src/gallium/state_trackers/dri/common \ -I$(TOP)/src/gallium/state_trackers/dri/common \
-I$(TOP)/src/mesa/drivers/dri/common \ -I$(TOP)/src/mesa/drivers/dri/common \

View File

@ -10,6 +10,7 @@ if env['dri']:
env.ParseConfig('pkg-config --cflags --libs libdrm') env.ParseConfig('pkg-config --cflags --libs libdrm')
env.Append(CPPPATH = [ env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa', '#/src/mesa',
'#/src/gallium/state_trackers/dri/common', '#/src/gallium/state_trackers/dri/common',
'#/src/mesa/drivers/dri/common', '#/src/mesa/drivers/dri/common',

View File

@ -8,6 +8,7 @@ LIBRARY_DEFINES = -D__NOT_HAVE_DRM_H
LIBRARY_INCLUDES = \ LIBRARY_INCLUDES = \
-I../dri \ -I../dri \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
-I$(TOP)/src/gallium/state_trackers/dri/common \ -I$(TOP)/src/gallium/state_trackers/dri/common \
-I$(TOP)/src/mesa/drivers/dri/common \ -I$(TOP)/src/mesa/drivers/dri/common \

View File

@ -8,6 +8,7 @@ if env['dri']:
env = env.Clone() env = env.Clone()
env.Append(CPPPATH = [ env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa', '#/src/mesa',
'#/src/gallium/state_trackers/dri/common', '#/src/gallium/state_trackers/dri/common',
'#/src/mesa/drivers/dri/common', '#/src/mesa/drivers/dri/common',

View File

@ -15,6 +15,7 @@ common_OBJECTS = $(common_SOURCES:.c=.o)
x11_INCLUDES = \ x11_INCLUDES = \
-I$(TOP)/src/gallium/drivers \ -I$(TOP)/src/gallium/drivers \
-I$(TOP)/src/glx \ -I$(TOP)/src/glx \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
$(X11_CFLAGS) \ $(X11_CFLAGS) \
$(shell pkg-config --cflags-only-I libdrm) $(shell pkg-config --cflags-only-I libdrm)

View File

@ -30,17 +30,18 @@ ES2_OBJECTS = st_es2.o
ES1_LIBS = \ ES1_LIBS = \
$(TOP)/src/mesa/es/libes1gallium.a \ $(TOP)/src/mesa/es/libes1gallium.a \
$(TOP)/src/mesa/es/libes1api.a $(TOP)/src/mapi/es1api/libes1api.a
ES2_LIBS = \ ES2_LIBS = \
$(TOP)/src/mesa/es/libes2gallium.a \ $(TOP)/src/mesa/es/libes2gallium.a \
$(TOP)/src/mesa/es/libes2api.a $(TOP)/src/mapi/es2api/libes2api.a
SYS_LIBS = -lm -pthread SYS_LIBS = -lm -pthread
INCLUDE_DIRS = \ INCLUDE_DIRS = \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
-I$(TOP)/src/gallium/include -I$(TOP)/src/gallium/include

View File

@ -5,6 +5,7 @@ LIBNAME = xlib
LIBRARY_INCLUDES = \ LIBRARY_INCLUDES = \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
$(X11_CFLAGS) $(X11_CFLAGS)

View File

@ -9,6 +9,7 @@ if env['platform'] == 'linux' \
env = env.Clone() env = env.Clone()
env.Append(CPPPATH = [ env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa', '#/src/mesa',
'#/src/mesa/main', '#/src/mesa/main',
]) ])

View File

@ -42,13 +42,13 @@ SHARED_INCLUDES = \
-Iserver \ -Iserver \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/include/GL/internal \ -I$(TOP)/include/GL/internal \
-I$(TOP)/src/mapi \
-I$(TOP)/src/gallium/include \ -I$(TOP)/src/gallium/include \
-I$(TOP)/src/gallium/auxiliary \ -I$(TOP)/src/gallium/auxiliary \
-I$(TOP)/src/gallium/drivers \ -I$(TOP)/src/gallium/drivers \
-I$(TOP)/src/gallium/winsys \ -I$(TOP)/src/gallium/winsys \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \ -I$(TOP)/src/mesa/main \
-I$(TOP)/src/mesa/glapi \
-I$(TOP)/src/mesa/math \ -I$(TOP)/src/mesa/math \
-I$(TOP)/src/mesa/transform \ -I$(TOP)/src/mesa/transform \
-I$(TOP)/src/mesa/shader \ -I$(TOP)/src/mesa/shader \

View File

@ -9,6 +9,7 @@ drienv.Replace(CPPPATH = [
'#src/mesa/drivers/dri/common', '#src/mesa/drivers/dri/common',
'#include', '#include',
'#include/GL/internal', '#include/GL/internal',
'#src/mapi',
'#src/gallium/include', '#src/gallium/include',
'#src/gallium/auxiliary', '#src/gallium/auxiliary',
'#src/gallium/drivers', '#src/gallium/drivers',

View File

@ -15,6 +15,7 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
INCLUDE_DIRS = \ INCLUDE_DIRS = \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/main \ -I$(TOP)/src/mesa/main \
-I$(TOP)/src/gallium/include \ -I$(TOP)/src/gallium/include \
@ -42,7 +43,7 @@ LIBS = \
$(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \ $(TOP)/src/gallium/winsys/sw/xlib/libws_xlib.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \ $(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/drivers/identity/libidentity.a \ $(TOP)/src/gallium/drivers/identity/libidentity.a \
$(TOP)/src/mesa/libglapi.a \ $(TOP)/src/mapi/glapi/libglapi.a \
$(TOP)/src/mesa/libmesagallium.a \ $(TOP)/src/mesa/libmesagallium.a \
$(GALLIUM_AUXILIARIES) \ $(GALLIUM_AUXILIARIES) \
$(CELL_SPU_LIB) \ $(CELL_SPU_LIB) \

View File

@ -17,6 +17,7 @@ if env['dri']:
env = env.Clone() env = env.Clone()
env.Append(CPPPATH = [ env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa', '#/src/mesa',
'#/src/mesa/main', '#/src/mesa/main',
'#src/gallium/state_trackers/glx/xlib', '#src/gallium/state_trackers/glx/xlib',

View File

@ -38,7 +38,7 @@ LIBS = \
$(TOP)/src/gallium/drivers/i965/libi965.a \ $(TOP)/src/gallium/drivers/i965/libi965.a \
$(TOP)/src/gallium/drivers/trace/libtrace.a \ $(TOP)/src/gallium/drivers/trace/libtrace.a \
$(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \ $(TOP)/src/gallium/state_trackers/glx/xlib/libxlib.a \
$(TOP)/src/mesa/libglapi.a \ $(TOP)/src/mapi/glapi/libglapi.a \
$(TOP)/src/mesa/libmesagallium.a \ $(TOP)/src/mesa/libmesagallium.a \
$(GALLIUM_AUXILIARIES) $(GALLIUM_AUXILIARIES)

View File

@ -1,11 +1,11 @@
TOP = ../.. TOP = ../..
MESA = $(TOP)/src/mesa MAPI = $(TOP)/src/mapi
include $(TOP)/configs/current include $(TOP)/configs/current
include $(MESA)/sources.mak
GLESv1_CM_ASM := $(addprefix $(MESA)/es/glapi/glapi-es1/,$(GLAPI_ASM_SOURCES)) include $(MAPI)/glapi/sources.mak
GLESv2_ASM := $(addprefix $(MESA)/es/glapi/glapi-es2/,$(GLAPI_ASM_SOURCES)) GLESv1_CM_ASM := $(addprefix $(MAPI)/es1api/glapi/,$(GLAPI_ASM_SOURCES))
API_SOURCES := $(addprefix $(MESA)/,$(GLAPI_SOURCES)) GLESv2_ASM := $(addprefix $(MAPI)/es2api/glapi/,$(GLAPI_ASM_SOURCES))
API_SOURCES := $(addprefix $(MAPI)/glapi/,$(GLAPI_SOURCES))
$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : PREFIX = es1 $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : PREFIX = es1
$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : NAME = GLESv1_CM $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : NAME = GLESv1_CM
@ -13,7 +13,7 @@ $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : NAME = GLESv1_CM
$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : PREFIX = es2 $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : PREFIX = es2
$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : NAME = GLESv2 $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : NAME = GLESv2
INCLUDES = -I$(TOP)/include -I$(MESA)/es/glapi/glapi-$(PREFIX) -I$(MESA) INCLUDES = -I$(TOP)/include -I$(MAPI)/$(PREFIX)api -I$(MAPI) -I$(TOP)/src/mesa
OBJECTS = \ OBJECTS = \
$(notdir $(GLAPI_ASM_SOURCES:%.S=%.o)) \ $(notdir $(GLAPI_ASM_SOURCES:%.S=%.o)) \
@ -24,12 +24,12 @@ GLESv2_OBJECTS = $(addprefix es2-,$(OBJECTS))
es1-%.o: $(dir $(GLESv1_CM_ASM))%.S es1-%.o: $(dir $(GLESv1_CM_ASM))%.S
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
es1-%.o: $(MESA)/glapi/%.c es1-%.o: $(MAPI)/glapi/%.c
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
es2-%.o: $(dir $(GLESv2_ASM))%.S es2-%.o: $(dir $(GLESv2_ASM))%.S
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
es2-%.o: $(MESA)/glapi/%.c es2-%.o: $(MAPI)/glapi/%.c
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
default: depend \ default: depend \

View File

@ -39,7 +39,7 @@ SOURCES = \
dri2_glx.c \ dri2_glx.c \
dri2.c dri2.c
GLAPI_LIB = $(TOP)/src/mesa/libglapi.a GLAPI_LIB = $(TOP)/src/mapi/glapi/libglapi.a
OBJECTS = $(SOURCES:.c=.o) OBJECTS = $(SOURCES:.c=.o)
@ -47,7 +47,8 @@ INCLUDES = -I. \
-I$(TOP)/include \ -I$(TOP)/include \
-I$(TOP)/include/GL/internal \ -I$(TOP)/include/GL/internal \
-I$(TOP)/src/mesa \ -I$(TOP)/src/mesa \
-I$(TOP)/src/mesa/glapi \ -I$(TOP)/src/mapi \
-I$(TOP)/src/mapi/glapi \
$(LIBDRM_CFLAGS) \ $(LIBDRM_CFLAGS) \
$(DRI2PROTO_CFLAGS) \ $(DRI2PROTO_CFLAGS) \
$(X11_INCLUDES) $(X11_INCLUDES)
@ -73,7 +74,7 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(GLAPI_LIB) Makefile
$(GL_LIB_DEPS) $(OBJECTS) $(GLAPI_LIB) $(GL_LIB_DEPS) $(OBJECTS) $(GLAPI_LIB)
$(GLAPI_LIB): $(GLAPI_LIB):
@$(MAKE) -C $(TOP)/src/mesa libglapi.a @$(MAKE) -C $(TOP)/src/mapi/glapi
depend: $(SOURCES) Makefile depend: $(SOURCES) Makefile
rm -f depend rm -f depend

60
src/mapi/es1api/Makefile Normal file
View File

@ -0,0 +1,60 @@
# src/mapi/es1api/Makefile
TOP := ../../..
include $(TOP)/configs/current
# this Makefile can build both libes1api.a and libes2api.a
ifeq ($(ES),)
ES := es1
endif
ESAPI = $(ES)api
GLAPI := ../glapi
include $(GLAPI)/sources.mak
ESAPI_SOURCES := $(addprefix $(GLAPI)/, $(GLAPI_SOURCES))
ESAPI_OBJECTS := $(GLAPI_SOURCES:.c=.o)
ESAPI_ASM_SOURCES := $(addprefix glapi/, $(GLAPI_ASM_SOURCES))
ESAPI_ASM_OBJECTS := $(GLAPI_ASM_SOURCES:.S=.o)
INCLUDE_DIRS = \
-I$(TOP)/include \
-I$(TOP)/src/mapi/$(ESAPI) \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa
.PHONY: default
default: depend lib$(ESAPI).a
lib$(ESAPI).a: $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS)
@$(MKLIB) -o $(ESAPI) -static $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS)
$(ESAPI_OBJECTS): %.o: $(GLAPI)/%.c
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
$(ESAPI_ASM_OBJECTS): %.o: glapi/%.S
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
$(ESAPI_SOURCES) $(ESAPI_ASM_SOURCES): | glapi-stamp
glapi-stamp:
@$(MAKE) -C $(GLAPI)/gen-es $(ES)
@touch $@
.PHONY: clean
clean:
-rm -f $(ESAPI_OBJECTS) $(ESAPI_ASM_OBJECTS)
-rm -f lib$(ESAPI).a
-rm -f depend depend.bak
@$(MAKE) -C $(GLAPI)/gen-es clean-$(ES)
-rm -f glapi-stamp
# nothing to install
install:
depend: $(ESAPI_SOURCES)
@echo "running $(MKDEP)"
@touch depend
@$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
$(ESAPI_SOURCES) 2>/dev/null | \
sed -e 's,^$(GLAPI)/,,' > depend

3
src/mapi/es2api/Makefile Normal file
View File

@ -0,0 +1,3 @@
# src/mapi/es2api/Makefile
ES := es2
include ../es1api/Makefile

38
src/mapi/glapi/Makefile Normal file
View File

@ -0,0 +1,38 @@
# src/mapi/glapi/Makefile
TOP = ../../..
include $(TOP)/configs/current
include sources.mak
GLAPI_OBJECTS = $(GLAPI_SOURCES:.c=.o)
GLAPI_ASM_OBJECTS = $(GLAPI_ASM_SOURCES:.S=.o)
INCLUDE_DIRS = \
-I$(TOP)/include \
-I$(TOP)/src/mapi \
-I$(TOP)/src/mesa
default: depend libglapi.a
libglapi.a: $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS)
@ $(MKLIB) -o glapi -static $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS)
$(GLAPI_OBJECTS): %.o: %.c
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
$(GLAPI_ASM_OBJECTS): %.o: %.S
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@
install:
clean:
-rm -f $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS)
-rm -f depend depend.bak libglapi.a
depend: $(GLAPI_SOURCES)
@ echo "running $(MKDEP)"
@ touch depend
@$(MKDEP) $(MKDEP_OPTIONS) $(DEFINES) $(INCLUDE_DIRS) $(GLAPI_SOURCES) \
> /dev/null 2>/dev/null
-include depend

64
src/mapi/glapi/SConscript Normal file
View File

@ -0,0 +1,64 @@
#######################################################################
# SConscript for Mesa
Import('*')
if env['platform'] != 'winddk':
env = env.Clone()
env.Append(CPPPATH = [
'#/src/mapi',
'#/src/mesa',
])
glapi_sources = [
'glapi.c',
'glapi_dispatch.c',
'glapi_entrypoint.c',
'glapi_execmem.c',
'glapi_getproc.c',
'glapi_nop.c',
'glthread.c',
]
#
# Assembly sources
#
if gcc and env['machine'] == 'x86':
env.Append(CPPDEFINES = [
'USE_X86_ASM',
'USE_MMX_ASM',
'USE_3DNOW_ASM',
'USE_SSE_ASM',
])
glapi_sources += [
'glapi_x86.S',
]
elif gcc and env['machine'] == 'x86_64':
env.Append(CPPDEFINES = [
'USE_X86_64_ASM',
])
glapi_sources += [
'glapi_x86-64.S'
]
elif gcc and env['machine'] == 'ppc':
env.Append(CPPDEFINES = [
'USE_PPC_ASM',
'USE_VMX_ASM',
])
glapi_sources += [
]
elif gcc and env['machine'] == 'sparc':
glapi_sources += [
'glapi_sparc.S'
]
else:
pass
glapi = env.ConvenienceLibrary(
target = 'glapi',
source = glapi_sources,
)
Export('glapi')

View File

@ -1,5 +1,5 @@
TOP = ../../../.. TOP = ../../../..
GLAPI = ../../glapi/gen GLAPI = ../gen
include $(TOP)/configs/current include $(TOP)/configs/current
OUTPUTS := \ OUTPUTS := \
@ -18,8 +18,8 @@ COMMON := $(addprefix $(GLAPI)/, $(COMMON))
ES1_APIXML := es1_API.xml ES1_APIXML := es1_API.xml
ES2_APIXML := es2_API.xml ES2_APIXML := es2_API.xml
ES1_OUTPUT_DIR := glapi-es1 ES1_OUTPUT_DIR := $(TOP)/src/mapi/es1api
ES2_OUTPUT_DIR := glapi-es2 ES2_OUTPUT_DIR := $(TOP)/src/mapi/es2api
ES1_DEPS = $(ES1_APIXML) base1_API.xml es1_EXT.xml es_EXT.xml \ ES1_DEPS = $(ES1_APIXML) base1_API.xml es1_EXT.xml es_EXT.xml \
es1_COMPAT.xml es_COMPAT.xml es1_COMPAT.xml es_COMPAT.xml
@ -84,6 +84,13 @@ verify_xml:
@$(PYTHON2) $(PYTHON_FLAGS) gl_compare.py difference tmp.xml es2_API.xml @$(PYTHON2) $(PYTHON_FLAGS) gl_compare.py difference tmp.xml es2_API.xml
@rm -f tmp.xml @rm -f tmp.xml
clean: clean-es1:
-rm -rf $(ES1_OUTPUT_DIR) $(ES2_OUTPUT_DIR) -rm -rf $(ES1_OUTPUT_DIR)/glapi
-rm -rf $(ES1_OUTPUT_DIR)/main
clean-es2:
-rm -rf $(ES2_OUTPUT_DIR)/glapi
-rm -rf $(ES2_OUTPUT_DIR)/main
clean: clean-es1 clean-es2
-rm -f *~ *.pyc *.pyo -rm -f *~ *.pyc *.pyo

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<!-- OpenGL and OpenGL ES 1.x APIs <!-- OpenGL and OpenGL ES 1.x APIs
This file defines the base categories that can be shared by all APIs. This file defines the base categories that can be shared by all APIs.

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<!-- OpenGL and OpenGL ES 2.x APIs --> <!-- OpenGL and OpenGL ES 2.x APIs -->

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<!-- OpenGL ES 1.x API --> <!-- OpenGL ES 1.x API -->

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<OpenGLAPI> <OpenGLAPI>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<!-- OpenGL ES 1.x extensions --> <!-- OpenGL ES 1.x extensions -->

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<!-- OpenGL ES 2.x API --> <!-- OpenGL ES 2.x API -->

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<OpenGLAPI> <OpenGLAPI>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<!-- OpenGL ES 2.x extensions --> <!-- OpenGL ES 2.x extensions -->

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<OpenGLAPI> <OpenGLAPI>
@ -2641,6 +2641,6 @@
</function> </function>
</category> </category>
<xi:include href="../../glapi/gen/APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <xi:include href="../gen/APPLE_vertex_array_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</OpenGLAPI> </OpenGLAPI>

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE OpenGLAPI SYSTEM "../../glapi/gen/gl_API.dtd"> <!DOCTYPE OpenGLAPI SYSTEM "../gen/gl_API.dtd">
<!-- OpenGL ES extensions --> <!-- OpenGL ES extensions -->
@ -19,7 +19,7 @@
</category> </category>
<!-- 23. GL_OES_EGL_image --> <!-- 23. GL_OES_EGL_image -->
<xi:include href="../../glapi/gen/OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> <xi:include href="../gen/OES_EGL_image.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
<category name="GL_OES_depth24" number="24"> <category name="GL_OES_depth24" number="24">
<enum name="DEPTH_COMPONENT24_OES" value="0x81A6"/> <enum name="DEPTH_COMPONENT24_OES" value="0x81A6"/>

View File

@ -8,7 +8,7 @@ TOP = ../../../..
include $(TOP)/configs/current include $(TOP)/configs/current
MESA_DIR = $(TOP)/src/mesa MESA_DIR = $(TOP)/src/mesa
MESA_GLAPI_DIR = $(TOP)/src/mesa/glapi MESA_GLAPI_DIR = $(TOP)/src/mapi/glapi
MESA_GLX_DIR = $(TOP)/src/glx MESA_GLX_DIR = $(TOP)/src/glx
MESA_GLAPI_OUTPUTS = \ MESA_GLAPI_OUTPUTS = \
@ -153,8 +153,8 @@ $(MESA_GLAPI_DIR)/glapi_sparc.S: gl_SPARC_asm.py $(COMMON)
$(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON) $(ES_API) $(MESA_DIR)/main/enums.c: gl_enums.py $(COMMON) $(ES_API)
$(PYTHON2) $(PYTHON_FLAGS) $< -f gl_API.xml \ $(PYTHON2) $(PYTHON_FLAGS) $< -f gl_API.xml \
-f $(MESA_DIR)/es/glapi/es1_API.xml \ -f $(MESA_GLAPI_DIR)/gen-es/es1_API.xml \
-f $(MESA_DIR)/es/glapi/es2_API.xml > $@ -f $(MESA_GLAPI_DIR)/gen-es/es2_API.xml > $@
$(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON) $(MESA_DIR)/main/remap_helper.h: remap_helper.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@ $(PYTHON2) $(PYTHON_FLAGS) $< > $@

Some files were not shown because too many files have changed in this diff Show More