1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
# Example Makefile with various issues # Missing .PHONY declaration clean: rm -rf build/ # Mixed indentation (spaces instead of tabs) build: src/*.c gcc -o app $^ # Poor variable naming foo = bar FOO = baz # Hardcoded path INSTALL_DIR = /usr/local/bin # Missing dependencies test: pytest tests/ # Long line CFLAGS = -Wall -Wextra -Werror -O2 -g -std=c11 -pedantic -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -march=native all: build test install: build cp app $(INSTALL_DIR)