From a73c6540d9a7f6e26d8568ba2fc522cb865f0a6c Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 23 Apr 2010 16:06:26 +0800 Subject: mapi: Add mapi and share the code with glapi. Specifically, move all or most of glapi/glapi.c to mapi/u_current.c, glapi/glapi_execmem.c to mapi/u_execmem.c, glapi/glthread.[ch] to mapi/u_thread.[ch] and remove their dependencies on core Mesa headers. --- src/gles/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/gles') diff --git a/src/gles/Makefile b/src/gles/Makefile index 5e5fc127b3f..1af3f52f942 100644 --- a/src/gles/Makefile +++ b/src/gles/Makefile @@ -7,6 +7,9 @@ GLESv1_CM_ASM := $(addprefix $(MAPI)/es1api/glapi/,$(GLAPI_ASM_SOURCES)) GLESv2_ASM := $(addprefix $(MAPI)/es2api/glapi/,$(GLAPI_ASM_SOURCES)) API_SOURCES := $(addprefix $(MAPI)/glapi/,$(GLAPI_SOURCES)) +include $(MAPI)/mapi/sources.mak +MAPI_GLAPI_SOURCES := $(addprefix $(MAPI)/mapi/,$(MAPI_GLAPI_SOURCES)) + $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : PREFIX = es1 $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : NAME = GLESv1_CM @@ -17,7 +20,8 @@ INCLUDES = -I$(TOP)/include -I$(MAPI)/$(PREFIX)api -I$(MAPI) -I$(TOP)/src/mesa OBJECTS = \ $(notdir $(GLAPI_ASM_SOURCES:%.S=%.o)) \ - $(notdir $(GLAPI_SOURCES:%.c=%.o)) + $(notdir $(GLAPI_SOURCES:%.c=%.o)) \ + $(notdir $(MAPI_GLAPI_SOURCES:%.c=%.o)) GLESv1_CM_OBJECTS = $(addprefix es1-,$(OBJECTS)) GLESv2_OBJECTS = $(addprefix es2-,$(OBJECTS)) @@ -26,11 +30,15 @@ es1-%.o: $(dir $(GLESv1_CM_ASM))%.S $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< es1-%.o: $(MAPI)/glapi/%.c $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< +es1-u_%.o: $(MAPI)/mapi/u_%.c + $(CC) -c $(CFLAGS) $(INCLUDES) -DMAPI_GLAPI_CURRENT -o $@ $< es2-%.o: $(dir $(GLESv2_ASM))%.S $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< es2-%.o: $(MAPI)/glapi/%.c $(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $< +es2-u_%.o: $(MAPI)/mapi/u_%.c + $(CC) -c $(CFLAGS) $(INCLUDES) -DMAPI_GLAPI_CURRENT -o $@ $< default: depend \ $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) \ @@ -50,8 +58,8 @@ $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : Makefile depend: Makefile rm -f depend touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(API_SOURCES) \ - $(ES1_API_ASM) $(ES2_API_ASM) + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) -DMAPI_GLAPI_CURRENT \ + $(API_SOURCES) $(ES1_API_ASM) $(ES2_API_ASM) # Emacs tags tags: -- cgit v1.2.3