Makefile (336B)
1 CC = gcc 2 CFLAGS = -pedantic -Wall -Wextra -Werror 3 SRC = $(wildcard *.c) 4 OBJ = $(SRC:.c=.o) 5 OUT = txt2html 6 7 all: $(OUT) 8 9 debug: clean 10 debug: CFLAGS += -g 11 debug: OUT = txt2html-debug 12 debug: $(OUT) 13 14 15 $(OUT): $(OBJ) 16 $(CC) -o $(OUT) $(OBJ) 17 18 $(OBJ): $(SRC) 19 $(CC) $(CFLAGS) -c $(SRC) 20 21 22 .PHONY: clean 23 clean: 24 rm -f $(OBJ) $(OUT) $(OUT)-debug