diff options
author | Chia-I Wu <olv@lunarg.com> | 2010-05-06 10:46:51 +0800 |
---|---|---|
committer | Chia-I Wu <olv@lunarg.com> | 2010-05-08 14:55:57 +0800 |
commit | 559046e7917e5b9e4226bb02e86da17e62f1385e (patch) | |
tree | 2dcf0d029dfa3eda3d7444fbaaa398825fcc4f8d /src/mapi | |
parent | bc918efb5643a6d23711b2ae6247be87615c847d (diff) |
mapi: Add install rules for OpenGL ES.
Move the install rules for OpenGL ES from src/mesa/Makefile to mapi.
Diffstat (limited to 'src/mapi')
-rw-r--r-- | src/mapi/es1api/Makefile | 45 | ||||
-rw-r--r-- | src/mapi/es1api/glesv1_cm.pc.in | 12 | ||||
-rw-r--r-- | src/mapi/es2api/glesv2.pc.in | 12 |
3 files changed, 67 insertions, 2 deletions
diff --git a/src/mapi/es1api/Makefile b/src/mapi/es1api/Makefile index 9c5f26745f..73be93e941 100644 --- a/src/mapi/es1api/Makefile +++ b/src/mapi/es1api/Makefile @@ -7,6 +7,9 @@ include $(TOP)/configs/current 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) @@ -15,6 +18,9 @@ GLES_LIB_MAJOR := 1 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) @@ -83,6 +89,7 @@ glapi-stamp: .PHONY: clean clean: + -rm -f $(GLES_PC) -rm -f $(TOP)/$(LIB_DIR)/$(GLES_LIB_NAME) -rm -f lib$(ESAPI).a -rm -f $(ESAPI_OBJECTS) @@ -91,8 +98,42 @@ clean: @# 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)" diff --git a/src/mapi/es1api/glesv1_cm.pc.in b/src/mapi/es1api/glesv1_cm.pc.in new file mode 100644 index 0000000000..291f5abf3f --- /dev/null +++ b/src/mapi/es1api/glesv1_cm.pc.in @@ -0,0 +1,12 @@ +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@ diff --git a/src/mapi/es2api/glesv2.pc.in b/src/mapi/es2api/glesv2.pc.in new file mode 100644 index 0000000000..3b747cbee7 --- /dev/null +++ b/src/mapi/es2api/glesv2.pc.in @@ -0,0 +1,12 @@ +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@ |