https://github.com/nasso/epine-cc
Epine module for C/C++ projects using the GNU Compiler Collection or compatible compilers
https://github.com/nasso/epine-cc
Last synced: 10 days ago
JSON representation
Epine module for C/C++ projects using the GNU Compiler Collection or compatible compilers
- Host: GitHub
- URL: https://github.com/nasso/epine-cc
- Owner: nasso
- License: mit
- Created: 2021-01-31T16:31:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-05T09:31:46.000Z (over 5 years ago)
- Last Synced: 2025-10-31T03:10:40.606Z (9 months ago)
- Language: Lua
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# epine-cc
[Epine] module for C/C++ projects using the GNU Compiler Collection or
compatible compilers.
## Example usage
```lua
local cc = require "@nasso/epine-cc/v0.2.0-alpha"
return {
-- supported target types: cc.binary, cc.static
-- planned: cc.shared
cc.binary "MyGKrellm" {
-- target prerequisites
prerequisites = {"./lib/libjzon.a"},
-- language ("C" (default) or "C++")
lang = "C++",
-- source files
srcs = {find "./src/*.cpp"},
-- preprocessor flags (include dirs)
cppflags = {"-I./include", "-I./lib/libjzon/include"},
-- compiler flags
cxxflags = {"-Wall", "-Wextra"},
-- libraries
ldlibs = {
"-lsfml-graphics",
"-lsfml-window",
"-lsfml-system",
"-ljzon"
},
-- lib dirs and other linker flags
ldflags = {"-L./lib"}
},
-- [...]
action "clean" {
-- cc.cleanlist represents all the files generated during compilation
-- it does NOT contain the final executable or library
rm(cc.cleanlist)
}
}
```
[Epine]: https://github.com/nasso/epine