File tree Expand file tree Collapse file tree 3 files changed +10
-30
lines changed
Expand file tree Collapse file tree 3 files changed +10
-30
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,19 @@ IMAGE =
1919# -------------------------------------------------------------------------------------------------
2020NO_CACHE =
2121ARGS =
22- ARCH = linux/amd64
2322DOCKER_TAG = latest
2423DIR = .
2524FILE = Dockerfile
2625
26+ # Auto-detect current platform and use it as default to build for
27+ _PLATFORM = $(shell uname -m)
28+ ifeq ($(strip $(_PLATFORM)),x86_64)
29+ ARCH = linux/amd64
30+ else
31+ ifeq ($(strip $(_PLATFORM)),arm64)
32+ ARCH = linux/arm64
33+ endif
34+ endif
2735
2836# -------------------------------------------------------------------------------------------------
2937# Targets
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ ifneq (,)
1212endif
1313
1414# Ensure additional Makefiles are present
15- MAKEFILES = Makefile.docker Makefile.lint Makefile.platform
15+ MAKEFILES = Makefile.docker Makefile.lint
1616$(MAKEFILES ) : URL=https://raw.githubusercontent.com/devilbox/makefiles/master/$(@ )
1717$(MAKEFILES ) :
1818 @if ! (curl --fail -sS -o $( @) $( URL) || wget -O $( @) $( URL) ); then \
@@ -27,7 +27,6 @@ include $(MAKEFILES)
2727```gitignore
2828Makefile.docker
2929Makefile.lint
30- Makefile.platform
3130```
3231
3332
You can’t perform that action at this time.
0 commit comments