makefile
Best practices for authoring clean, maintainable, and portable GNU Make Makefiles.
Skill by dallay
Chalk Labs
Need help deploying makefile?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/dallay-makefile
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, productivity
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/makefile
What's inside
- Skill name
makefile- Description
- Best practices for authoring clean, maintainable, and portable GNU Make Makefiles. Use when the task involves `creating or editing Makefiles`, `Makefile`, `makefile`, `*.mk`, `GNUmakefile`, `GNU Make patterns`, `build automation`, or `makefile troubleshooting`.
- License
- MIT
- Metadata
- version: 1.0.0
- Instructions
- 250 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
## When to Use - Creating a new `Makefile` for any project (C/C++, Go, Node.js, etc.) - Reviewing or refactoring existing makefiles for correctness and maintainability - Debugging build failures related to make rules, prerequisites, or variables - Setting up build automation with GNU Make (pattern rules, automatic dependencies, parallel builds) - Ensuring portability across platforms or compliance with GNU Make conventions ## Critical Patterns - **Tabs, Not Spaces:** Every recipe line MUST start with a **tab character**. Spaces will cause a syntax error. - **Declare `.PHONY`:** Always mark non-file targets (e.g., `clean`, `all`, `test`, `install`) with `.PHONY` to avoid conflicts with files of the same name. - **Use `:=` Over `=` When Possible:** Prefer simple expansion (`:=`) for variables to avoid unexpected recursive expansion and improve performance. - **Automatic Variables:** Use `$@` (target), `$<` (first prerequisite), `$^` (all prerequisites), `$?` (newer prerequisites), and `$*` (stem) in recipes to keep rules generic and reusable. - **Use `$(wildcard ...)` Not `$(shell ls ...)`:** Never shell out for file lists; use Make's built-in `$(wildcard *.c)` function instead. - **Auto-Generate Dependencies:** Use compiler flags like `-MMD -MP` to generate `.d` files rather than maintaining header dependencies manually. - **Clean Target:** Always provide a `clean` target and prefix destructive commands with `-` to ignore errors if files don't exist. - **Variables First, Rules Second:** Define all variables at the top, followed by the default goal, then build rules, then phony targets. - **Avoid Recursive Make:** Don't use `$(MAKE) -C subdir` unless absolutely necessary; prefer includes or non-recursive approaches. ## File Structure ```makefile # ------------------------------------------------------- # Project: <name> # # Usage: # make - Build the project # make clean - Remove generated files # make install - Install to $(PREFIX) # make test - Run tests # # Variables: # CC - C compiler (default: gcc) # PREFIX - Installation prefix (default: /usr/local) # ------------------------------------------------------- # --- Variables --- CC ?= gcc CFLAGS := -Wall -Wextra -O2 PREFIX ?= /usr/local sources := $(wildcard src/*.c) objects := $(sources:.c=.o) deps := $(objects:.o=.d) # --- Default Goal --- all: program # --- Build Rules --- program: $(objects) $(CC) -o $@ $^ $(LDFLAGS) %.o: %.c $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ -include $(deps) # --- Phony Targets --- .PHONY: all clean install test clean: -rm -f program $(objects) $(deps) install: program install -d $(PREFIX)/bin install -m 755 program $(PREFIX)/bin test: program ./run-tests.sh ``` ## Code Examples ### Variables and Substitution ```makefile # Simple expansion (evaluates immediately) - PREFERRED CC := gcc # Recursive expansion (evaluates when used) CFLAGS = -Wall $(EXTRA_FLAGS) # Conditional assignment (set default, allow override) PREFIX ?= /usr/local # Append to variable CFLAGS += -g # Always reference with $() - not bare $VAR objects := $(sources:.c=.o) ``` ### Pattern Rules and Implicit Rules ```makefile # Custom pattern rule for generic transformations %.pdf: %.md pandoc $< -o $@ # Compile with auto-dependency generation %.o: %.c $(CC) $(CFLAGS) -MMD -MP -c $< -o $@ ``` ### Order-Only Prerequisites ```makefile # The directory is created before compiling but does NOT # trigger recompilation when its timestamp changes.
From dallay/agents-skills, MIT.
More from dallay/agents-skills
- 0.563score
drizzle-orm
dallay
Type-safe SQL ORM for TypeScript with zero runtime overhead Use when working with this technology or related database and validation workflows.
SkillBFreshness: B★ 2Claude Code +9 - 0.448score
accessibility
dallay
Audit and improve web accessibility following WCAG 2.1 guidelines.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
best-practices
dallay
Apply modern web development best practices for security, compatibility, and code quality.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
core-web-vitals
dallay
Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
github-actions
dallay
Comprehensive guide for building robust, secure, and efficient CI/CD pipelines using GitHub Actions.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
jest-testing
dallay
Jest testing framework patterns for JavaScript and TypeScript projects, covering test structure, mocking strategies, async testing, snapshot testing, React…
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
docker-expert
dallay
Advanced Docker containerization expert for multi-stage builds, image optimization, security hardening, and Compose orchestration.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
elixir-development
dallay
Elixir and OTP best practices, patterns, and idioms for building concurrent, fault-tolerant applications.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
eslint-config
dallay
ESLint configuration expert for flat config setup, custom rules, TypeScript integration, plugin management, and migration from legacy .eslintrc to modern…
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
express-api
dallay
Express.js server-side development patterns for building robust REST APIs with proper middleware chains, error handling, request validation, security…
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
markdown-a11y
dallay
Markdown accessibility review guidelines based on GitHub's 5 best practices for inclusive documentation.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
cypress-e2e
dallay
Cypress end-to-end testing patterns for reliable browser-based testing, covering selectors, custom commands, API mocking with cy.intercept, CI configuration…
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 3
- Last commit (this folder)
- Apr 4, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- Version
- 1.0.0
- License
- MIT
- Repository
- github.com/dallay/agents-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from dallay
- 0.563score
drizzle-orm
dallay
Type-safe SQL ORM for TypeScript with zero runtime overhead Use when working with this technology or related database and validation workflows.
SkillBFreshness: B★ 2Claude Code +9 - 0.448score
github-actions
dallay
Comprehensive guide for building robust, secure, and efficient CI/CD pipelines using GitHub Actions.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
accessibility
dallay
Audit and improve web accessibility following WCAG 2.1 guidelines.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
core-web-vitals
dallay
Optimize Core Web Vitals (LCP, INP, CLS) for better page experience and search ranking.
SkillDFreshness: D★ 2Claude Code +9 - 0.448score
best-practices
dallay
Apply modern web development best practices for security, compatibility, and code quality.
SkillDFreshness: D★ 2Claude Code +9 - 0.443score
docker-expert
dallay
Advanced Docker containerization expert for multi-stage builds, image optimization, security hardening, and Compose orchestration.
SkillDFreshness: D★ 2Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get makefile running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
makefile skill. Agent Mart. https://agentmart.dev/skills/dallay-makefile (last updated 2026-10-24)