d437f60dad6180fa692fc48c6d4b9b8af669bb11
[SCSI2SD-V6.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 scsi2sd-util && ./build.sh) &&
9         (cd scsi2sd-debug && ./build.sh)
10
11         if [ $? -eq 0 ]; then
12                 mkdir -p build/linux
13                 mkdir -p build/windows/64bit
14                 mkdir -p build/windows/32bit
15
16                 cp scsi2sd-util/build/linux/scsi2sd-util build/linux
17                 cp scsi2sd-debug/build/linux/scsi2sd-debug build/linux
18
19                 cp scsi2sd-util/build/windows/32bit/scsi2sd-util.exe build/windows/32bit
20                 cp scsi2sd-debug/build/windows/32bit/scsi2sd-debug.exe build/windows/32bit
21
22                 cp scsi2sd-util/build/windows/64bit/scsi2sd-util.exe build/windows/64bit
23                 cp scsi2sd-debug/build/windows/64bit/scsi2sd-debug.exe build/windows/64bit
24         fi
25 ;;
26
27 Darwin)
28         make -C scsi2sd-util &&
29         make -C scsi2sd-debug
30
31         if [ $? -eq 0 ]; then
32                 mkdir -p build/mac
33
34                 cp scsi2sd-util/build/mac/scsi2sd-util build/mac
35                 cp scsi2sd-debug/build/mac/scsi2sd-debug build/mac
36         fi
37
38 esac