diff options
author | Oliver Upton <oliver.upton@linux.dev> | 2024-02-26 20:37:15 +0000 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2024-02-26 20:37:15 +0000 |
commit | 41d4ca89b6383c0ff52e0d4b061ba68d473c56a6 (patch) | |
tree | b426f0f63b9b6901dc801f8d0371e1398d7db06e | |
parent | da2d6d551a4b185c76b97c85320940a932c57e51 (diff) | |
download | aarch64-memcpy-main.tar.gz |
support native compilationmain
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
-rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1,4 +1,9 @@ -CC := aarch64-linux-gnu-gcc +HOSTARCH := $(shell uname -m) +ifneq ($(HOSTARCH),aarch64) + CROSS_COMPILE ?= aarch64-linux-gnu- +endif + +CC := $(CROSS_COMPILE)gcc CFLAGS += -O3 -Wall -Werror -static OBJS = main.o |