mikeizbicki / ucr-cs100

open source software construction course
Other
485 stars 407 forks source link

How to write Makefile #272

Closed jesuscreyes closed 9 years ago

jesuscreyes commented 9 years ago

I'm still confused about how the Makefile works and how to write one according to the spec.

What is the purpose in having two targets: all and rshell? What is the purpose for creating a directory called bin and placing all executable files there, and how do I do that?

mikeizbicki commented 9 years ago
  1. It is convention. In this assignment, all and rshell will do the same things. In future assignments, all will build rshell and other commands you've built for your assignment.
  2. It is convention. After the user runs make, they need to know where the new executables are. You put them in bin because that's what's expected.
  3. You're supposed to figure out exactly how to create the Makefile. If you have a more specific question, I can help you with that. It will probably help to review the Makefile we created in class.