-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbuild.sh
executable file
·25 lines (21 loc) · 844 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# Build Script - by Coldzer0 .
# Skype : Coldzer01
# Release Build - "8 kb" samllest size i can get .
if [ ! -d "lib" ]; then
mkdir lib
fi
rm -rf lib/*.ppu lib/*.o lib/*.s link.res ppas.sh
fpc -n -O3 -Os -OoDFA -OoREGVAR -OoREMOVEEMPTYPROCS -OoTAILREC -OoFASTMATH -OoLOOPUNROLL -g- -Xs -XX -CX -Scigm -Sd -Cg -Rintel -FuSystem/ -FUlib/ test.pas
# Generate asm files ..
fpc -n -O3 -Os -OoDFA -OoREGVAR -OoREMOVEEMPTYPROCS -OoTAILREC -OoFASTMATH -OoLOOPUNROLL -g- -Xs -XX -CX -Scigm -Sd -Cg -Rintel -a -s -FuCore/ -FuSystem/ -FUlib/ main.pas
# remove FPC marker from code .
line=$(grep -nr .fpc, lib/main.s | cut -d : -f 2)
$(ex -sc "${line}d4|x" lib/main.s)
# run build script ..
./ppas.sh
echo "clean"
rm -rf lib/*.ppu lib/*.o lib/*.s link.res ppas.sh # clean .
echo "strip"
strip main # strip the file .
echo "all done :D !"