Mercurial > mxe-octave
comparison src/suitesparse.mk @ 2997:4f9b72cf7ee7
allow native builds too
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 May 2013 17:31:59 -0400 |
parents | 7811f0697a7a |
children | b6c7244a2f66 |
comparison
equal
deleted
inserted
replaced
2996:446aa596bb99 | 2997:4f9b72cf7ee7 |
---|---|
37 find '$(1)' -name 'Makefile' \ | 37 find '$(1)' -name 'Makefile' \ |
38 -exec $(SED) -i 's,( cd Demo,#( cd Demo,' {} \; | 38 -exec $(SED) -i 's,( cd Demo,#( cd Demo,' {} \; |
39 | 39 |
40 # build all | 40 # build all |
41 $(MAKE) -C '$(1)' -j '$(JOBS)' \ | 41 $(MAKE) -C '$(1)' -j '$(JOBS)' \ |
42 CC='$(TARGET)-gcc' \ | 42 CC='$(MXE_CC)' \ |
43 CXX='$(TARGET)-g++' \ | 43 CXX='$(MXE_CXX)' \ |
44 CPLUSPLUS='$(TARGET)-g++' \ | 44 CPLUSPLUS='$(MXE_CXX)' \ |
45 F77='$(TARGET)-gfortran' \ | 45 F77='$(MXE_F77)' \ |
46 AR='$(TARGET)-ar' \ | 46 FFLAGS='$(MXE_FFLAGS)' \ |
47 CFLAGS='$(MXE_CFLAGS)' \ | |
48 CXXFLAGS='$(MXE_CXXFLAGS)' \ | |
49 AR='$(MXE_AR)' \ | |
47 RANLIB='$(TARGET)-ranlib' \ | 50 RANLIB='$(TARGET)-ranlib' \ |
48 BLAS='-lblas -lgfortran -lgfortranbegin' \ | 51 BLAS='-lblas -lgfortran -lgfortranbegin' \ |
49 CHOLMOD_CONFIG='-DNPARTITION' | 52 CHOLMOD_CONFIG='-DNPARTITION' |
50 | 53 |
51 # install library files | 54 # install library files |
52 $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib' | 55 $(INSTALL) -d '$(MXE_LIBDIR)' |
53 | 56 |
54 for f in $(addprefix $(1)/, $($(PKG)_STATICLIBS_1)); do \ | 57 for f in $(addprefix $(1)/, $($(PKG)_STATICLIBS_1)); do \ |
55 if [ $(BUILD_SHARED) = yes ]; then \ | 58 if [ $(BUILD_SHARED) = yes ]; then \ |
56 lib=`basename $$f .a`; \ | 59 lib=`basename $$f .a`; \ |
57 dir=`dirname $$f`; \ | 60 dir=`dirname $$f`; \ |
75 ;; \ | 78 ;; \ |
76 esac; \ | 79 esac; \ |
77 if [ -n "$deplibs" ]; then \ | 80 if [ -n "$deplibs" ]; then \ |
78 echo " deplibs = $$deplibs"; \ | 81 echo " deplibs = $$deplibs"; \ |
79 fi; \ | 82 fi; \ |
80 $(MAKE_SHARED_FROM_STATIC) --ar '$(TARGET)-ar' --ld '$(TARGET)-g++' $$f $$deplibs; \ | 83 $(MAKE_SHARED_FROM_STATIC) --ar '$(MXE_AR)' --ld '$(MXE_CXX)' $$f --install '$(INSTALL)' --libdir '$(MXE_LIBDIR)' --bindir '$(MXE_BINDIR)' $$deplibs; \ |
81 $(INSTALL) -d '$(PREFIX)/$(TARGET)/bin'; \ | |
82 $(INSTALL) -m755 $$dir/$$lib.dll.a $(PREFIX)/$(TARGET)/lib/$$lib.dll.a; \ | |
83 $(INSTALL) -m755 $$dir/$$lib.dll $(PREFIX)/$(TARGET)/bin/$$lib.dll; \ | |
84 fi; \ | 84 fi; \ |
85 $(INSTALL) -m644 $$f $(PREFIX)/$(TARGET)/lib/$$lib.a; \ | |
86 done | 85 done |
87 | 86 |
88 # install include files | 87 # install include files |
89 $(INSTALL) -d '$(PREFIX)/$(TARGET)/include/suitesparse/' | 88 $(INSTALL) -d '$(MXE_INCDIR)/suitesparse/' |
90 $(INSTALL) -m644 '$(1)/SuiteSparse_config/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 89 $(INSTALL) -m644 '$(1)/SuiteSparse_config/'*.h '$(MXE_INCDIR)/suitesparse/' |
91 $(INSTALL) -m644 '$(1)/AMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 90 $(INSTALL) -m644 '$(1)/AMD/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
92 $(INSTALL) -m644 '$(1)/BTF/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 91 $(INSTALL) -m644 '$(1)/BTF/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
93 $(INSTALL) -m644 '$(1)/CAMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 92 $(INSTALL) -m644 '$(1)/CAMD/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
94 $(INSTALL) -m644 '$(1)/CCOLAMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 93 $(INSTALL) -m644 '$(1)/CCOLAMD/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
95 $(INSTALL) -m644 '$(1)/CHOLMOD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 94 $(INSTALL) -m644 '$(1)/CHOLMOD/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
96 $(INSTALL) -m644 '$(1)/COLAMD/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 95 $(INSTALL) -m644 '$(1)/COLAMD/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
97 $(INSTALL) -m644 '$(1)/CSparse/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 96 $(INSTALL) -m644 '$(1)/CSparse/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
98 $(INSTALL) -m644 '$(1)/CXSparse/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 97 $(INSTALL) -m644 '$(1)/CXSparse/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
99 $(INSTALL) -m644 '$(1)/KLU/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 98 $(INSTALL) -m644 '$(1)/KLU/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
100 $(INSTALL) -m644 '$(1)/LDL/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 99 $(INSTALL) -m644 '$(1)/LDL/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
101 $(INSTALL) -m644 '$(1)/SPQR/Include/'* '$(PREFIX)/$(TARGET)/include/suitesparse/' | 100 $(INSTALL) -m644 '$(1)/SPQR/Include/'* '$(MXE_INCDIR)/suitesparse/' |
102 $(INSTALL) -m644 '$(1)/UMFPACK/Include/'*.h '$(PREFIX)/$(TARGET)/include/suitesparse/' | 101 $(INSTALL) -m644 '$(1)/UMFPACK/Include/'*.h '$(MXE_INCDIR)/suitesparse/' |
103 endef | 102 endef |