Mercurial > mxe-octave
diff src/suitesparse.mk @ 2868:1c18d3bb1829
Include suitesparse as a dependency of Octave
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 27 Nov 2012 18:12:49 -0500 |
parents | 3b14416f4c51 |
children | c766e4afd493 |
line wrap: on
line diff
--- a/src/suitesparse.mk Mon Nov 26 23:06:19 2012 -0500 +++ b/src/suitesparse.mk Tue Nov 27 18:12:49 2012 -0500 @@ -32,8 +32,25 @@ # install library files $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' - find '$(1)' -name '*.a' \ - -exec $(INSTALL) -m644 {} '$(PREFIX)/$(TARGET)/lib/' \; + for f in `find '$(1)' -name '*.a'`; do \ + if [ $(BUILD_SHARED) = yes ]; then \ + lib=`basename $$f .a`; \ + dir=`dirname $$f`; \ + case $$lib in \ + librbio) \ + deplibs="-lsuitesparseconfig"; \ + ;; \ + libumfpack) \ + deplibs="-lcholmod -lamd -lsuitesparseconfig -lblas"; \ + ;; \ + esac; \ + $(MAKE_SHARED_FROM_STATIC) --ar '$(TARGET)-ar' --ld '$(TARGET)-g++' $$f $$deplibs; \ + $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin'; \ + $(INSTALL) -m644 $$dir/$$lib.dll.a '$(PREFIX)/$(TARGET)/lib/'; \ + $(INSTALL) -m644 $$dir/$$lib.dll '$(PREFIX)/$(TARGET)/bin/'; \ + fi; \ + $(INSTALL) -m644 $$f '$(PREFIX)/$(TARGET)/lib/'; \ + done # install include files $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/suitesparse/'