criu/scripts/nmk/scripts/include.mk
Haorong Lu 95359a62aa compel: add riscv64 support
Co-authored-by: Yixue Zhao <felicitia2010@gmail.com>
Co-authored-by: stove <stove@rivosinc.com>
Signed-off-by: Haorong Lu <ancientmodern4@gmail.com>
---
- rebased
- added a membarrier() to syscall table (fix authored by Cryolitia PukNgae)
Signed-off-by: PukNgae Cryolitia <Cryolitia@gmail.com>
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
2025-03-21 12:40:31 -07:00

58 lines
1.4 KiB
Makefile

ifndef ____nmk_defined__include
ifndef ____nmk_defined__msg
include $(__nmk_dir)msg.mk
endif
.PHONY: all help test docs clean install .FORCE
#
# Common vars.
SUBARCH ?= $(shell uname -m)
ARCH ?= $(shell echo $(SUBARCH) | sed \
-e s/i.86/x86/ \
-e s/x86_64/x86/ \
-e s/sun4u/sparc64/ \
-e s/arm.*/arm/ \
-e s/sa110/arm/ \
-e s/s390x/s390/ \
-e s/parisc64/parisc/ \
-e s/ppc64.*/ppc64/ \
-e s/mips.*/mips/ \
-e s/sh[234].*/sh/ \
-e s/aarch64.*/aarch64/ \
-e s/riscv64.*/riscv64/ \
-e s/loongarch64.*/loongarch64/)
export SUBARCH ARCH
ifndef ____nmk_defined__tools
include $(__nmk_dir)tools.mk
endif
# Do not use make's built-in rules and variables
# (this increases performance and avoids hard-to-debug behaviour).
MAKEFLAGS += -rR --no-print-directory
export MAKEFLAGS
# Avoid funny character set dependencies.
unexport LC_ALL
LC_COLLATE=C
LC_NUMERIC=C
export LC_COLLATE LC_NUMERIC
# Avoid interference with shell env settings.
unexport GREP_OPTIONS
# Shorthand for build.
build := -r -R -f $(__nmk_dir)main.mk makefile=Makefile obj
export build
# With specified Makefile
build-as = -r -R -f $(__nmk_dir)main.mk makefile=$(1) obj=$(2)
export build-as
#
# Footer.
____nmk_defined__include = y
endif