From 801d2b1c7177296290a9045fd7205455607e951a Mon Sep 17 00:00:00 2001 From: Panayotis Katsaloulis Date: Mon, 6 Jan 2020 23:50:49 +0200 Subject: [PATCH] support arm/pi executables --- Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4644982..5780c24 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ -.PHONY: clean all osx linux windows current run +.PHONY: clean all desktop osx linux pi windows current run include config.mk ALLNIMOPTS=-d:release --opt:size ${NIMOPTS} -all:osx linux windows +desktop:osx linux windows + +all:desktop pi clean: rm -rf target nimcache @@ -15,7 +17,10 @@ linux:target/${NAME}.linux windows:target/${NAME}.64.exe +pi:target/${NAME}.arm.linux target/${NAME}.arm64.linux + current:${NIMFILES} + mkdir -p target nim ${COMPILER} ${ALLNIMOPTS} ${NAME} target/${NAME}.osx:${NIMFILES} @@ -29,6 +34,16 @@ target/${NAME}.linux:${NIMFILES} docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "nim ${COMPILER} ${ALLNIMOPTS} ${NAME} && strip ${NAME}" mv ${NAME} target/${NAME}.linux +target/${NAME}.arm.linux:${NIMFILES} + mkdir -p target + docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "nim ${COMPILER} ${ALLNIMOPTS} --cpu:arm --os:linux ${NAME} && arm-linux-gnueabi-strip ${NAME}" + mv ${NAME} target/${NAME}.arm.linux + +target/${NAME}.arm64.linux:${NIMFILES} + mkdir -p target + docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "nim ${COMPILER} ${ALLNIMOPTS} --cpu:arm64 --os:linux ${NAME} && aarch64-linux-gnu-strip ${NAME}" + mv ${NAME} target/${NAME}.arm64.linux + target/${NAME}.64.exe:${NIMFILES} mkdir -p target docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "nim ${COMPILER} ${ALLNIMOPTS} -d:mingw --cpu:i386 --app:${WINAPP} ${NAME} && i686-w64-mingw32-strip ${NAME}.exe" @@ -36,6 +51,5 @@ target/${NAME}.64.exe:${NIMFILES} docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "nim ${COMPILER} ${ALLNIMOPTS} -d:mingw --cpu:amd64 --app:${WINAPP} ${NAME} && x86_64-w64-mingw32-strip ${NAME}.exe" mv ${NAME}.exe target/${NAME}.64.exe - run:osx ./target/${NAME}.osx ${RUNARGS}