comparison src/mesa.mk @ 4513:1fdd8063e38d

mesa: windows: optionally build opengl target; build in release mode
author John W. Eaton <jwe@octave.org>
date Wed, 18 Oct 2017 10:50:32 -0400
parents 0117b5797a5c
children 0f62ac5c6fd8
comparison
equal deleted inserted replaced
4512:859c456e1257 4513:1fdd8063e38d
8 $(PKG)_FILE := mesa-$($(PKG)_VERSION).tar.xz 8 $(PKG)_FILE := mesa-$($(PKG)_VERSION).tar.xz
9 $(PKG)_URL := ftp://ftp.freedesktop.org/pub/mesa/$($(PKG)_FILE) 9 $(PKG)_URL := ftp://ftp.freedesktop.org/pub/mesa/$($(PKG)_FILE)
10 $(PKG)_DEPS := build-mako s2tc zlib 10 $(PKG)_DEPS := build-mako s2tc zlib
11 ifeq ($(MXE_WINDOWS_BUILD),yes) 11 ifeq ($(MXE_WINDOWS_BUILD),yes)
12 ifeq ($(USE_SYSTEM_OPENGL),no) 12 ifeq ($(USE_SYSTEM_OPENGL),no)
13 $(PKG)_CONFIGURE_OPENGL_OPTIONS := libgl-gdi 13 $(PKG)_SCONS_OPENGL_OPTIONS := libgl-gdi
14 endif 14 endif
15 else 15 else
16 ifeq ($(USE_SYSTEM_OPENGL),yes) 16 ifeq ($(USE_SYSTEM_OPENGL),yes)
17 $(PKG)_CONFIGURE_OPENGL_OPTIONS := \ 17 $(PKG)_CONFIGURE_OPENGL_OPTIONS := \
18 --disable-opengl --disable-egl --disable-gles1 --disable-gles2 \ 18 --disable-opengl --disable-egl --disable-gles1 --disable-gles2 \
41 $(PKG)_MACHINE := x86_64 41 $(PKG)_MACHINE := x86_64
42 else 42 else
43 $(PKG)_MACHINE := x86 43 $(PKG)_MACHINE := x86
44 endif 44 endif
45 define $(PKG)_BUILD 45 define $(PKG)_BUILD
46 cd '$(1)' && scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 osmesa $($(PKG)_CONFIGURE_OPENGL_OPTIONS) 46 cd '$(1)' && scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 build=release osmesa $($(PKG)_SCONS_OPENGL_OPTIONS)
47 47
48 ## Do the scons config files have useful install targets? 48 ## Do the scons config files have useful install targets?
49 $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL'; 49 $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL';
50 for f in '$(1)/include/GL/*.h' ; do \ 50 for f in '$(1)/include/GL/*.h' ; do \
51 $(INSTALL) -m 644 $$f '$(3)$(HOST_INCDIR)/GL'; \ 51 $(INSTALL) -m 644 $$f '$(3)$(HOST_INCDIR)/GL'; \
52 done 52 done
53
54 $(INSTALL) -d '$(3)$(HOST_LIBDIR)';
55 $(INSTALL) -m 644 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a';
56
53 $(INSTALL) -d '$(3)$(HOST_BINDIR)'; 57 $(INSTALL) -d '$(3)$(HOST_BINDIR)';
54 $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)-debug/mesa/drivers/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll'; 58 $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll';
55 $(INSTALL) -d '$(3)$(HOST_LIBDIR)'; 59
56 $(INSTALL) -m 644 '$(1)/build/windows-$($(PKG)_MACHINE)-debug/mesa/drivers/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a'; 60 if [ -f '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' ]; then \
61 $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' '$(3)$(HOST_BINDIR)/opengl32.dll'; \
62 fi
57 endef 63 endef
58 else 64 else
59 define $(PKG)_BUILD 65 define $(PKG)_BUILD
60 mkdir '$(1)/.build' 66 mkdir '$(1)/.build'
61 cd '$(1)' && autoreconf -fi -I m4 67 cd '$(1)' && autoreconf -fi -I m4