modern-c-makefile
Modern C Makefile
Overview
This skill provides guidance and templates for creating clean, maintainable Makefiles for modern C/C++ projects, based on the best practices demonstrated in the gnaro project. It helps structure build systems that integrate compilation, testing, linting, formatting, and dependency management in a clear and organized way.
Core Concepts
Understand these key Makefile concepts before implementing:
- Variables: Centralize project settings like compiler flags, directories, and tool paths
- Wildcards: Use patterns like
*.cand**/*.cto automatically find source files - Automatic Variables: Leverage
$@(target),$<(first dependency),$*(stem),$(@D)(target directory) - Phony Targets: Declare
.PHONYtargets for actions likeclean,format,lintthat don't produce files - Conditionals: Use
ifeq/else/endiffor debug/release builds or platform-specific configurations - Pattern Rules: Create generic rules for compiling
.cto.ofiles
Makefile Template
More from aresbit/matebot
3d-cad-skill
Create and iterate parametric 3D CAD models for Claude using an inspectable feedback loop. Use when the task involves OpenSCAD, build123d, STL/STEP/3MF output, fixture/enclosure/adapter design, or debugging shape accuracy from renders or screenshots.
2c-skill
Composite C skill that chains modern-c-makefile, spclib, and modern-c-dev.
1docx
Generate and edit Word documents (.docx). Supports professional documents including covers, charts, track-changes editing, and more. Suitable for any .docx creation or modification task.
1pdf
Professional PDF solution. Create PDFs using HTML+Paged.js (academic papers, reports, documents). Process existing PDFs using Python (read, extract, merge, split, fill forms). Supports KaTeX math formulas, Mermaid diagrams, three-line tables, citations, and other academic elements. Also use this skill when user explicitly requests LaTeX (.tex) or native LaTeX compilation.
1spclib
|
1kernel-dev-skill
Linux kernel development skill grounded in local references/labs and references/lectures materials. Use for kernel modules, system calls, process scheduling, interrupts, locking, memory management, filesystems, networking, architecture, debugging, profiling, and device model work.
1