summaryrefslogtreecommitdiff
path: root/src/glu/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/glu/Makefile')
-rw-r--r--src/glu/Makefile24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/glu/Makefile b/src/glu/Makefile
index b8c55db6d0..b025a90b67 100644
--- a/src/glu/Makefile
+++ b/src/glu/Makefile
@@ -10,14 +10,26 @@ SUBDIRS = $(GLU_DIRS)
default: $(TOP)/configs/current
@for dir in $(SUBDIRS) ; do \
- (cd $$dir ; $(MAKE)) ; \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
done
-install:
- $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
- $(INSTALL) $(TOP)/$(LIB_DIR)/libGLU.* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+# GLU pkg-config file
+pcedit = sed \
+ -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),'
+glu.pc: glu.pc.in
+ $(pcedit) $< > $@
+
+install: glu.pc
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
+ $(INSTALL) $(TOP)/$(LIB_DIR)/$(GLU_LIB_GLOB) $(DESTDIR)$(INSTALL_LIB_DIR)
+ $(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig
clean:
- @for dir in $(SUBDIRS) ; do \
- (cd $$dir ; $(MAKE) clean) ; \
+ -@for dir in $(SUBDIRS) ; do \
+ (cd $$dir && $(MAKE) clean) ; \
done
+ -rm -f *.pc