mirror of
https://github.com/pion/mediadevices.git
synced 2026-04-23 00:07:29 +08:00
0b1a19f343
By switching to Makefile, parallel builds and single build are now
possible.
Examples:
Parallel Build:
make -j
Single Build:
make opus-darwin-x64
Also, since Makefile has a dependency change detection feature, the
build time is reduced significantly when there are only a few things that
change, Makefile will not rebuild everything unnecessarily.
12 lines
397 B
Makefile
12 lines
397 B
Makefile
dockerfiles := $(wildcard *.Dockerfile)
|
|
supported_platforms := $(dockerfiles:.Dockerfile=)
|
|
|
|
.PHONY: all
|
|
all: $(supported_platforms)
|
|
|
|
%: %.Dockerfile guard-MEDIADEVICES_DOCKER_OWNER guard-MEDIADEVICES_DOCKER_PREFIX
|
|
docker build -t "$(MEDIADEVICES_DOCKER_OWNER)/$(MEDIADEVICES_DOCKER_PREFIX)-$@" -f "$<" .
|
|
|
|
guard-%:
|
|
@if [ -z ${$*} ]; then echo "$* is a required environment variable"; exit 1; fi
|