Makefile 335 B

12345678910111213141516
  1. # See LICENSE file for copyright and license details.
  2. include config.mk
  3. EXECS := $(patsubst examples/%.c,build/%,$(wildcard examples/*.c))
  4. all: $(EXECS)
  5. build/%: examples/%.c dtext.c dtext.h config.mk Makefile
  6. [ -d build ] || mkdir build
  7. ${CC} -I. ${CFLAGS} ${LDFLAGS} $< dtext.c -o $@
  8. clean:
  9. rm -f $(EXECS)
  10. .PHONY: all clean