dfba59
VERSION ?= 19.3.0-rc4
642c2b
SANITIZE ?= 1
642c2b
642c2b
DIRNAME = mesa-${VERSION}
642c2b
642c2b
all: archive
642c2b
642c2b
clean:
642c2b
	rm -rf $(DIRNAME)/
642c2b
	rm -f mesa-${VERSION}.tar.xz
642c2b
642c2b
clone: clean
642c2b
	curl -O https://mesa.freedesktop.org/archive/mesa-${VERSION}.tar.xz
642c2b
	tar xf mesa-${VERSION}.tar.xz
642c2b
642c2b
sanitize: clone vl_mpeg12_decoder.c vl_decoder.c
642c2b
ifdef SANITIZE
642c2b
	cat < vl_mpeg12_decoder.c > $(DIRNAME)/src/gallium/auxiliary/vl/vl_mpeg12_decoder.c
642c2b
	cat < vl_decoder.c > $(DIRNAME)/src/gallium/auxiliary/vl/vl_decoder.c
642c2b
endif
642c2b
642c2b
archive: clone sanitize
642c2b
	tar caf ${DIRNAME}.tar.xz ${DIRNAME}