diff --git a/tools/graph.sh b/tools/graph.sh index b42cf75..1a14b9c 100755 --- a/tools/graph.sh +++ b/tools/graph.sh @@ -1,6 +1,6 @@ #!/bin/sh #$Id$ -#Copyright (c) 2010-2014 Pierre Pronchery +#Copyright (c) 2010-2015 Pierre Pronchery #This file is part of DeforaOS Unix utils #This program is free software: you can redistribute it and/or modify #it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ #variables -CC="../../../../../Devel/src/C99/C99-git/src/c99" +CC="../../../../../Devel/src/C99/C99-git/src/c99 -M graph" DOT="dot -Tpng:cairo:gd" MAKE="make -k" RM="rm -f" @@ -26,9 +26,13 @@ VIEW="view" #functions #main -$RM ../src/*.o.png -(cd '../src' && $MAKE CC="$CC" CPPFLAGS="-M graph -D__ELF__ -D__i386__" CFLAGS= distclean all) +$RM -- ../src/*.o.png +#FIXME force the i386 architecture for the moment +#arch=$(uname -m) +arch="i386" +os=$(uname -s) +(cd "../src" && $MAKE CC="$CC" CPPFLAGS="-D __${os}__=1 -D __${arch}__=1 -D __ELF__=1" CFLAGS= distclean all) for i in ../src/*.o; do $DOT -o "$i.png" "$i" done -$VIEW ../src/*.o.png +$VIEW -- ../src/*.o.png