mkpkgs.sh 569 Bytes
Newer Older
Mart Lubbers's avatar
Mart Lubbers committed
1 2 3
#!/bin/bash
set -e
trap "rm -rf CleanSerial" EXIT
Mart Lubbers's avatar
Mart Lubbers committed
4

Mart Lubbers's avatar
Mart Lubbers committed
5 6 7
mkpkg() {
	rm -rf CleanSerial
	mkdir -p CleanSerial
Mart Lubbers's avatar
Mart Lubbers committed
8
	make -B $1 -C src clean all
Mart Lubbers's avatar
Mart Lubbers committed
9 10
	cp -Rv src/"Clean System Files" CleanSerial
	cp -v src/{TTY,iTasksTTY}.[id]cl src/$2/Platform.[id]cl CleanSerial
Mart Lubbers's avatar
Mart Lubbers committed
11
	file CleanSerial/*/*.o
Mart Lubbers's avatar
Mart Lubbers committed
12 13
	$3 CleanSerial-$4 CleanSerial
}
Mart Lubbers's avatar
Mart Lubbers committed
14

Mart Lubbers's avatar
Mart Lubbers committed
15 16
#linux
mkpkg "" POSIX "tar -czvf" linux64.tar.gz
Mart Lubbers's avatar
Mart Lubbers committed
17
#windows64
Mart Lubbers's avatar
Mart Lubbers committed
18
mkpkg "DETECTED_OS=Windows CC=x86_64-w64-mingw32-gcc CFLAGS=-m64" Windows "zip -rv" win64.zip
Mart Lubbers's avatar
Mart Lubbers committed
19
#windows32
Mart Lubbers's avatar
Mart Lubbers committed
20
mkpkg "DETECTED_OS=Windows CC=x86_64-w64-mingw32-gcc-win32 CFLAGS=-m32" Windows "zip -rv" win32.zip