diff options
Diffstat (limited to 'tools/niminst/makefile.nimf')
-rw-r--r-- | tools/niminst/makefile.nimf | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/tools/niminst/makefile.nimf b/tools/niminst/makefile.nimf index ad9d55c03..002bc0592 100644 --- a/tools/niminst/makefile.nimf +++ b/tools/niminst/makefile.nimf @@ -16,6 +16,7 @@ endif target := ?{"$(binDir)/" & toLowerAscii(c.name)} + ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"') ifeq ($(OS),Windows_NT) uos := windows @@ -25,7 +26,8 @@ endif ifeq ($(uos),linux) myos = linux - LDFLAGS += -ldl -lm + ## add -lrt to avoid "undefined reference to `clock_gettime'" with glibc<2.17 + LDFLAGS += -ldl -lm -lrt endif ifeq ($(uos),dragonfly) myos = freebsd @@ -43,6 +45,7 @@ endif ifeq ($(uos),netbsd) myos = netbsd LDFLAGS += -lm + ucpu = $(shell sh -c 'uname -p') endif ifeq ($(uos),darwin) myos = macosx @@ -102,9 +105,18 @@ endif ifeq ($(ucpu),x86_64) mycpu = amd64 endif +ifeq ($(ucpu),parisc64) + mycpu = hppa +endif +ifeq ($(ucpu),s390x) + mycpu = s390x +endif ifeq ($(ucpu),sparc) mycpu = sparc endif +ifeq ($(ucpu),sparc64) + mycpu = sparc64 +endif ifeq ($(ucpu),sun) mycpu = sparc endif @@ -124,10 +136,13 @@ ifeq ($(ucpu),powerpc) mycpu = $(shell sh -c 'uname -p | tr "[:upper:]" "[:lower:]"') CFLAGS += -m64 LDFLAGS += -m64 + ifeq ($(mycpu),powerpc64le) + mycpu = powerpc64el + endif endif endif ifeq ($(ucpu),ppc) - mycpu = ppc + mycpu = powerpc endif ifneq (,$(filter $(ucpu), mips mips64)) mycpu = $(shell /bin/sh -c '"$(CC)" -dumpmachine | sed "s/-.*//"') @@ -153,14 +168,26 @@ endif ifeq ($(ucpu),armv7hl) mycpu = arm endif +ifeq ($(ucpu),armv8l) + mycpu = arm +endif ifeq ($(ucpu),aarch64) mycpu = arm64 endif +ifeq ($(ucpu),arm64) + mycpu = arm64 +endif ifeq ($(ucpu),riscv64) mycpu = riscv64 endif +ifeq ($(ucpu),e2k) + mycpu = e2k +endif +ifeq ($(ucpu),loongarch64) + mycpu = loongarch64 +endif ifndef mycpu - $(error unknown processor: $(ucpu)) + $(error unknown CPU architecture: $(ucpu) See makefile.nimf) endif # for osA in 1..c.oses.len: |