forked from pspdev/psptoolchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path009-psplinkusb.sh
executable file
·34 lines (29 loc) · 1.19 KB
/
009-psplinkusb.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
26
27
28
29
30
31
32
33
34
#!/bin/bash
# psplinkusb.sh by Naomi Peori ([email protected])
## Exit on errors
set -e
## Download the source code if it does not already exist
clone_git_repo github.com pspdev psplinkusb
## Enter the source directory
cd psplinkusb
## Mac OS X fix
if [ "$(uname)" == "Darwin" ]; then
if [ -d /opt/local/include ] && [ -d /opt/local/lib ]; then # MacPorts
export C_INCLUDE_PATH="/opt/local/include"
export CPLUS_INCLUDE_PATH="/opt/local/include"
export LIBRARY_PATH="/opt/local/lib"
elif command -v brew 1>/dev/null 2>&1; then # Homebrew
HOMEBREW_PREFIX=$(brew --prefix)
export C_INCLUDE_PATH="$HOMEBREW_PREFIX/include:$HOMEBREW_PREFIX/opt/readline/include"
export CPLUS_INCLUDE_PATH="$C_INCLUDE_PATH"
export LIBRARY_PATH="$HOMEBREW_PREFIX/lib:$HOMEBREW_PREFIX/opt/readline/lib"
else
# Additional package manager/well-known locations? Add them here...
echo "WARNING: using libreadline from OS X, this may lead to compilation issues"
fi
fi
## Build and install.
make -f Makefile.clients -j $(num_cpus) clean
make -f Makefile.clients -j $(num_cpus)
make -f Makefile.clients -j $(num_cpus) install
make -f Makefile.clients -j $(num_cpus) clean