comparison src/octave.mk @ 3144:433d1bb3cafb

[MSVC] enable octave compilation
author Michael Goffioul <michael.goffioul@gmail.com>
date Mon, 15 Jul 2013 21:29:42 -0400
parents 076acecb9c21
children d1231b6c2b34
comparison
equal deleted inserted replaced
3143:a2afd94e919f 3144:433d1bb3cafb
8 $(PKG)_FILE := octave-$($(PKG)_VERSION).tar.gz 8 $(PKG)_FILE := octave-$($(PKG)_VERSION).tar.gz
9 $(PKG)_URL := ftp://alpha.gnu.org/gnu/octave/$($(PKG)_FILE) 9 $(PKG)_URL := ftp://alpha.gnu.org/gnu/octave/$($(PKG)_FILE)
10 $(PKG)_DEPS := arpack curl fftw fltk fontconfig glpk gnuplot graphicsmagick hdf5 lapack pcre pstoedit qhull qrupdate qscintilla qt readline suitesparse texinfo zlib 10 $(PKG)_DEPS := arpack curl fftw fltk fontconfig glpk gnuplot graphicsmagick hdf5 lapack pcre pstoedit qhull qrupdate qscintilla qt readline suitesparse texinfo zlib
11 ifeq ($(ENABLE_JIT),yes) 11 ifeq ($(ENABLE_JIT),yes)
12 $(PKG)_DEPS += llvm 12 $(PKG)_DEPS += llvm
13 $(PKG)_ENABLE_JIT_CONFIGURE_OPTIONS := --enable-jit
13 endif 14 endif
14 15
15 ifeq ($(ENABLE_OPENBLAS),yes) 16 ifeq ($(ENABLE_OPENBLAS),yes)
16 $(PKG)_DEPS += openblas 17 $(PKG)_DEPS += openblas
17 $(PKG)_BLAS_OPTION := --with-blas=openblas 18 $(PKG)_BLAS_OPTION := --with-blas=openblas
33 $(PKG)_ENABLE_64_CONFIGURE_OPTIONS := --enable-64 ax_blas_f77_func_ok=yes 34 $(PKG)_ENABLE_64_CONFIGURE_OPTIONS := --enable-64 ax_blas_f77_func_ok=yes
34 endif 35 endif
35 endif 36 endif
36 endif 37 endif
37 38
39 ifeq ($(MXE_SYSTEM),msvc)
40 $(PKG)_PREFIX := '$(HOST_PREFIX)/local/$($(PKG)_SUBDIR)'
41 # - Enable atomic refcount (required for QtHandles)
42 # - Skip configure test for pow and sqrt, MSVC fails to compile them
43 # because it uses intrinsics (with -O2 flag) and bump on the fake
44 # "char FUNC()" forward declaration.
45 $(PKG)_EXTRA_CONFIGURE_OPTIONS := \
46 --enable-atomic-refcount \
47 ac_cv_func_pow=yes ac_cv_func_sqrt=yes
48 $(PKG)_CONFIGURE_POST_HOOK := $(CONFIGURE_POST_HOOK) -x
49 else
50 $(PKG)_PREFIX := '$(HOST_PREFIX)'
51 $(PKG)_EXTRA_CONFIGURE_OPTIONS := \
52 LDFLAGS='-Wl,-rpath-link,$(HOST_LIBDIR) -L$(HOST_LIBDIR)'
53 endif
54
38 define $(PKG)_UPDATE 55 define $(PKG)_UPDATE
39 echo 'Warning: Updates are temporarily disabled for package octave.' >&2; 56 echo 'Warning: Updates are temporarily disabled for package octave.' >&2;
40 echo $(octave_VERSION) 57 echo $(octave_VERSION)
41 endef 58 endef
42 59
43 define $(PKG)_BUILD 60 define $(PKG)_BUILD
44 mkdir '$(1)/.build' 61 mkdir '$(1)/.build'
45 cd '$(1)' && autoreconf -W none 62 cd '$(1)' && autoreconf -W none
46 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \ 63 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \
47 $(CONFIGURE_CPPFLAGS) \ 64 $(CONFIGURE_CPPFLAGS) \
48 LDFLAGS='-Wl,-rpath-link,$(HOST_LIBDIR) -L$(HOST_LIBDIR)' \
49 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ 65 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
50 --prefix='$(HOST_PREFIX)' \ 66 --prefix='$($(PKG)_PREFIX)' \
51 $($(PKG)_BLAS_OPTION) \ 67 $($(PKG)_BLAS_OPTION) \
52 $($(PKG)_CROSS_CONFIG_OPTIONS) \ 68 $($(PKG)_CROSS_CONFIG_OPTIONS) \
53 $($(PKG)_ENABLE_64_CONFIGURE_OPTIONS) 69 $($(PKG)_ENABLE_64_CONFIGURE_OPTIONS) \
70 $($(PKG)_ENABLE_JIT_CONFIGURE_OPTIONS) \
71 $($(PKG)_EXTRA_CONFIGURE_OPTIONS) \
72 PKG_CONFIG='$(MXE_PKG_CONFIG)' \
73 PKG_CONFIG_PATH='$(HOST_LIBDIR)/pkgconfig' \
74 && $($(PKG)_CONFIGURE_POST_HOOK)
54 75
55 ## We want both of these install steps so that we install in the 76 ## We want both of these install steps so that we install in the
56 ## location set by the configure --prefix option, and the other 77 ## location set by the configure --prefix option, and the other
57 ## in a directory tree that will have just Octave files. 78 ## in a directory tree that will have just Octave files.
58 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install 79 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install
59 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' DESTDIR=$(TOP_DIR)/octave install 80 if [ $(MXE_SYSTEM) != msvc ]; then \
81 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' DESTDIR=$(TOP_DIR)/octave install; \
82 fi
60 endef 83 endef
61 84