Colorado State University

Recitation R14 - Makefiles


CS270: Computer Organization

Goals

Getting Started

  1. Make a subdirectory called R14.
  2. Copy R14.tar to the R14 directory.
  3. Extract the archive file into this directory and remove the archive:
        tar -xvf R14.tar
        rm R14.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)!