mirror of
https://github.com/GerbilSoft/hack-detection.git
synced 2025-06-18 11:15:34 -04:00
build-gcc.sh: Allow CC, OBJCOPY, STRIP, and RC to be overridden.
These affect cross-compilation with TARGET as well.
This commit is contained in:
parent
d1e30aa3fa
commit
f802a69e80
19
build-gcc.sh
19
build-gcc.sh
@ -15,17 +15,24 @@ if [ -z "${ISWIN}" ]; then
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [ ! -z "${TARGET}" ]; then
|
||||
CC=${TARGET}-gcc
|
||||
OBJCOPY=${TARGET}-objcopy
|
||||
STRIP=${TARGET}-strip
|
||||
RC=${TARGET}-windres
|
||||
else
|
||||
if [ -z "${CC}" ]; then
|
||||
CC=gcc
|
||||
fi
|
||||
if [ -z "${OBJCOPY}" ]; then
|
||||
OBJCOPY=objcopy
|
||||
fi
|
||||
if [ -z "${STRIP}" ]; then
|
||||
STRIP=strip
|
||||
fi
|
||||
if [ -z "${RC}" ]; then
|
||||
RC=windres
|
||||
fi
|
||||
if [ ! -z "${TARGET}" ]; then
|
||||
CC=${TARGET}-${CC}
|
||||
OBJCOPY=${TARGET}-${OBJCOPY}
|
||||
STRIP=${TARGET}-${STRIP}
|
||||
RC=${TARGET}-${RC}
|
||||
fi
|
||||
|
||||
CFLAGS="-O2 -Wall -Wextra -std=c99"
|
||||
LDFLAGS="-lm"
|
||||
|
Loading…
Reference in New Issue
Block a user