diff options
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | src/gles/Makefile | 78 | ||||
-rw-r--r-- | src/mapi/es1api/Makefile | 49 |
3 files changed, 38 insertions, 90 deletions
diff --git a/configure.ac b/configure.ac index 6741024fd83..896abd431e3 100644 --- a/configure.ac +++ b/configure.ac @@ -768,7 +768,6 @@ if test "x$enable_gles2" = xyes; then fi 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" fi AC_SUBST([API_DEFINES]) AC_SUBST([APIS]) diff --git a/src/gles/Makefile b/src/gles/Makefile deleted file mode 100644 index 1af3f52f942..00000000000 --- a/src/gles/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -TOP = ../.. -MAPI = $(TOP)/src/mapi -include $(TOP)/configs/current - -include $(MAPI)/glapi/sources.mak -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 - -$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : PREFIX = es2 -$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : NAME = GLESv2 - -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 $(MAPI_GLAPI_SOURCES:%.c=%.o)) - -GLESv1_CM_OBJECTS = $(addprefix es1-,$(OBJECTS)) -GLESv2_OBJECTS = $(addprefix es2-,$(OBJECTS)) - -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) \ - $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) - -$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) : $(GLESv1_CM_OBJECTS) -$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : $(GLESv2_OBJECTS) - -$(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) \ -$(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) : Makefile - $(MKLIB) -o $($(NAME)_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ - -major 1 -minor 2 $(MKLIB_OPTIONS) \ - -install $(TOP)/$(LIB_DIR) -id \ - $(INSTALL_LIB_DIR)/lib$($(NAME)_LIB).1.dylib \ - $($(NAME)_LIB_DEPS) $($(NAME)_OBJECTS) - -depend: Makefile - rm -f depend - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) -DMAPI_GLAPI_CURRENT \ - $(API_SOURCES) $(ES1_API_ASM) $(ES2_API_ASM) - -# Emacs tags -tags: - etags `find . -name \*.[ch]` `find $(TOP)/include` - -install: $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_NAME) - $(MAKE) -C $(TOP)/src/mesa install-es2 install-es1 - -# Remove .o and backup files -clean: - -rm -f $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_GLOB) - -rm -f $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_GLOB) - -rm -f *.o *~ - -rm -f depend depend.bak - --include depend diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile index 203cc36deab..9c5f26745fa 100644 --- a/src/mapi/es1api/Makefile +++ b/src/mapi/es1api/Makefile @@ -3,12 +3,28 @@ TOP := ../../.. include $(TOP)/configs/current -# this Makefile can build both libes1api.a and libes2api.a +# this Makefile can build both OpenGL ES 1.1 and 2.0 ifeq ($(ES),) ES := es1 + +GLES_LIB := $(GLESv1_CM_LIB) +GLES_LIB_NAME := $(GLESv1_CM_LIB_NAME) +GLES_LIB_GLOB := $(GLESv1_CM_LIB_GLOB) +GLES_LIB_DEPS := $(GLESv1_CM_LIB_DEPS) +GLES_LIB_MAJOR := 1 +GLES_LIB_MINOR := 1 +GLES_LIB_PATCH := 0 +else +GLES_LIB := $(GLESv2_LIB) +GLES_LIB_NAME := $(GLESv2_LIB_NAME) +GLES_LIB_GLOB := $(GLESv2_LIB_GLOB) +GLES_LIB_DEPS := $(GLESv2_LIB_DEPS) +GLES_LIB_MAJOR := 2 +GLES_LIB_MINOR := 0 +GLES_LIB_PATCH := 0 endif -TARGET = $(ES)api +ESAPI = $(ES)api GLAPI := $(TOP)/src/mapi/glapi MAPI := $(TOP)/src/mapi/mapi @@ -25,19 +41,29 @@ include $(MAPI)/sources.mak MAPI_GLAPI_OBJECTS := $(MAPI_GLAPI_SOURCES:.c=.o) MAPI_GLAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_GLAPI_SOURCES)) -TARGET_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_GLAPI_OBJECTS) +ESAPI_OBJECTS = $(GLAPI_OBJECTS) $(GLAPI_ASM_OBJECTS) $(MAPI_GLAPI_OBJECTS) INCLUDE_DIRS = \ -I$(TOP)/include \ - -I$(TOP)/src/mapi/$(TARGET) \ + -I$(TOP)/src/mapi/$(ESAPI) \ -I$(TOP)/src/mapi \ -I$(TOP)/src/mesa .PHONY: default -default: depend lib$(TARGET).a +default: depend $(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME) + +$(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME): $(ESAPI_OBJECTS) + $(MKLIB) -o $(GLES_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ + -major $(GLES_LIB_MAJOR) \ + -minor $(GLES_LIB_MINOR) \ + -patch $(GLES_LIB_PATCH) \ + -id $(INSTALL_LIB_DIR)/lib$(GLES_LIB).$(GLES_LIB_MAJOR).dylib \ + $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \ + $(ESAPI_OBJECTS) $(GLES_LIB_DEPS) -lib$(TARGET).a: $(TARGET_OBJECTS) - @$(MKLIB) -o $(TARGET) -static $(TARGET_OBJECTS) +# not used, but kept for completeness +lib$(ESAPI).a: $(ESAPI_OBJECTS) + @$(MKLIB) -o $(ESAPI) -static $(ESAPI_OBJECTS) $(GLAPI_OBJECTS): %.o: $(GLAPI)/%.c $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $< -o $@ @@ -57,15 +83,16 @@ glapi-stamp: .PHONY: clean clean: - -rm -f lib$(TARGET).a - -rm -f $(TARGET_OBJECTS) + -rm -f $(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME) + -rm -f lib$(ESAPI).a + -rm -f $(ESAPI_OBJECTS) -rm -f depend depend.bak -rm -f glapi-stamp @# clean generated sources/headers @$(MAKE) -C $(GLAPI)/gen-es clean-$(ES) -# nothing to install -install: +install: default + $(MAKE) -C $(TOP)/src/mesa install-$(ES) depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES) @echo "running $(MKDEP)" |