summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-07-03 09:17:44 -0700
committerJosé Fonseca <jfonseca@vmware.com>2011-07-11 20:04:43 +0100
commit4b7d829fa33b5099d1adabc04c4b09ef050a2d8a (patch)
treecdba0fb7e7d21bfb8a6d88f4fc364695f4b9309d
parente315feb1699be395087b3a1c5a397070be5eefb0 (diff)
downloadglut-4b7d829fa33b5099d1adabc04c4b09ef050a2d8a.tar.gz
Set library and header installation directories from configuration
Currently the installation directories for libraries and headers are resolved within the install commands. For instance, the libraries will be installed to $(INSTALL_DIR)/$(LIB_DIR). This limits the flexibility of the installation, such as when the libraries should be installed to a subdirectory like /usr/lib/tls. This adds the make variables $(INSTALL_LIB_DIR) and $(INSTALL_INC_DIR) to define the locations that the libraries and headers are installed. For the static configs, this resolves exactly as before to $(INSTALL_DIR)/include and $(INSTALL_DIR)/$(LIB_DIR). For autoconf, they are derived directly from the --libdir and --includedir settings.
-rw-r--r--src/glut/fbdev/Makefile8
-rw-r--r--src/glut/glx/Makefile15
-rw-r--r--src/glut/glx/glut.pc.in4
-rw-r--r--src/glut/mini/Makefile15
-rw-r--r--src/glut/mini/glut.pc.in4
5 files changed, 24 insertions, 22 deletions
diff --git a/src/glut/fbdev/Makefile b/src/glut/fbdev/Makefile
index 306226a..a80f384 100644
--- a/src/glut/fbdev/Makefile
+++ b/src/glut/fbdev/Makefile
@@ -69,10 +69,10 @@ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
$(MKLIB_OPTIONS) $(OBJECTS)
install:
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
# Run 'make -f Makefile.solo dep' to update the dependencies if you change
# what's included by any source file.
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 8443258..37341ed 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -100,18 +100,19 @@ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME): depend $(OBJECTS)
# glut pkgconfig file
pcedit = sed \
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
- -e 's,@LIB_DIR@,$(LIB_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
glut.pc: glut.pc.in
$(pcedit) $< > $@
install: glut.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/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
clean:
diff --git a/src/glut/glx/glut.pc.in b/src/glut/glx/glut.pc.in
index f732f29..e8638fe 100644
--- a/src/glut/glx/glut.pc.in
+++ b/src/glut/glx/glut.pc.in
@@ -1,7 +1,7 @@
prefix=@INSTALL_DIR@
exec_prefix=${prefix}
-libdir=${exec_prefix}/@LIB_DIR@
-includedir=${prefix}/include
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
Name: glut
Description: Mesa OpenGL Utility Toolkit library
diff --git a/src/glut/mini/Makefile b/src/glut/mini/Makefile
index 8754fde..a79f555 100644
--- a/src/glut/mini/Makefile
+++ b/src/glut/mini/Makefile
@@ -76,18 +76,19 @@ tags:
# glut pkgconfig file
pcedit = sed \
-e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \
- -e 's,@LIB_DIR@,$(LIB_DIR),' \
+ -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \
+ -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \
-e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),'
glut.pc: glut.pc.in
$(pcedit) $< > $@
install: glut.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/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL
- $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_INC_DIR)/GL
+ $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
# Remove .o and backup files
diff --git a/src/glut/mini/glut.pc.in b/src/glut/mini/glut.pc.in
index f732f29..e8638fe 100644
--- a/src/glut/mini/glut.pc.in
+++ b/src/glut/mini/glut.pc.in
@@ -1,7 +1,7 @@
prefix=@INSTALL_DIR@
exec_prefix=${prefix}
-libdir=${exec_prefix}/@LIB_DIR@
-includedir=${prefix}/include
+libdir=@INSTALL_LIB_DIR@
+includedir=@INSTALL_INC_DIR@
Name: glut
Description: Mesa OpenGL Utility Toolkit library