Menu

Tree [833cbf] master /
 History

HTTPS access


File Date Author Commit
 scripts 2024-07-22 Gyorgy Kovesdi Gyorgy Kovesdi [597c32] Fixed gcc flags for AVR target
 templates 2024-09-27 gykovesdi gykovesdi [833cbf] Fixed data type in main()
 .gitignore 2021-07-17 György Kövesdi György Kövesdi [69db56] Fixed library name
 COPYING 2019-01-17 Gyorgy Kovesdi Gyorgy Kovesdi [ce724a] Switched back to GPL
 Doxyfile 2016-06-02 György Kövesdi György Kövesdi [dda3b4] Added documentation
 Makefile 2016-06-02 György Kövesdi György Kövesdi [dda3b4] Added documentation
 README 2024-05-10 gykovesdi gykovesdi [917c06] More details in README

Read Me

Make scripts to build projects an easy way
------------------------------------------

This repository contains some make scripts to help building large projects
an easy way. It is recommended to add this as a submodule of the project.

Installation:
-------------

In this example the working directory is ~/work
Of course, you can choose it on your own.

    cd ~/work
    git clone https://github.com/kgy64/makesys.git

It is also recommended to make the scripts available by adding this line to .bashrc:

    export PATH="$PATH:$HOME/work/makesys/templates"

Recommended usage:
------------------

There is a script at templates/new-project-template.sh which can create
a new, working project skeleton in an easy way. Clone this repo somewhere
and call the script:

    new-project-template.sh --help

Note that this script is on the path mentioned above.

The help text will show how to use it. It is really easy: the project name is
essential, and optionally you can give your name, a short description, and some
other information.

By default a native project is created, but AVR 8-bit MCU devices also can be selected.
See https://github.com/kgy64/avr-lib for other details.

Once the project is just created, type 'make' and see the resulting binary in
the subdirectory 'bin/'.

Project structure:
------------------

The following subdirectories are used:

src/

This subdirectory contains the project source files. Currently, C, C++, and Yacc
sources are handled. The compilation is automatic if you add a new file.
Any subdirectory structure can be created here, the compilation is recursive.

include/public/
include/private/

The project include files. The public one is accessible from all other modules, the
private one is only for its own purpose. All public paths are added to the include
path for the main project and all submodules, and the submodules have their private
path is also added.

bin/

The generated binaries (executables and libraries) are put in this directory.

modules/

The project submodules must be here. All submodules can be initialized the same way.
The submodule build is also automatic for all modules. The result is a .a file in
the bin/ directory.

makesys/

This project is cloned here. It can be a submodule, or also can be a link if the project has
more submodules to prevent cloning it more times.