Move the install rules for OpenGL ES from src/mesa/Makefile to mapi.
ifeq ($(ES),)
ES := es1
+GLES_HEADER := GLES
+GLES_PC := glesv1_cm.pc
+
GLES_LIB := $(GLESv1_CM_LIB)
GLES_LIB_NAME := $(GLESv1_CM_LIB_NAME)
GLES_LIB_GLOB := $(GLESv1_CM_LIB_GLOB)
GLES_LIB_MINOR := 1
GLES_LIB_PATCH := 0
else
+GLES_HEADER := GLES2
+GLES_PC := glesv2.pc
+
GLES_LIB := $(GLESv2_LIB)
GLES_LIB_NAME := $(GLESv2_LIB_NAME)
GLES_LIB_GLOB := $(GLESv2_LIB_GLOB)
.PHONY: clean
clean:
+ -rm -f $(GLES_PC)
-rm -f $(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME)
-rm -f lib$(ESAPI).a
-rm -f $(ESAPI_OBJECTS)
@# clean generated sources/headers
@$(MAKE) -C $(GLAPI)/gen-es clean-$(ES)
-install: default
- $(MAKE) -C $(TOP)/src/mesa install-$(ES)
+pcedit = \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
+ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \
+
+pcedit-es1 = \
+ $(pcedit) \
+ -e 's,@GLESv1_CM_REQ_PRIV@,$(GLESv1_CM_REQ_PRIV),' \
+ -e 's,@GLESv1_CM_PC_LIB_PRIV@,$(GLESv1_CM_PC_LIB_PRIV),' \
+ -e 's,@GLESv1_CM_PC_CFLAGS@,$(GLESv1_CM_PC_CFLAGS),' \
+ -e 's,@GLESv1_CM_LIB@,$(GLESv1_CM_LIB),'
+
+pcedit-es2 = \
+ $(pcedit) \
+ -e 's,@GLESv2_PC_REQ_PRIV@,$(GLESv2_PC_REQ_PRIV),' \
+ -e 's,@GLESv2_PC_LIB_PRIV@,$(GLESv2_PC_LIB_PRIV),' \
+ -e 's,@GLESv2_PC_CFLAGS@,$(GLESv2_PC_CFLAGS),' \
+ -e 's,@GLESv2_LIB@,$(GLESv2_LIB),'
+
+$(GLES_PC): $(GLES_PC).in
+ @sed $(pcedit-$(ES)) $< > $@
+
+install-headers:
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/$(GLES_HEADER)
+ $(INSTALL) -m 644 $(TOP)/include/$(GLES_HEADER)/*.h \
+ $(DESTDIR)$(INSTALL_INC_DIR)/$(GLES_HEADER)
+
+install-pc: $(GLES_PC)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) -m 644 $(GLES_PC) $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+
+install: default install-headers install-pc
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLES_LIB_GLOB) \
+ $(DESTDIR)$(INSTALL_LIB_DIR)
depend: $(GLAPI_SOURCES) $(MAPI_GLAPI_SOURCES)
@echo "running $(MKDEP)"
--- /dev/null
+prefix=@INSTALL_DIR@
+exec_prefix=${prefix}
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: glesv1_cm
+Description: Mesa OpenGL ES 1.1 CM library
+Requires.private: @GLESv1_CM_PC_REQ_PRIV@
+Version: @VERSION@
+Libs: -L${libdir} -l@GLESv1_CM_LIB@
+Libs.private: @GLESv1_CM_PC_LIB_PRIV@
+Cflags: -I${includedir} @GLESv1_CM_PC_CFLAGS@
--- /dev/null
+prefix=@INSTALL_DIR@
+exec_prefix=${prefix}
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
+
+Name: glesv2
+Description: Mesa OpenGL ES 2.0 library
+Requires.private: @GLESv2_PC_REQ_PRIV@
+Version: @VERSION@
+Libs: -L${libdir} -l@GLESv2_LIB@
+Libs.private: @GLESv2_PC_LIB_PRIV@
+Cflags: -I${includedir} @GLESv2_PC_CFLAGS@
dri) $(MAKE) install-libgl install-dri || exit 1 ;; \
*) $(MAKE) install-libgl || exit 1 ;; \
esac ; \
- done; \
- for api in $(APIS) ; do \
- case "$$api" in \
- es1) $(MAKE) install-es1 || exit 1;; \
- es2) $(MAKE) install-es2 || exit 1;; \
- esac; \
done
pcedit = \
gl.pc: gl.pc.in
$(gl_pcedit) $< > $@
-glesv2_pcedit = sed \
- $(pcedit) \
- -e 's,@GLESv2_PC_LIB_PRIV@,$(GLESv2_PC_LIB_PRIV),' \
- -e 's,@GLESv2_LIB@,$(GLESv2_LIB),'
-
-glesv2.pc: glesv2.pc.in
- $(glesv2_pcedit) $< > $@
-
-glesv1_cm_pcedit = sed \
- $(pcedit) \
- -e 's,@GLESv1_CM_PC_LIB_PRIV@,$(GLESv1_CM_PC_LIB_PRIV),' \
- -e 's,@GLESv1_CM_LIB@,$(GLESv1_CM_LIB),'
-
-glesv1_cm.pc: glesv1_cm.pc.in
- $(glesv1_cm_pcedit) $< > $@
-
osmesa_pcedit = sed \
$(pcedit) \
-e 's,@OSMESA_LIB@,$(OSMESA_LIB),' \
$(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-install-headers-es1:
- $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GLES
- $(INSTALL) -m 644 $(TOP)/include/GLES/*.h \
- $(DESTDIR)$(INSTALL_INC_DIR)/GLES
-
-install-es1: default glesv1_cm.pc install-headers-es1
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLESv1_CM_LIB_GLOB) \
- $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -m 644 glesv1_cm.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-
-install-headers-es2:
- $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GLES2
- $(INSTALL) -m 644 $(TOP)/include/GLES2/*.h \
- $(DESTDIR)$(INSTALL_INC_DIR)/GLES2
-
-install-es2: default glesv2.pc install-headers-es2
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
- $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GLESv2_LIB_GLOB) \
- $(DESTDIR)$(INSTALL_LIB_DIR)
- $(INSTALL) -m 644 glesv2.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
-
install-osmesa: default osmesa.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+++ /dev/null
-prefix=@INSTALL_DIR@
-exec_prefix=${prefix}
-libdir=@INSTALL_LIB_DIR@
-includedir=@INSTALL_INC_DIR@
-
-Name: glesv1_cm
-Description: Mesa OpenGL ES 1.1 CM library
-Requires.private: @GLESv1_CM_PC_REQ_PRIV@
-Version: @VERSION@
-Libs: -L${libdir} -l@GLESv1_CM_LIB@
-Libs.private: @GLESv1_CM_PC_LIB_PRIV@
-Cflags: -I${includedir} @GLESv1_CM_PC_CFLAGS@
+++ /dev/null
-prefix=@INSTALL_DIR@
-exec_prefix=${prefix}
-libdir=@INSTALL_LIB_DIR@
-includedir=@INSTALL_INC_DIR@
-
-Name: glesv2
-Description: Mesa OpenGL ES 2.0 library
-Requires.private: @GLESv2_PC_REQ_PRIV@
-Version: @VERSION@
-Libs: -L${libdir} -l@GLESv2_LIB@
-Libs.private: @GLESv2_PC_LIB_PRIV@
-Cflags: -I${includedir} @GLESv2_PC_CFLAGS@