Skip to content

A simple C program using a Makefile for the build automation

Notifications You must be signed in to change notification settings

MoyinShabi/c-with-makefile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This README provides instructions on how to run the program and use the various Makefile commands

Prerequisites

Ensure you have the following installed:

  • GCC (GNU Compiler Collection)
  • Make

Steps to Run the Program

  1. Clone the Repository

    git clone <repository_url>
    cd makefile_assignment
  2. Build and run the program using the default rule (first rule)

    make

Makefile Commands

  • Build and run the program

    make

    This command compiles the source files, creates the executable, and runs it automatically.

  • Clean the build files

    make clean

    This command removes the compiled object files and the executable.

  • Rebuild the program

    make rebuild

    This command cleans the build files, recompiles the source files and runs the program.

  • Print the value of a Make variable

    make print-VARIABLE_NAME

    This command prints the value of the specified make variable.

  • Generate assembly files

    make filename.s

    This command generates an assembly file from the specified source file (replace filename with the actual source file name without the .c extension).

About

A simple C program using a Makefile for the build automation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published