2022-06-19 01:12:50 +00:00
|
|
|
CFLAGS ?= -Wall -Wextra -g -O1 -fpic
|
|
|
|
LDFLAGS ?= -g -O1 -shared
|
2022-06-19 05:13:49 +00:00
|
|
|
GARGOYLE_OBJS := gargoyle sleuth twine
|
2022-06-19 01:12:50 +00:00
|
|
|
|
|
|
|
.PHONY: all gargoyle init docs test clean
|
|
|
|
|
|
|
|
all: gargoyle
|
|
|
|
|
|
|
|
gargoyle: bin/libgargoyle.so
|
|
|
|
|
|
|
|
init: bin
|
|
|
|
|
|
|
|
bin:
|
|
|
|
mkdir -p -- bin
|
|
|
|
|
|
|
|
bin/libgargoyle.so: $(addprefix bin/,$(addsuffix .o,$(GARGOYLE_OBJS)))
|
|
|
|
cc $(LDFLAGS) -o $@ $^
|
|
|
|
|
|
|
|
bin/%.o: src/%.c | init
|
|
|
|
cc $(CFLAGS) -std=c99 -I include -c -o $@ $<
|
|
|
|
|
|
|
|
docs:
|
|
|
|
@printf "not implemented yet.\n" >&2
|
|
|
|
|
|
|
|
test:
|
|
|
|
@printf "not implemented yet.\n" >&2
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf -- bin/*
|