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