makefile config for arm
sophuwu sophie@skisiel.com
Sat, 24 Feb 2024 10:37:52 +0100
4 files changed,
15 insertions(+),
4 deletions(-)
M
CMakeLists.txt
→
CMakeLists.txt
@@ -2,5 +2,6 @@ cmake_minimum_required(VERSION 3.16)
project(rls) set(CMAKE_CXX_STANDARD 17) - +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os") +#set(CMAKE_EXE_LINKER_FLAGS "-static") add_executable(rls rls.cpp)
M
Makefile
→
Makefile
@@ -53,5 +53,8 @@ @sudo cp build/rls /usr/local/bin/rls
@echo Installed successfully. @echo Run "rls" to use the program. -run: build/rls - build/rls +arm: rls.cpp CMakeLists.txt arm64_toolchain.cmake + @echo building arm + @mkdir -p build/arm + @cmake -DCMAKE_TOOLCHAIN_FILE=arm64_toolchain.cmake -B build/arm + @cmake --build build/arm
A
arm64_toolchain.cmake
@@ -0,0 +1,7 @@
+set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc) +set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++) + +# Here you can set any necessary compiler flags, like sysroot or include directories.