summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorReFil <31960031+ReFil@users.noreply.github.com>2023-01-12 15:59:01 +0000
committerReFil <31960031+ReFil@users.noreply.github.com>2023-01-12 16:00:49 +0000
commit0e1969630189cee469c92e39aa125e77dbba67a0 (patch)
treea9f1abff6f6d83853ae0cbd145b0ea510fc3f7da /Makefile
parent0fb8e5824fee2fb11f263de745f5b1c0efbcd78a (diff)
Disable SELinux support on OS X
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index abe141b..e1524f6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,21 @@
DOCKER := $(shell { command -v podman || command -v docker; })
TIMESTAMP := $(shell date -u +"%Y%m%d%H%M%S")
+detected_OS := $(shell uname) # Classify UNIX OS
+ifeq ($(detected_OS),Darwin) #We only care if it's OS X
+SELINUX1 :=
+SELINUX2 :=
+else
+SELINUX1 := :z
+SELINUX2 := ,z
+endif
.PHONY: all clean
all:
$(DOCKER) build --tag zmk --file Dockerfile .
$(DOCKER) run --rm -it --name zmk \
- -v $(PWD)/firmware:/app/firmware:z \
- -v $(PWD)/config:/app/config:ro,z \
+ -v $(PWD)/firmware:/app/firmware$(SELINUX1) \
+ -v $(PWD)/config:/app/config:ro$(SELINUX2) \
-e TIMESTAMP=$(TIMESTAMP) \
zmk