aboutsummaryrefslogtreecommitdiff
path: root/lib/Makefile
diff options
context:
space:
mode:
authorEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>2015-02-13 18:58:31 +0000
committerEdmund Grimley Evans <Edmund.Grimley.Evans@gmail.com>2015-02-23 22:51:03 +0000
commitb14ef0e24bcb70d70360690130b2bf2a0c8f8d33 (patch)
tree11faa1933ceaaba6ffd6975d57eec9d58f4a7cb1 /lib/Makefile
parent738606dbd5608cb2ed6789beecea40712809c397 (diff)
downloadtinycc-b14ef0e24bcb70d70360690130b2bf2a0c8f8d33.tar.gz
tinycc-b14ef0e24bcb70d70360690130b2bf2a0c8f8d33.tar.bz2
Add arm64 (AArch64) as a target architecture.
Diffstat (limited to 'lib/Makefile')
-rw-r--r--lib/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 37d4711..6e192b9 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -28,6 +28,11 @@ ifndef TARGET # native library
ifeq ($(ARCH),arm)
TARGET = arm
XCC = $(CC)
+ else
+ ifeq ($(ARCH),arm64)
+ TARGET = arm64
+ else
+ endif
endif
endif
endif
@@ -49,6 +54,7 @@ X86_64_O = libtcc1.o alloca86_64.o
ARM_O = libtcc1.o armeabi.o alloca-arm.o
WIN32_O = $(I386_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
WIN64_O = $(X86_64_O) crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o
+ARM64_O = lib-arm64.o
# build TCC runtime library to contain PIC code, so it can be linked
# into shared libraries
@@ -87,12 +93,18 @@ ifeq "$(TARGET)" "arm"
TGT = -DTCC_TARGET_ARM
XCC ?= $(TCC) -B$(TOP)
else
+ifeq "$(TARGET)" "arm64"
+ OBJ = $(addprefix $(DIR)/,$(ARM64_O))
+ TGT = -DTCC_TARGET_ARM64
+ XCC ?= $(TCC) -B$(TOP)
+else
$(error libtcc1.a not supported on target '$(TARGET)')
endif
endif
endif
endif
endif
+endif
XFLAGS = $(CPPFLAGS) $(CFLAGS) $(PICFLAGS) $(TGT)