Git Product home page Git Product logo

make-c-cpp's Introduction

make-c-cpp

A Makefile for auto-building single-target C/C++ projects.

Features

  • Build C++, C, or mixed projects.
  • Binaries and shared libraries.
  • Compile and link options are easily configurable.
  • Automatic dependency discovery, including header files.
  • Integrated support for testing with Google's C++ testing framework.
  • Integrated support for syntax style checking with Google's cpplint.py.

Requirements

Makefile requires GNU Make, the GCC toolchain, and makes use of several Unix commands. It may be possible to use Makefile in other environments with little or no modification, but it hasn't been tested here!

Binary Build Commands

Command Description
make all (default) same as 'make app lint test'
make app builds the target application
make lint runs the cpplint syntax checker on all source files
make test builds the test application
make check run the test application
make checkm run the test application with valgrind memory checking
make clean removes all dependency files, object files, and binaries
make count reports statistics for lines of code, number of files, and git commits

Library Build Commands

Command Description
make all (default) same as 'make libs libd libh lint test'
make libs builds the static library
make libd builds the dynamic library
make libh builds the library include directory
make lint runs the cpplint syntax checker on all source files
make test builds the test application
make check run the test application
make checkm run the test application with valgrind memory checking
make clean removes all dependency files, object files, and binaries
make count reports statistics for lines of code, number of files, and git commits

Excluding Features

If you don't want to use Google's cpplint syntax checker, leave the LINT variable empty or delete the line. If you don't want to use Google's test framework, leave the GTEST_BASE variable empty or delete the line.

Environment Setup

The following commands setup the make environment completely within ~/.makeccpp.

git clone https://github.com/nicmcd/make-c-cpp ~/.makeccpp
cd ~/.makeccpp
make

Example Project

See this example project for a simple example of how to use this make system.

make-c-cpp's People

Contributors

nicmcd avatar grantae avatar timothychong-hpe avatar

Stargazers

James Thomas Moon avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.