cc		 = gcc
rm		 = rm -f
cflags = -Wall -Wextra -pedantic --std=c99 -MMD -o $@
target = inject

src		 = $(wildcard *.c)
obj		 = $(src:.c=.o)
dep		 = $(obj:.o=.d)

%.o: %.c
	$(cc) $(cflags) -c $<

.phony: all
all: $(target)

-include $(dep)

$(target): $(obj)
	$(cc) $(cflags) $^

.phony: clean
clean:
	$(rm) $(obj) $(dep) $(target)