notcurses/doc/examples/Makefile
2021-01-08 00:54:05 -05:00

22 lines
327 B
Makefile

.DELETE_ON_ERROR:
.PHONY: all book serve clean
.DEFAULT_GOAL:=all
SRC:=$(wildcard src/*.c)
BIN:=$(foreach src, $(SRC), $(addprefix book/,$(notdir $(basename $(src)))))
all: $(BIN)
serve: book
mdbook serve
book: $(SRC)
mdbook build
book/%: src/%.c
@mkdir -p $(@D)
$(CC) -o $@ $< -lnotcurses
clean:
rm -rf $(BIN) book