Colorado State University

Recitation R5 - Makefiles


CS270: Computer Organization

Goals

Getting Started

  1. Make a subdirectory called R5.
  2. Copy R5.tar to the R5 directory.
  3. Extract the archive file into this directory and remove the archive:
        tar -xvf R5.tar
        rm R5.tar

Experimenting with Makefiles

Your TA will start with an initial (minimalistic) Makefile and will teach you more sophisticated Makefile features progressively. Here is the list of Makefiles used in the recitation in order of complexity:

  1. Makefile: Minimalistic Makefile
  2. Makefile-1: Introduces dependencies
  3. Makefile-2: Introduces multiple rules
  4. Makefile-3: Recompiles everything if headers change
  5. Makefile-4: Introduces pattern rules and variables
  6. Makefile-5: Introduces phony targets
  7. Makefile-6: Some decorations (final version)!