]> hackdaworld.org Git - physik/nlsop.git/commitdiff
added configure + decker.ttf, small fix in nlsop.c
authorhackbard <hackbard>
Wed, 14 May 2003 18:52:40 +0000 (18:52 +0000)
committerhackbard <hackbard>
Wed, 14 May 2003 18:52:40 +0000 (18:52 +0000)
configure [new file with mode: 0755]
decker.ttf [new file with mode: 0644]
nlsop.c

diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..31ed2e9
--- /dev/null
+++ b/configure
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+name="nlsop"
+
+#defaults
+prefix=/usr
+dfblib=""
+dfbinc=""
+
+echo $run_cmd
+
+usage()        {
+       echo "usage $0 <options>"
+       echo "options:"
+       echo "--prefix=PREFIX   specify install prefix"
+       echo "--with-dfblib=DIR specify directfb lib dir"
+       echo "--with-dfbinc=DIR specify directfb include dir"
+       echo
+       }
+
+while [ "$1" ]; do
+       case "`echo $1 | awk -F= '{ print $1 }'`" in
+               --prefix)       prefix=`echo $1 | awk -F= '{ print $2 }'`; shift;;
+               --help)         usage; shift 1;;
+               --with-dfblib)  dfblib=`echo $1 | awk -F= '{ print $2 }'`; shift;;
+               --with-dfbinc)  dfbinc=`echo $1 | awk -F= '{ print $2 }'`; shift;;
+       esac
+done
+
+echo "checking for dfb stuff ..."
+dfb_inc_dir="0"
+if [ -z "$dfbinc" ]; then
+       for i in /usr/include /usr/local/include; do
+               if [ -d $i/directfb ]; then
+                       dfb_inc_dir=$i/directfb
+               fi
+       done
+else
+       if [ -d $dfbinc/directfb ]; then
+               dfb_inc_dir=$dfbinc/directfb
+       fi
+fi
+if [ "$dfb_inc_dir" = "0" ]; then
+       echo "dfb includes missing ..."
+       exit 1
+fi
+dfb_lib_dir="0"
+if [ -z "$dfblib" ]; then
+       for i in /usr/lib /usr/local/lib; do
+               if [ -f $i/libdirectfb.so ]; then
+                       dfb_lib_dir=$i
+               fi
+       done
+else
+       if [ -f $dfblib/libdirectfb.so ]; then
+               dfb_lib_dir=$dfblib
+       fi
+fi
+if [ "$dfb_lib_dir" = "0" ]; then
+       echo "dfb libs missing ..."
+       exit 1
+fi
+echo "directfb installation looks good :)"
+
+echo "creating Makefile"
+cat > Makefile << EOF
+# $name Makefile, created `date`
+
+INCLUDEDIR = /usr/include
+CFLAGS = -DDEBUG -DUSE_DFB_API -DFONT=\"$prefix/share/$name/decker.ttf\" -O3 -Wall -I$dfb_inc_dir
+LIBS = -L$dfb_lib_dir -ldirectfb
+
+OBJS = random.o dfbapi.o
+OBJS2 = $name
+
+$name: \$(OBJS)
+       \$(CC) \$(CFLAGS) -o \$@ \$(OBJS) \$(LIBS) ${name}.c
+
+all: $name
+
+clean:
+       rm \$(OBJS) \$(OBJS2)
+
+remake: clean all
+
+install:
+       mkdir -p $prefix/bin
+       cp $name $prefix/bin
+       chmod 755 $prefix/bin/$name
+       mkdir -p $prefix/share/$name
+       cp decker.ttf $prefix/share/$name
+       chmod 644 $prefix/share/$name/decker.ttf
+EOF
+
+echo "done"
diff --git a/decker.ttf b/decker.ttf
new file mode 100644 (file)
index 0000000..5e721cf
Binary files /dev/null and b/decker.ttf differ
diff --git a/nlsop.c b/nlsop.c
index 041fac0151d440c8a0c48aaa7b12a59033796797..736003adb64d2dfc48c0b4179eab6c3f9c4c9cb8 100644 (file)
--- a/nlsop.c
+++ b/nlsop.c
@@ -271,6 +271,8 @@ int main(int argc,char **argv)
  b_ap=B_AP;
  cc=CC;
  nowait=0;
+ quit=0;
+ escape=0;
  strcpy(s_file,"");
  strcpy(l_file,"");
  strcpy(r_file,"");