Merge PCB updates
[SCSI2SD.git] / software / build.sh
1 #!/bin/sh
2
3 case `uname -s` in
4 Linux)
5         # Builds all of the utilities (not firmware) under Linux.
6         # Requires mingw installed to cross-compile Windows targets.
7
8         (cd bootloaderhost && ./build.sh) &&
9         (cd scsi2sd-config && ./build.sh) &&
10         (cd scsi2sd-debug && ./build.sh)
11
12         if [ $? -eq 0 ]; then
13                 mkdir -p build/linux
14                 mkdir -p build/windows/64bit
15                 mkdir -p build/windows/32bit
16
17                 cp bootloaderhost/build/linux/bootloaderhost build/linux
18                 cp scsi2sd-config/build/linux/scsi2sd-config build/linux
19                 cp scsi2sd-debug/build/linux/scsi2sd-debug build/linux
20
21                 cp bootloaderhost/build/windows/32bit/bootloaderhost.exe build/windows/32bit
22                 cp scsi2sd-config/build/windows/32bit/scsi2sd-config.exe build/windows/32bit
23                 cp scsi2sd-debug/build/windows/32bit/scsi2sd-debug.exe build/windows/32bit
24
25                 cp bootloaderhost/build/windows/64bit/bootloaderhost.exe build/windows/64bit
26                 cp scsi2sd-config/build/windows/64bit/scsi2sd-config.exe build/windows/64bit
27                 cp scsi2sd-debug/build/windows/64bit/scsi2sd-debug.exe build/windows/64bit
28         fi
29 ;;
30
31 Darwin)
32         make -C bootloaderhost &&
33         make -C scsi2sd-config &&
34         make -C scsi2sd-debug
35
36         if [ $? -eq 0 ]; then
37                 mkdir -p build/mac
38
39                 cp bootloaderhost/build/mac/bootloaderhost build/mac
40                 cp scsi2sd-config/build/mac/scsi2sd-config build/mac
41                 cp scsi2sd-debug/build/mac/scsi2sd-debug build/mac
42         fi
43
44 esac