File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ ifneq (,)
2+ .error This Makefile requires GNU Make.
3+ endif
4+
5+ ifndef VERBOSE
6+ MAKEFLAGS += --no-print-directory
7+ endif
8+
9+
10+ # -------------------------------------------------------------------------------------------------
11+ # Default configuration
12+ # -------------------------------------------------------------------------------------------------
13+ ARCH = linux/amd64
14+
15+
16+ # -------------------------------------------------------------------------------------------------
17+ # Dynamic configuration
18+ # -------------------------------------------------------------------------------------------------
19+ _PLATFORM = $(shell uname -m)
20+
21+ ifeq ($(strip $(_PLATFORM)),x86_64)
22+ ARCH = linux/amd64
23+ else
24+ ifeq ($(strip $(_PLATFORM)),arm64)
25+ ARCH = linux/arm64
26+ endif
27+ endif
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
15+ MAKEFILES = Makefile.docker Makefile.lint Makefile.platform
1616$(MAKEFILES ) : URL=https://raw.githubusercontent.com/devilbox/makefiles/master/$(@ )
1717$(MAKEFILES ) :
1818 @if ! (curl --fail -sS -o $( @) $( URL) || wget -O $( @) $( URL) ); then \
@@ -23,6 +23,13 @@ $(MAKEFILES):
2323include $(MAKEFILES )
2424```
2525
26+ `.gitignore` :
27+ ```gitignore
28+ Makefile.docker
29+ Makefile.lint
30+ Makefile.platform
31+ ```
32+
2633
2734## License
2835
You can’t perform that action at this time.
0 commit comments