Makefile Generator
Free online makefile generator tool, no installation required
About Makefile Generator
Generates ready-to-use Makefiles for five language templates: C, C++, Go, Python, and Node.js. C/C++ templates use a configurable compiler (gcc/g++ by default) with -Wall -Wextra -O2 flags and wildcard source discovery, while Go, Python, and Node.js templates wire up build/setup, run, test, and clean targets with a correct .PHONY declaration.
How to Use
1. Pick a language from the Language dropdown (C, C++, Go, Python, Node.js). 2. Fill the language-specific fields: target name / source directory / compiler (C/C++), target name + main file (Go), main file + venv name (Python), or entry point (Node.js). 3. Tick the targets to include: Clean, Run, Test. 4. Click Generate to render the Makefile in the output box and use Copy to copy it.
Language-Specific Targets
C/C++: emits CC/CXX, CFLAGS/CXXFLAGS (-Wall -Wextra -O2, plus -std=c++17 for C++), SRCS via $(wildcard), OBJS via suffix substitution, plus pattern rules. Go: emits go build -o $(TARGET) . and go test ./... -v. Python: emits python -m venv $(VENV), pytest, and removes __pycache__ + venv on clean. Node.js: emits npm install, node $(ENTRY), npm test, and removes node_modules on clean.
▶How do I change the C/C++ compiler?
▶Why does the C/C++ Makefile use wildcard?
▶What does the Python template's setup target do?
▶Are the generated Makefiles tab-indented?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee