# metamake
A project setup tool for C/C++ projects using make and criterion.
![](https://img.shields.io/badge/platform-linux%20%7C%20macOs-lightgrey) ![](https://img.shields.io/badge/python-v3.8-blue)
![](https://img.shields.io/github/stars/GlysVenture/metamake?style=social)
## Installation
Clone for first installation. You can delete the directory afterwards.
$ git clone https://github.com/GlysVenture/metamake
$ cd metamake
$ make install
[optional]
$ rm -rf ../metamake
if this doesn't work it means you probably don't have a $HOME/.local/bin directory and you don't have access to /usr/bin.
Just create $HOME/.local/bin and rerun make install
To update simply do
$ metamake --update
## Usage
```
usages:
metamake [options] <new_project_dir>
options:
-n --name <executable_name>
-c --compiler <compiler>
-cpp
metamake [options]
options:
--help
--update
```
## Project Setup Overview
ProjectDirectory
├── Makefile
├── bin
├── include
├── libs
│ ├── Makefile
│ └── some_library
├── src
│ └── main.c
└── tests
├── Makefile
├── criterion-v2.3.2
└── tests.c
Makefile has basic **$(NAME)**, **all**, **clean**, **fclean** and **re** rules
All source files in **src** are compiled. Build files are kept in a temporary **build** directory.
Binaries are kept in **bin** directory
**release** rule recompiles all with -O3 and -march=native flags
**libs** directory is where libraries live. Each library should have its own directory with same exact name (excluding lib and .a).
Each of these directories should have a Makfile with a default rule that compiles the lib or no Makefile but an .a file.
They need also to have .h/.hpp files located in ./include
**tests** dir is where tests are run and criterion lives.
If you do make tests all \*.c/.cpp files in the tests directory will be compiled and ran one after the other.
An example file with Test is present, but you should check out the [criterion repo](https://github.com/Snaipe/Criterion).
**run** rule runs the binary. **all** compiles, tests and then runs.
## Philosophy
This is a one and done kind of utility. It is not a build tool. It just sets up Makefiles and directories, maintenance and changes are up to you.
## Status / Todo
- Libs implementation might be untested -> to test
- Only works with static libs (.a archives) -> add better lib struct for all kinds (.a, .so, .dylib, from source or not)
- Includes are in ./include -> Includes in src or outside?
- Windows implementation??? (use wsl people!)
- multiple binaries?
- only binary project available now -> lib project structure?
## Ressources
[GNU Make manual](https://www.gnu.org/software/make/manual/make.html)
[Criterion Youtube Tutorial](https://youtu.be/JarMkGWTF8Y)
[Criterion documentation](https://criterion.readthedocs.io/en/master/)
## Credits
[Criterion](https://github.com/Snaipe/Criterion)
没有合适的资源?快使用搜索试试~ 我知道了~
使用make和criterion的CC++项目的项目设置工具。___.zip
共82个文件
h:52个
template:4个
hxx:4个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 192 浏览量
2023-04-15
09:31:34
上传
评论
收藏 937KB ZIP 举报
温馨提示
使用make和criterion的CC++项目的项目设置工具。___.zip
资源推荐
资源详情
资源评论
收起资源包目录
使用make和criterion的CC++项目的项目设置工具。___.zip (82个子文件)
metamake-master
tools
metamake.py 4KB
uninstall.sh 253B
install.sh 932B
metamake.sh 359B
.github
workflows
metamake_ci.yml 317B
Makefile 430B
LICENSE 1KB
ressources
project_template
Makefile 2KB
tests
criterion_mac-v2.3.2
include
criterion
output.h 2KB
parameterized.h 3KB
alloc.h 8KB
theories.h 14KB
assert.h 60KB
criterion.h 4KB
types.h 5KB
logging.h 6KB
internal
parameterized.h 5KB
preprocess.h 3KB
theories.h 4KB
assert.h 37KB
test.h 12KB
stream.hxx 4KB
designated-initializer-compat.h 12KB
stdio_filebuf.hxx 5KB
common.h 4KB
ordered-set.h 2KB
hooks.h 4KB
deprecation.h 2KB
asprintf-compat.h 2KB
redirect.h 9KB
hooks.h 2KB
stats.h 3KB
abort.h 2KB
event.h 1KB
redirect.h 21KB
options.h 5KB
lib
libcriterion.dylib 20B
libcriterion.3.1.0.dylib 437KB
libcriterion.3.dylib 24B
share
pkgconfig
criterion.pc 350B
criterion_linux-v2.3.2
include
criterion
output.h 2KB
parameterized.h 3KB
alloc.h 8KB
theories.h 14KB
assert.h 60KB
criterion.h 4KB
types.h 5KB
logging.h 6KB
internal
parameterized.h 5KB
preprocess.h 3KB
theories.h 4KB
assert.h 37KB
test.h 12KB
stream.hxx 4KB
designated-initializer-compat.h 12KB
stdio_filebuf.hxx 5KB
common.h 4KB
ordered-set.h 2KB
hooks.h 4KB
deprecation.h 2KB
asprintf-compat.h 2KB
redirect.h 9KB
hooks.h 2KB
stats.h 3KB
abort.h 2KB
event.h 1KB
redirect.h 21KB
options.h 5KB
lib
libcriterion.so.3 21B
libcriterion.so.3.1.0 1.91MB
libcriterion.so 17B
share
pkgconfig
criterion.pc 349B
locale
fr
LC_MESSAGES
Criterion.mo 3KB
de
LC_MESSAGES
Criterion.mo 4KB
Makefile 1KB
libs
Makefile 1KB
templates
main.c.template 129B
main.cpp.template 153B
tests.cpp.template 216B
tests.c.template 214B
.gitignore 13B
README.md 3KB
共 82 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功