You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
|