Browse Source

Makefile now debugged

tth 1 year ago
parent
commit
2c702e667e
3 changed files with 17 additions and 2 deletions
  1. 3
    0
      .gitignore
  2. 12
    0
      Makefile
  3. 2
    2
      exemple.sh

+ 3
- 0
.gitignore View File

@@ -1,2 +1,5 @@
1 1
 a.out
2
+*.o
3
+fake-values
4
+
2 5
 

+ 12
- 0
Makefile View File

@@ -0,0 +1,12 @@
1
+#
2
+#	must be run with gnu make
3
+#
4
+
5
+CC = gcc
6
+
7
+funcs.o:	funcs.c funcs.h Makefile
8
+	gcc -Wall -c $<
9
+
10
+fake-values:	fake-values.c funcs.o Makefile
11
+	gcc -Wall $< funcs.o -o $@
12
+

+ 2
- 2
exemple.sh View File

@@ -3,11 +3,11 @@
3 3
 DATAFILE=/tmp/fake-datafile
4 4
 
5 5
 > ${DATAFILE}
6
-for s in $(seq 0 20)
6
+for s in $(seq 1 20)
7 7
 do
8 8
 
9 9
     v=$(./fake-values 2> /dev/null)
10 10
     echo $s $v | tee -a ${DATAFILE}
11 11
 done
12 12
 
13
-awk '{print ">  " $2}' < ${DATAFILE}
13
+awk '{print NR " " $2}' < ${DATAFILE}

Loading…
Cancel
Save