Giter Site home page Giter Site logo

makefile's Introduction

Makefile skeleton project

This is just a simple makefile-project skeleton which I using when no need to use GNU Autotools or other Makefile-generators.

Features:

  • Simple including pkg-config defined libraries(LIBS property)
  • Making .tar.gz distrib files for emailing and other repository-free sharing(make dist)
  • Objects and dependencies files generating in hidden folder for more short ls output
  • Version autocheck from git tag and offset(with version.sh script)
  • Auto ChangeLog.txt generation from git history
  • Simple debug building(with gdb flags)
  • CMake-like build output
  • Prepared .gitignore for C, Emacs and Vim from this github gitignore repo.

This makefile can be used out-of-the-box only for c-projects and actually I don't think it is expedient to make any changes in it, write new Makefile for non-c project will be easier.

How to use it?

$ git clone https://github.com/inickey/makefile helloworld
$ cd helloworld
$ make init

How to version?

Versions in it is [MAJOR].[MINOR].[COMMIT]. Major and minor versions is set manually with git tag command in tag-name format v[MAJOR].[MINOR]

$ git tag v1.2

This command will set major to 1 and minor to 2. Third part of version, commit number will increments automatically, with every commit. History in ChangeLog.txt will be cleaned with every new tag.

How to code?

You just should paste any *.c and *.h files in root directory, make will search every source file, compile it and then link all files together to $(TARGET) property of makefile. If you use any libraries(for example glib-2.0 and sqlite3) you should paste it to LIBS property of makefile, separated with spaces.

LIBS = glib-2.0 sqlite3

Actually I use it only for beginning some new projects that I don't know will complete or support(but there's some exceptions of this rule). Usually later I changing it Makefile for GNU Autotools.

makefile's People

Contributors

inickey avatar

Watchers

James Cloos avatar naren 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.