comparison src/osmesa.mk @ 3790:a169ad26bac2

use scons to build osmesa on windows systems
author John W. Eaton <jwe@octave.org>
date Sun, 15 Feb 2015 13:33:36 -0500
parents f6d63f2a2de6
children f2776007d295
comparison
equal deleted inserted replaced
3789:08eb76a22fa0 3790:a169ad26bac2
12 define $(PKG)_UPDATE 12 define $(PKG)_UPDATE
13 echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2; 13 echo 'Warning: Updates are temporarily disabled for package $(PKG).' >&2;
14 echo $($(PKG)_VERSION) 14 echo $($(PKG)_VERSION)
15 endef 15 endef
16 16
17 define $(PKG)_BUILD 17 ifeq ($(MXE_WINDOWS_BUILD),yes)
18 define $(PKG)_BUILD
19 ## FIXME: is machine=x86 the correct thing for 64-bit Windows builds?
20 cd '$(1)' && scons platform=windows toolchain=crossmingw machine=x86 verbose=1 osmesa
21
22 ## Do the scons config files have useful install targets?
23 $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL';
24 for f in '$(1)/include/GL/*.h' ; do \
25 $(INSTALL) -m 644 $$f '$(3)$(HOST_INCDIR)/GL'; \
26 done
27 $(INSTALL) -d '$(3)$(HOST_BINDIR)';
28 $(INSTALL) -m 755 '$(1)/build/windows-x86-debug/mesa/drivers/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll';
29 $(INSTALL) -d '$(3)$(HOST_LIBDIR)';
30 $(INSTALL) -m 644 '$(1)/build/windows-x86-debug/mesa/drivers/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a';
31 endef
32 else
33 define $(PKG)_BUILD
18 mkdir '$(1)/.build' 34 mkdir '$(1)/.build'
19 cd '$(1)' && autoreconf
20 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \ 35 cd '$(1)/.build' && $($(PKG)_CONFIGURE_ENV) '$(1)/configure' \
21 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \ 36 $(CONFIGURE_CPPFLAGS) $(CONFIGURE_LDFLAGS) \
22 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \ 37 $(HOST_AND_BUILD_CONFIGURE_OPTIONS) \
23 --prefix='$(HOST_PREFIX)' \ 38 --prefix='$(HOST_PREFIX)' \
24 --enable-osmesa --disable-dri --without-gallium-drivers --disable-egl \ 39 --enable-osmesa --disable-dri --disable-egl --disable-xvmc \
40 --disable-glx --disable-shared-glapi --disable-gallium-llvm \
41 --with-gallium-drivers="" --with-dri-drivers="" \
42 --with-egl-platforms="" --enable-texture-float \
25 && $(CONFIGURE_POST_HOOK) 43 && $(CONFIGURE_POST_HOOK)
26 44
27 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install DESTDIR='$(3)' 45 $(MAKE) -C '$(1)/.build' -j '$(JOBS)' install DESTDIR='$(3)'
28 endef 46 endef
47 endif