Systems Programming
In this project, you will develop a simple automatic makefile generator. Your automatic makefile generator will be called makegen. When you run makegen in a directory, the program will traverse all the directories and subdirectories and look for source files (*.cpp and *.h). Then it will also examine these source files to extract dependencies among files. It will then generate a makefile which can be used to compile the source code to produce the executable file. You can make the following assumptions:
- There will be only one file with the main function and you will produce one executable. The name of the executable should be the same as the file containing the main (except for the .cpp extension).
- Assume g++ compiler is used.
- Assume no libraries need to be linked.
Note: Fill in the blanks in the following code and you will get a useful directory traversal routine.