summaryrefslogtreecommitdiff
path: root/pgm2/makefile
diff options
context:
space:
mode:
author53hornet <53hornet@gmail.com>2019-02-02 22:59:54 -0500
committer53hornet <53hornet@gmail.com>2019-02-02 22:59:54 -0500
commit379c2c17e68d5d471a6a9673b7e9cd1fb9d99bbb (patch)
treeeed499da8211a5eece757639331a2d82bce4fa4c /pgm2/makefile
downloadcsci415-379c2c17e68d5d471a6a9673b7e9cd1fb9d99bbb.tar.xz
csci415-379c2c17e68d5d471a6a9673b7e9cd1fb9d99bbb.zip
Diffstat (limited to 'pgm2/makefile')
-rwxr-xr-xpgm2/makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/pgm2/makefile b/pgm2/makefile
new file mode 100755
index 0000000..3486352
--- /dev/null
+++ b/pgm2/makefile
@@ -0,0 +1,31 @@
+all:
+ gcc -Wall -o rgpp rgpp.c -lm
+
+clean:
+ rm rgpp
+
+debug:
+ gcc -Wall -g -o rgpp rgpp.c -lm
+
+test:
+ gcc -Wall -o rgpp rgpp.c -lm
+
+ # a) [6 pts] Straightforward line mode with a banner and line numbers:
+ grep -r -H -n -s -I -i the p2test | ./rgpp -l -b -n
+
+ # b) [7 pts] Straightforward word mode with a banner and line numbers:
+ grep -r -H -n -s -I -i the p2test | ./rgpp -w the -b -n
+
+ # c) [4 pts] Dealing with lots of files/hits:
+ grep -r -H -n -s -I -i the /usr/share/gutenprint | ./rgpp -l -b > output
+
+ # a) [1 pt] Invalid option (must produce error message):
+ grep -r -H -n -s -I -i the p2test | ./rgpp -l -b -k
+
+ # b) [1 pt] Invalid first option (must produce error message):
+ grep -r -H -n -s -I -i the p2test | ./rgpp -n -l -b
+
+ # c) [1 pt] Mismatch problems (no message and garbage out OK):
+ grep -r -H -n -s -I -i se p2test | ./rgpp -w the -b -n
+
+ rm rgpp