How to use arguments in Makefile in C

56 views Asked by At

I am doing an assignment in C where I need to read in characters from a text file that contains the works of Shakespeare. My professor wants me to do the following: "Write a make file that can compile and run the C program you write. Specifically, when I type

$ make run textfile=CompleteShakespeare.txt

your program should analyze the text file of CompleteShakespeare.txt. I don't really know how to go about this. Is CompleteShakespeare.txt inputted as argv[1] here? Any help would be appreciated, thanks!

0

There are 0 answers