| |
 |
|
|
|
|
|
Assignment
Create a makefile for the following project which consists of 3 Fortran
files and one routine written in C. The makefile should allow 3 different options:
| Command | Action |
| make | Make the default executable from the files main.f,
timewrap.f, and dateclock.c. |
| make simple | Make a different executable from the files
main.f, and dum.f. |
| make clean | Delete all object files created. |
Files:
Details
- The *.f files can be compiled with the default f77 compiler
- dateclock.c can be compiled with the default cc compiler
- The f77 program can be used to link your code.
- Try to arrange your Makefile to minimize rebuilds.
- You do NOT need to edit any of the source code
Tips
- You will need to define how to compile the individual files, either explicitly or by defining
rules.
- You will need to define each of the three procedures your makefile will do.
A solution
Note: You will need to change spaces into tabs if you cut and paste this.
Makefile solution
|
|
|
|