Makefile now debugged
This commit is contained in:
parent
9729f5ee02
commit
2c702e667e
|
@ -1,2 +1,5 @@
|
|||
a.out
|
||||
*.o
|
||||
fake-values
|
||||
|
||||
|
||||
|
|
12
Makefile
12
Makefile
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# must be run with gnu make
|
||||
#
|
||||
|
||||
CC = gcc
|
||||
|
||||
funcs.o: funcs.c funcs.h Makefile
|
||||
gcc -Wall -c $<
|
||||
|
||||
fake-values: fake-values.c funcs.o Makefile
|
||||
gcc -Wall $< funcs.o -o $@
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
DATAFILE=/tmp/fake-datafile
|
||||
|
||||
> ${DATAFILE}
|
||||
for s in $(seq 0 20)
|
||||
for s in $(seq 1 20)
|
||||
do
|
||||
|
||||
v=$(./fake-values 2> /dev/null)
|
||||
echo $s $v | tee -a ${DATAFILE}
|
||||
done
|
||||
|
||||
awk '{print "> " $2}' < ${DATAFILE}
|
||||
awk '{print NR " " $2}' < ${DATAFILE}
|
||||
|
|
Loading…
Reference in New Issue