# HG changeset patch # User John W. Eaton # Date 1508338232 14400 # Node ID 1fdd8063e38d29dee2bd111a57303ae1839e9aa2 # Parent 859c456e1257df036b0ba19258d65f32dc22b1c3 mesa: windows: optionally build opengl target; build in release mode diff -r 859c456e1257 -r 1fdd8063e38d src/mesa.mk --- a/src/mesa.mk Wed Oct 18 09:27:04 2017 -0400 +++ b/src/mesa.mk Wed Oct 18 10:50:32 2017 -0400 @@ -10,7 +10,7 @@ $(PKG)_DEPS := build-mako s2tc zlib ifeq ($(MXE_WINDOWS_BUILD),yes) ifeq ($(USE_SYSTEM_OPENGL),no) - $(PKG)_CONFIGURE_OPENGL_OPTIONS := libgl-gdi + $(PKG)_SCONS_OPENGL_OPTIONS := libgl-gdi endif else ifeq ($(USE_SYSTEM_OPENGL),yes) @@ -43,17 +43,23 @@ $(PKG)_MACHINE := x86 endif define $(PKG)_BUILD - cd '$(1)' && scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 osmesa $($(PKG)_CONFIGURE_OPENGL_OPTIONS) + cd '$(1)' && scons platform=windows toolchain=crossmingw machine=$($(PKG)_MACHINE) verbose=1 build=release osmesa $($(PKG)_SCONS_OPENGL_OPTIONS) ## Do the scons config files have useful install targets? $(INSTALL) -d '$(3)$(HOST_INCDIR)/GL'; for f in '$(1)/include/GL/*.h' ; do \ $(INSTALL) -m 644 $$f '$(3)$(HOST_INCDIR)/GL'; \ done + + $(INSTALL) -d '$(3)$(HOST_LIBDIR)'; + $(INSTALL) -m 644 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a'; + $(INSTALL) -d '$(3)$(HOST_BINDIR)'; - $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)-debug/mesa/drivers/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll'; - $(INSTALL) -d '$(3)$(HOST_LIBDIR)'; - $(INSTALL) -m 644 '$(1)/build/windows-$($(PKG)_MACHINE)-debug/mesa/drivers/osmesa/libosmesa.a' '$(3)$(HOST_LIBDIR)/libOSMesa.a'; + $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/osmesa/osmesa.dll' '$(3)$(HOST_BINDIR)/osmesa.dll'; + + if [ -f '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' ]; then \ + $(INSTALL) -m 755 '$(1)/build/windows-$($(PKG)_MACHINE)/gallium/targets/libgl-gdi/opengl32.dll' '$(3)$(HOST_BINDIR)/opengl32.dll'; \ + fi endef else define $(PKG)_BUILD