added configure script, deleted Makefile, added README, INSTALL
authorhackbard <hackbard>
Tue, 8 Apr 2003 07:34:59 +0000 (07:34 +0000)
committerhackbard <hackbard>
Tue, 8 Apr 2003 07:34:59 +0000 (07:34 +0000)
INSTALL [new file with mode: 0644]
Makefile [deleted file]
README [new file with mode: 0644]
configure [new file with mode: 0755]
decker.ttf [new file with mode: 0644]
defines.h

diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..8386ad3
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,20 @@
+morpheus INSTALL
+----------------
+
+requirements:
+
+- /dev/urandom kernelsupport
+- directfb (www.directfb.org)
+
+install:
+
+- run ./configure if available (--help for options)
+- run make
+- run make install
+
+troubleshooting:
+
+- mail: frank.zirkelbach@student.uni-augsburg.de
+- irc: irc.hackdaworld.dyndns.org - channel #hackdaworld
+
+regards, frank
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 9e6b141..0000000
--- a/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-# Makefile of ivac
-
-INCLUDEDIR = /usr/include
-
-CFLAGS = -DDEBUG -DUSE_DFB_API -O3 -Wall -I/usr/include/directfb -I/usr/local/include/directfb
-LIBS = -L/usr/lib/directfb-0.9.15 -L/usr/local/lib/directfb-0.9.17 -ldirectfb
-
-OBJS = random.o display.o
-OBJS2 = morpheus
-
-morpheus: $(OBJS)
-       $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) main.c
-all: morpheus
-
-clean:
-       rm $(OBJS) $(OBJS2)
-
-remake: clean all
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..e7e962c
--- /dev/null
+++ b/README
@@ -0,0 +1,11 @@
+morpheus README
+---------------
+
+<fixme>
+
+this program tries helping to understand the amorphous depuration
+and recrystallization of SiCx while ion implanation. hopefully the program
+will simulate the stabilization of the selforganizing structure in the
+observed behaviour.
+
+frank
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..acce13a
--- /dev/null
+++ b/configure
@@ -0,0 +1,93 @@
+#!/bin/sh
+
+#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
+# morpheus Makefile, created `date`
+
+INCLUDEDIR = /usr/include
+CFLAGS = -DDEBUG -DUSE_DFB_API -DDISPLAY_FONT=\"$prefix/share/morpheus/decker.ttf\" -O3 -Wall -I$dfb_inc_dir
+LIBS = -L$dfb_lib_dir -ldirectfb
+
+OBJS = random.o display.o
+OBJS2 = morpheus
+
+morpheus: \$(OBJS)
+       \$(CC) \$(CFLAGS) -o \$@ \$(OBJS) \$(LIBS) main.c
+
+all: morpheus
+
+clean:
+       rm \$(OBJS) \$(OBJS2)
+
+remake: clean all
+
+install:
+       mkdir -p $prefix/bin
+       cp morpheus $prefix/bin
+       chmod 755 $prefix/bin/morpheus
+       mkdir -p $prefix/share/morpheus
+       cp decker.ttf $prefix/share/morpheus
+       chmod 644 $prefix/share/morpheus/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
index 9f33690..b11396e 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -70,7 +70,9 @@ typedef struct __display {
 #define DISPLAY_X_FREE 15
 #define DISPLAY_Y_FREE 15
 
-#define DISPLAY_FONT "./decker.ttf"
+// defined by Makefile now
+// #define DISPLAY_FONT "./decker.ttf"
+
 #define MAX_TXT 20
  
 /* masks for u32 cell */