configure 905 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # set environment variables used by scripts/make.sh
  3. # People run ./configure out of habit, so do "defconfig" for them.
  4. if [ "$(basename "$0")" == configure ]
  5. then
  6. echo "Assuming you want 'make defconfig', but you should probably check the README."
  7. make defconfig
  8. exit $?
  9. fi
  10. # Warn about stuff, disable stupid warnings, be 8-bit clean for utf8.
  11. [ "${CFLAGS/-funsigned-char//}" == "$CFLAGS" ] &&
  12. CFLAGS+=" -Wall -Wundef -Werror=implicit-function-declaration -Wno-char-subscripts -Wno-pointer-sign -funsigned-char"
  13. # Set default values if variable not already set
  14. : ${CC:=cc} ${HOSTCC:=cc} ${GENDIR:=generated} ${KCONFIG_CONFIG:=.config}
  15. : ${UNSTRIPPED:=$GENDIR/unstripped} ${OUTNAME:=toybox${TARGET:+-$TARGET}}
  16. : ${OPTIMIZE:=-Os -ffunction-sections -fdata-sections -fno-asynchronous-unwind-tables -fno-strict-aliasing}
  17. # We accept LDFLAGS, but by default don't have anything in it