summarylogtreecommitdiffstats
path: root/Makefile
blob: 7c74715b5fa54bae7bb18035ac50e6e688821e23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
MAKEFLAGS += --no-builtin-rules
OUTPUT = $(shell bash -c 'source PKGBUILD && echo mitsuba2-git-$pkgver-$pkgrel-x86_64.pkg.tar.zst')

PKGREL = $(shell bash -c 'source PKGBUILD && echo $pkgver')

.PHONY: check help clean distclean
.DEFAULT: help

check:: .SRCINFO

help:: ## show this help text
	@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "  %-13s - %s\n", $$1, $$2}'

clean:: ## remove files associated with this build
	rm -rf pkg src

distclean:: clean ## remove all downloaded and built files
	rm -f mitsuba2-git-*-x86_64.pkg.tar.zst
	rm -rf asmjit enoki mitsuba-data mitsuba2 openexr tbb tinyformat

.SRCINFO: PKGBUILD ## update the .SRCINFO file
	makepkg --printsrcinfo > $@

build: ${OUTPUT} ## build package

${OUTPUT}: PKGBUILD
	makepkg -sf