Past week in ECE 2524, we worked on Makefiles. I found it really interesting and a big time saver. Makefiles are basically used to compile c++ code. If you have a couple of files, it becomes tedious to use the g++ command again and again. So the main purpose behind Make files is to make that easier. A couple new terms I learned are target files and dependency. Basically, a target file could be any file that depends on a file. If there is a change in one of the dependency files, then that target file will be compiled again. At first, I was confused about the order. It doesn’t matter that much as long you have all the dependency files. But the order goes from left to right for dependency file. Also one this to note is the commands must go with a Tab character before it. This turns out to be something to be careful because you might put space and think it looks like a tab.
We also had an assignment on Make files. We had a couple of cpp files and header files. The files that were dependent on files were mentioned by the professor. They part that I found somewhat tricky was the bison and flex commands. But I figured out how to deal with it.