aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKristian Høgsberg <[email protected]>2008-03-10 18:43:53 -0400
committerKristian Høgsberg <[email protected]>2008-03-10 18:46:19 -0400
commitfe23dc5ecae87de73f7b5a581868065a4c4ac09b (patch)
treeccd3ffe6f088ee257f5eca3206ea3ae31c8342de /src/mesa
parent3731159ec6e1527655d91b3eb364d5c2d252ac60 (diff)
Move make install logic for libGL back into src/mesa/Makefile.
This makes make install work again for non-glx libGL implementations. The make install logic is split into three sub-targets: install-libgl, install-osmesa, install-drivers. The install target in src/glx/x11 is then implemented using the src/mesa make install-libgl rule. Thanks to Dan Nicholson for pointing out the breakage.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/Makefile24
-rw-r--r--src/mesa/gl.pc.in11
2 files changed, 33 insertions, 2 deletions
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 87c5e6126de..695a4160942 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -150,20 +150,40 @@ subdirs:
(cd x86-64 ; $(MAKE)) ; \
fi
+pcedit = sed \
+ -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
+ -e 's,@LIB_DIR@,$(LIB_DIR),' \
+ -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),'
-install: default
+gl.pc: gl.pc.in
+ $(pcedit) $< > $@
+
+install-libgl: gl.pc
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
$(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL
+ @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
+ $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
+ fi
+ $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+
+install-osmesa:
@if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
- $(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
+ $(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
fi
+
+install-drivers:
@for target in $(DRIVER_DIRS); do \
case "$$target" in \
dri) cd drivers/dri ; $(MAKE) install ;; \
esac; \
done
+install: default install-libgl install-osmesa install-drivers
+
## NOT INSTALLED YET:
## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES
## $(INSTALL) -m 644 include/GLES/*.h $(DESTDIR)$(INSTALL_DIR)/include/GLES
diff --git a/src/mesa/gl.pc.in b/src/mesa/gl.pc.in
new file mode 100644
index 00000000000..4b144ffa4b2
--- /dev/null
+++ b/src/mesa/gl.pc.in
@@ -0,0 +1,11 @@
+prefix=@INSTALL_DIR@
+exec_prefix=${prefix}
+libdir=${exec_prefix}/@LIB_DIR@
+includedir=${prefix}/include
+
+Name: gl
+Description: Mesa OpenGL library
+Requires:
+Version: @VERSION@
+Libs: -L${libdir} -lGL
+Cflags: -I${includedir}