scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

config (1026B)


      1 #!/bin/sh
      2 
      3 exec > $$.tmp
      4 trap "rm -f $$.tmp" EXIT INT TERM
      5 
      6 arch=`uname -m`
      7 sys=`uname -s | tr 'A-Z' 'a-z'`
      8 
      9 case $sys in
     10 openbsd)
     11 	echo TOOL=${TOOL:-clang}
     12 	echo HOST=obsd
     13 	echo ARFLAGS="${ARFLAGS:--rv}" NOPIE_LDFLAGS=-no-pie
     14 	;;
     15 netbsd)
     16 	#TODO: send a patch to NetBSD to solve this problem
     17 	echo TOOL=${TOOL:-gnu}
     18 	echo HOST=bsd
     19 	echo ARFLAGS="${ARFLAGS:--rv}"
     20 	;;
     21 freebsd)
     22 	echo TOOL=${TOOL:-clang}
     23 	echo HOST=bsd
     24 	;;
     25 darwin)
     26 	echo HOST=bsd
     27 	echo RANLIB_FLAGS="${RANLIB_FLAGS:--c}"
     28 	;;
     29 minix)
     30 	echo RANLIB="${RANLIB:-ar t}"
     31 	;;
     32 *bsd)
     33 	echo HOST=bsd
     34 	;;
     35 linux)
     36 	echo TOOL=${TOOL:-gnu}
     37 	echo HOST=linux
     38 	;;
     39 plan9)
     40 	echo TOOL=${TOOL:-plan9}
     41 	echo HOST=plan9
     42 	;;
     43 *)
     44 	echo TOOL=${TOOL:-unix}
     45 	echo HOST=${HOST:-posix}
     46 esac
     47 
     48 
     49 case $arch in
     50 x86_64)
     51 	arch=amd64
     52 	;;
     53 aarch64)
     54 	arch=arm64
     55 	;;
     56 esac
     57 
     58 echo CONF=${CONF:-$arch-$sys}
     59 echo CROSS_COMPILE=$CROSS_COMPILE
     60 echo DESTDIR=$DESTDIR
     61 echo PREFIX=${PREFIX:=/usr/local}
     62 echo LIBPREFIX=${LIBPREFIX:-$PREFIX}
     63 echo LIBPROFILE=${LIBPROFILE:-scc}
     64 echo STD=${STD:-c99}
     65 
     66 mv $$.tmp config.mk