notcurses/doc/examples/Makefile

22 lines
327 B
Makefile
Raw Normal View History

2021-01-08 05:54:05 +00:00
.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