build.sh 1.27 KB
Newer Older
longpanda's avatar
longpanda committed
1
2
3
4
5
6
7
#!/bin/bash

rm -f vtoytool/00/*

/opt/diet64/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64  *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -DUSE_DIET_C  -o  vtoytool_64
/opt/diet32/bin/diet -Os gcc -D_FILE_OFFSET_BITS=64 -m32  *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -DUSE_DIET_C  -o  vtoytool_32

longpanda's avatar
longpanda committed
8
9
aarch64-buildroot-linux-uclibc-gcc -Os -static -D_FILE_OFFSET_BITS=64  *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL  -o  vtoytool_aa64

10
11
mips64el-linux-musl-gcc -mips64r2 -mabi=64 -Os -static -D_FILE_OFFSET_BITS=64  *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL  -o  vtoytool_m64e

longpanda's avatar
longpanda committed
12
13
14
#gcc -D_FILE_OFFSET_BITS=64 -static -Wall -DBUILD_VTOY_TOOL  *.c BabyISO/*.c -IBabyISO  -o  vtoytool_64
#gcc -D_FILE_OFFSET_BITS=64  -Wall -DBUILD_VTOY_TOOL -m32  *.c BabyISO/*.c -IBabyISO  -o  vtoytool_32

15
if [ -e vtoytool_64 ] && [ -e vtoytool_32 ] && [ -e vtoytool_aa64 ] && [ -e vtoytool_m64e ]; then
longpanda's avatar
longpanda committed
16
17
    echo -e '\n############### SUCCESS ###############\n'
    
longpanda's avatar
longpanda committed
18
    aarch64-buildroot-linux-uclibc-strip --strip-all vtoytool_aa64
19
20
    mips64el-linux-musl-strip --strip-all vtoytool_m64e
    mv vtoytool_m64e vtoytool/00/
longpanda's avatar
longpanda committed
21
    mv vtoytool_aa64 vtoytool/00/
longpanda's avatar
longpanda committed
22
23
24
25
26
27
28
    mv vtoytool_64 vtoytool/00/
    mv vtoytool_32 vtoytool/00/
else
    echo -e '\n############### FAILED ################\n'
    exit 1
fi