/c-template

A simple autotools based C project template

Primary LanguageShellMIT LicenseMIT

C-Template

This repository contains a bare minimum C project with autotools setup script.

How to use

In order to create a new project;

  1. clone this repo;
  2. rename c-template directory accordingly to your project;
  3. enter project directory and remove the .git dir;
  4. handle configure.ac:
    1. change AC_INIT macro value;
    2. edit the file as you like/need;
  5. edit/change LICENSE file (change name or license if you don't like MIT);
  6. edit README.md with some bare info on your project;
  7. optionally edit the Makefile.am and .gitignore files (see notes below);
  8. init a new repo with git (remember to setup user.email/user.name and stuff like that);
  9. start coding.

Notes

There are some assumptions in this template layout:

  1. there is only a Makefile.am in the project dir, I found it clearer for simple tests/ideas;
  2. the makefile will generate a main executable from a main.c source file;
  3. a default .gitignore is present for many C artifacts, including an entry for main, if you want a different name for you executable change the .gitignore also.