/
makefile.txt
59 lines (44 loc) · 1.99 KB
/
makefile.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# FOR ASSIGNMENT 4
CFLAGS= -Wall -fpic -coverage -lm -std=c99
rngs.o: rngs.h rngs.c
gcc -c rngs.c -g $(CFLAGS)
dominion.o: dominion.h dominion.c rngs.o
gcc -c dominion.c -g $(CFLAGS)
playdom: dominion.o playdom.c
gcc -o playdom playdom.c -g dominion.o rngs.o $(CFLAGS)
#To run playdom you need to entere: ./playdom <any integer number> like ./playdom 10*/
testDrawCard: testDrawCard.c dominion.o rngs.o
gcc -o testDrawCard -g testDrawCard.c dominion.o rngs.o $(CFLAGS)
badTestDrawCard: badTestDrawCard.c dominion.o rngs.o
gcc -o badTestDrawCard -g badTestDrawCard.c dominion.o rngs.o $(CFLAGS)
testBuyCard: testDrawCard.c dominion.o rngs.o
gcc -o testDrawCard -g testDrawCard.c dominion.o rngs.o $(CFLAGS)
testAll: dominion.o testSuite.c
gcc -o testSuite testSuite.c -g dominion.o rngs.o $(CFLAGS)
interface.o: interface.h interface.c
gcc -c interface.c -g $(CFLAGS)
runtests: testDrawCard
./testDrawCard &> unittestresult.out
gcov dominion.c >> unittestresult.out
cat dominion.c.gcov >> unittestresult.out
# I ADDED THIS: BELOW
unittestresults: cardtest1.c cardtest2.c cardtest3.c dominion.o rngs.o
echo "Assignment 4: Results for Dominion Function Card Tests:" > unittestresults.out
echo "cardtest1.c:" >> unittestresults.out
gcc -o cardtest1 -g cardtest1.c dominion.o rngs.o $(CFLAGS)
./cardtest1 >> unittestresults.out
gcov -b dominion.c >> unittestresults.out
echo "cardtest2.c:" >> unittestresults.out
gcc -o cardtest2 -g cardtest2.c dominion.o rngs.o $(CFLAGS)
./cardtest2 >> unittestresults.out
gcov -b dominion.c >> unittestresults.out
echo "cardtest3.c:" >> unittestresults.out
gcc -o cardtest3 -g cardtest3.c dominion.o rngs.o $(CFLAGS)
./cardtest3 >> unittestresults.out
gcov -b dominion.c >> unittestresults.out
# I ADDED THIS: ABOVE
player: player.c interface.o
gcc -o player player.c -g dominion.o rngs.o interface.o $(CFLAGS)
all: playdom player
clean:
rm -f *.o playdom.exe playdom player player.exe *.gcov *.gcda *.gcno *.so *.out testDrawCard testDrawCard.exe