30 lines
493 B
Makefile
30 lines
493 B
Makefile
|
CFLAGS ?= -Wall -Wextra -g -O1 -fpic
|
||
|
LDFLAGS ?= -g -O1 -shared
|
||
|
GARGOYLE_OBJS := gargoyle
|
||
|
|
||
|
.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/*
|