14 echo "usage $0 <options>"
16 echo "--prefix=PREFIX specify install prefix"
17 echo "--with-dfblib=DIR specify directfb lib dir"
18 echo "--with-dfbinc=DIR specify directfb include dir"
23 case "`echo $1 | awk -F= '{ print $1 }'`" in
24 --prefix) prefix=`echo $1 | awk -F= '{ print $2 }'`; shift;;
25 --help) usage; shift 1;;
26 --with-dfblib) dfblib=`echo $1 | awk -F= '{ print $2 }'`; shift;;
27 --with-dfbinc) dfbinc=`echo $1 | awk -F= '{ print $2 }'`; shift;;
28 --without-dfb) nodfb=1; shift ;;
32 echo "checking for dfb stuff ..."
34 if [ -z "$dfbinc" ]; then
35 for i in /usr/include /usr/local/include; do
36 if [ -d $i/directfb ]; then
37 dfb_inc_dir=$i/directfb
41 if [ -d $dfbinc/directfb ]; then
42 dfb_inc_dir=$dfbinc/directfb
45 if [ "$dfb_inc_dir" = "0" ]; then
46 echo "dfb includes not found ..."
50 if [ -z "$dfblib" ]; then
51 for i in /usr/lib /usr/local/lib; do
52 if [ -f $i/libdirectfb.so ]; then
57 if [ -f $dfblib/libdirectfb.so ]; then
61 if [ "$dfb_lib_dir" = "0" ]; then
62 echo "dfb libs not found ..."
66 [ "$nodfb" = "0" ] && echo "directfb installation looks good :)"
68 echo "creating Makefile"
71 # $name Makefile, created `date`
73 INCLUDEDIR = /usr/include
76 if [ "$nodfb" = "0" ]; then
78 cat >> Makefile << EOF
79 CFLAGS = -DDEBUG -DUSE_DFB_API -DFONT=\"$prefix/share/$name/decker.ttf\" -O3 -Wall -I$dfb_inc_dir
80 LIBS = -L$dfb_lib_dir -ldirectfb
82 OBJS = random.o dfbapi.o
87 cat >> Makefile << EOF
88 CFLAGS = -DDEBUG -DNODFB -O3 -Wall
96 cat >> Makefile << EOF
100 \$(CC) \$(CFLAGS) -o \$@ \$(OBJS) \$(LIBS) ${name}.c
105 rm \$(OBJS) \$(OBJS2)
112 chmod 755 $prefix/bin/$name
113 mkdir -p $prefix/share/$name
114 cp decker.ttf $prefix/share/$name
115 chmod 644 $prefix/share/$name/decker.ttf