Makefile 336 B

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