83d84a
VERSION ?= 22.1.1
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
7073d7
	curl -O https://archive.mesa3d.org/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}