Skip to content

Commit 2117dad

Browse files
committed
support pre compile targets
1 parent 2e47363 commit 2117dad

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
.PHONY: clean all desktop osx linux pi windows current install run
1+
.PHONY: clean all desktop osx linux pi windows current install run preosx prelinux prepi prewindows
2+
3+
# needs to be defined before include
4+
default:current
25

36
include config.mk
47

@@ -40,7 +43,7 @@ all:desktop pi
4043

4144
desktop:osx linux windows
4245

43-
pi:target/${EXECNAME}.arm.linux target/${EXECNAME}.arm64.linux
46+
pi:target/${EXECNAME}.arm64.linux
4447

4548
osx:target/${EXECNAME}.osx
4649

@@ -49,39 +52,36 @@ linux:target/${EXECNAME}.linux
4952
windows:target/${EXECNAME}.64.exe
5053

5154
clean:
52-
rm -rf target nimcache ${NAME}
55+
rm -rf target nimcache ${NAME} ${NAME}.exe
5356

5457
target/${EXECNAME}:${BUILDDEP}
5558
${NIMVER} nim ${COMPILER} ${ALLNIMOPTS} ${NAME}
5659
mkdir -p target
5760
mv ${NAME} target/${EXECNAME}
5861
if [ "$(DOCOMPRESS)" = "y" ] ; then upx --best target/${EXECNAME} ; fi
5962

60-
target/${EXECNAME}.osx:${BUILDDEP}
63+
target/${EXECNAME}.osx:${BUILDDEP} preosx
6164
mkdir -p target
62-
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "${NIMVER} ${NIMBLE} nim ${COMPILER} ${ALLNIMOPTS} --os:macosx --passC='-mmacosx-version-min=10.7 -gfull' --passL='-mmacosx-version-min=10.7 -dead_strip' ${NAME} && x86_64-apple-darwin19-strip ${NAME}"
65+
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "${NIMVER} ${NIMBLE} nim ${COMPILER} ${ALLNIMOPTS} --os:macosx --passC:'-mmacosx-version-min=10.7 -gfull' --passL:'-mmacosx-version-min=10.7 -dead_strip' ${NAME} && x86_64-apple-darwin19-strip ${NAME}"
6366
mv ${NAME} target/${EXECNAME}.osx
6467
if [ "$(DOCOMPRESS)" = "y" ] ; then upx --best target/${EXECNAME}.osx ; fi
6568

66-
target/${EXECNAME}.linux:${BUILDDEP}
69+
target/${EXECNAME}.linux:${BUILDDEP} prelinux
6770
mkdir -p target
6871
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "${NIMVER} ${NIMBLE} nim ${COMPILER} ${ALLNIMOPTS} ${NAME} && strip ${NAME}"
6972
mv ${NAME} target/${EXECNAME}.linux
7073
if [ "$(DOCOMPRESS)" = "y" ] ; then upx --best target/${EXECNAME}.linux ; fi
7174

72-
target/${EXECNAME}.arm.linux:${BUILDDEP}
75+
target/${EXECNAME}.arm64.linux:${BUILDDEP} prepi
7376
mkdir -p target
7477
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "${NIMVER} ${NIMBLE} nim ${COMPILER} ${ALLNIMOPTS} --cpu:arm --os:linux ${NAME} && arm-linux-gnueabi-strip ${NAME}"
7578
mv ${NAME} target/${EXECNAME}.arm.linux
7679
if [ "$(DOCOMPRESS)" = "y" ] ; then upx --best target/${EXECNAME}.arm.linux ; fi
77-
78-
target/${EXECNAME}.arm64.linux:${BUILDDEP}
79-
mkdir -p target
8080
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "${NIMVER} ${NIMBLE} nim ${COMPILER} ${ALLNIMOPTS} --cpu:arm64 --os:linux ${NAME} && aarch64-linux-gnu-strip ${NAME}"
8181
mv ${NAME} target/${EXECNAME}.arm64.linux
8282
if [ "$(DOCOMPRESS)" = "y" ] ; then upx --best target/${EXECNAME}.arm64.linux ; fi
8383

84-
target/${EXECNAME}.64.exe:${BUILDDEP}
84+
target/${EXECNAME}.64.exe:${BUILDDEP} prewindows
8585
mkdir -p target
8686
docker run --rm -v `pwd`:/usr/src/app -w /usr/src/app teras/nimcross bash -c "${NIMVER} ${NIMBLE} nim ${COMPILER} ${ALLNIMOPTS} -d:mingw --cpu:i386 --app:${WINAPP} ${NAME} && i686-w64-mingw32-strip ${NAME}.exe"
8787
mv ${NAME}.exe target/${EXECNAME}.32.exe

0 commit comments

Comments
 (0)