Home | History | Annotate | Download | only in ebizzy-0.3
      1 #!/bin/sh
      2 
      3 OS=`uname -s`
      4 SUPPORTED="Linux SunOS HP-UX FreeBSD"
      5 
      6 for i in `echo "$SUPPORTED"`
      7 do
      8 	if [ "$OS" = "$i" ]; then
      9 		supported="yes"
     10 		break
     11 	fi
     12 done
     13 
     14 if [ "$supported" != "yes" ]; then
     15 	echo "Only this list are supported for now: $SUPPORTED"
     16 	exit 1
     17 fi
     18 
     19 LIBS="-lpthread"
     20 FLAGS=""
     21 
     22 case "$OS" in
     23 	"SunOS")
     24         	LIBS="${LIBS} -lmalloc";
     25 		FLAGS="${FLAGS} -D_solaris";;
     26 	"FreeBSD")
     27 		FLAGS="${FLAGS} -D_freebsd";;
     28 esac
     29 
     30 cat <<EOF > Makefile
     31 all: ebizzy
     32 
     33 ebizzy: ebizzy.c
     34 	gcc -Wall -Wshadow ${LIBS} ${FLAGS} -o ebizzy ebizzy.c
     35 
     36 clean:
     37 	rm -f ebizzy Makefile
     38 EOF
     39 
     40 echo "Type 'make' to compile"
     41 
     42