Giter Site home page Giter Site logo

makesettings's Introduction

Makefile Template

Introduction

A generic makefile template/framework for C and C++ projects. The template helps simplify the build process and does not require building tools such as CMake, qmake, etc. Only a few lines of information are needed to create each Makefile, which is based on the information in a project file. Project files are created by the developer, and are usually simple.

Features

  1. Automatically finds and compiles all source files within the source directory.
  2. Automatically generates dependecies as files are compiled, ensuring that files are correctly recompiled when dependecies have updated.

Usage

  1. Add makefile template (in directory modules) into your project path.

  2. Define project file (e.g. helloworld.pro) which will be included in Makefile. You can define some built-in variables of GNU make in this file, such as CFLAGS, CXXFLAGS, CPPFLAGS, LDFLAGS, etc. Moveover, you should define the following specific variables:

    TARGET Specifies target name. TARGET = helloworld

    INCLUDEPATH Specifies the #include directories which should be searched when compiling the project. INCLUDEPATH = include

    DEPENDPATH Specifies the source directories which should be searched when compiling the project. DEPENDPATH = src

    HEADERS Defines the header files for the project.HEADERS = message.h

    SOURCES Defines the source files for the project. SOURCES = main.cpp message.cpp

References

  1. Robert Mecklenburg, Managing Projects with GNU Make, 3rd edition, O'Reilly, 2004
  2. https://netbeans.org/kb/docs/cnd/depchecking.html
  3. http://make.mad-scientist.net/papers/advanced-auto-dependency-generation

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.