mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-20 03:25:47 +00:00
22 lines
327 B
Makefile
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
|