Coder Social home page Coder Social logo

adammendoza / generator-c-c-plus-plus-project Goto Github PK

View Code? Open in Web Editor NEW

This project forked from byuksel/generator-c-c-plus-plus-project

0.0 1.0 0.0 10 KB

Yeoman generator for Automake Autoconf C/C++ Project for "Automake C++ Tutorial"

License: Other

JavaScript 88.82% C++ 11.18%

generator-c-c-plus-plus-project's Introduction

C/C++ Template Project with Automake and Autoconf Generator

Yeoman generator for Automake Autoconf C/C++ Project for "Automake C++ Tutorial" - lets you quickly set up a C/C++ project with Automake and Autoconf.

This is a template project which I used in the "Automake C++ Tutorial" at http://youtu.be/7hBag3hr0xU

Quick Installation

Install yo, and generator-c-c-plus-plus-project:

npm install -g yo generator-c-c-plus-plus-project --verbose

Usage

Make a new directory, and cd into it:

mkdir my-new-project && cd $_

Run yo c-c-plus-plus-project:

yo c-c-plus-plus-project

Variables the generator uses

  • generatorModuleName: Module Name. The generator will try to generate a proper name with dashes from this name.
  • generatorModuleNameWithDashes: (Generated but can be changed) Derived name from module name, used as your module's name in configure.ac and as the entry cpp file in src directory.
  • generatorModuleDescription: Module Description. Goes into README.md of your project.
  • generatorUserEmail: Your email. Goes into AUTHORS file and all the copyright notices in your source files.
  • generatorUserName: Your name. Goes into AUTHORS file and all the copyright notices in your source files.

Questions that the generator asks

  • 'What is your module's name ?': sets 'generatorModuleName'
  • 'What is your module's dasherized name ? Will use this as the main module name': sets 'generatorModuleNameWithDashes'
  • 'What is your module's description ?': sets 'generatorModuleDescription'.
  • 'What is your email ?': sets 'generatorUserEmail'.
  • 'What is your name ?': sets 'generatorUserName'.

Scaffolding Explained

In this section, we describe what each file does in this template and how you can modify them to your needs.

Directory Structure

Once everything is installed, you will see a project structure like below:

├── Makefile.am           # Main makefile.
├── README.md             # README.md file
├── configure.ac          # File of magic. Main configuration is here.
├── my_inc                # Example includes directory which has a simple addition library.
│   ├── Makefile.am
│   ├── myadd.cpp         # Simple addition library cpp file.
│   └── myadd.h           # Simple addition library header file.
└── src
│   ├── Makefile.am
│   ├── helper.cc         # Helper cc file.
│   ├── helper.cpp        # Helper cpp file.
│   ├── helper.h          # Helper header file.
│   └── < pkg name >.cpp  # Main module cpp file.

Details

You can generate this template project to jump start your project with a automake/autoconf based build system. It has the basic ingredients, so all you need is to replace the libraries and main file with your own code while modifying the Makefile.am's and configure.ac's with the names of your files.

In order to make everything work, go the root of project, and type:

> aclocal

> autoconf

> automake --add-missing

This should create all "configure" script along with all the Makefile's. Now, you can type

> ./configure

> make

And your project should compile. Now you are all set with a lean template to build upon.

License

Apache 2.0 License - © 2015 Baris Yuksel

Bugs, Requests and Support

For bug reports, feature requests and general questions, please feel free to email [email protected]

generator-c-c-plus-plus-project's People

Contributors

byuksel avatar

Watchers

Adam J. Mendoza 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.