Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

mattearly/best_makefile_for_cpp

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

best_makefile_for_cpp

Works great for about any cpp project

Default use folder structure

  • project_root/
    • bin/
    • src/
    • Makefile

What happens when I run make?

  1. creates bin/ folder at project root
  2. .cpp files located in src/ are built into .o files and placed in bin/
  3. .o files are linked together make your executable at project root

What happens when I run make clean?

  • The bin/ folder is deleted and the executable is deleted

Limitations

  • Does not check header files - run make clean && make if you've updated a header file with any significant changes

Other

  • make help - shows help menu (you probably wont need it now that you read this)
  • make run - updates binaries and executables as neccessary and starts your program

About

This is, in my opinion, the best starting makefile for a cpp project.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.