Explain Makefile code
Paste a Makefile and Vibe explains what each rule builds, why make reruns some commands and skips others, and what $@, $^ and $< stand for.
Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.
Vibe24 lines selected
Press Explain it for the sample, or paste your own code first.
What this Makefile sample shows
- targets and prerequisites
- Each rule reads
target: prerequisites, with its commands on the lines under it. make runs a rule's commands only when the target is missing or older than one of its prerequisites, so a secondmakein a row printedmake: 'wordcount' is up to date.and compiled nothing. - variables
:=sets a variable once, when make reads the line.$(wildcard src/*.c)lists the C files that exist, and$(SRC:src/%.c=build/%.o)turns each one into its object file's name, sosrc/main.cbecomesbuild/main.o. A new .c file in src/ joins the build with no edit to the Makefile.- pattern rules
build/%.o: src/%.c src/count.his one rule for every object file, where%is the same name on both sides. Because the header is listed too, touchingsrc/count.hrecompiled both files and relinked the tool. The| buildpart is an order-only prerequisite: the folder has to exist first, but its newer time stamp never causes a rebuild.- automatic variables
$@is the rule's target,$^all its prerequisites and$<the first one. So the link step rancc -Wall -Wextra -O2 -o wordcount build/count.o build/main.o, and each compile got only its own .c file.- phony targets
testandcleanname jobs, not files, and.PHONYsays so. It matters once a file with that name turns up: with the.PHONYline removed, a file calledtestnewer than the tool mademake testprintmake: 'test' is up to date.and skip the test.
Good to know
- Run with GNU Make 4.4.1 on a three-file C project, the first
makeranmkdir -p build, two compiles and the link, andmake testpassed (3 lines, 9 words, 44 characters). - Editing only
src/main.crecompiledmain.oand relinked, and leftcount.oalone. On a big project that is the point of make: only what changed gets built again. - When the output differs,
diffprints both lines and exits with 1, so make stops withmake: *** [Makefile:19: test] Error 1, and a CI job runningmake testfails.
Watch out: Each command line has to start with a tab, not spaces. With the tabs turned into four spaces, which some editors do on save, make stopped at the first command with Makefile:10: *** missing separator. Stop. and built nothing.
Explain Makefile code beside your editor
Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).
Install on Mac
curl -fsSL https://unvibe.site/install.sh | bashPaste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.
Or download the .dmg · Intel Mac build · SHA-256 checksums
Opening the .dmg the first time
- Open the .dmg and drag Unvibe to Applications.
- Open it once; macOS says it can't verify it. Click Done.

Real screen, macOS 15 - System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.

Real screen, macOS 15
The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open