Makefile 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. TEST_CFILES := $(wildcard tools/ccanlint/tests/*.c)
  2. TEST_OBJS := $(TEST_CFILES:.c=.o)
  3. CORE_OBJS := \
  4. ccan/asort/asort.o \
  5. ccan/btree/btree.o \
  6. ccan/dgraph/dgraph.o \
  7. ccan/foreach/foreach.o \
  8. ccan/grab_file/grab_file.o \
  9. ccan/hash/hash.o \
  10. ccan/htable/htable.o \
  11. ccan/lbalance/lbalance.o \
  12. ccan/noerr/noerr.o \
  13. ccan/opt/helpers.o \
  14. ccan/opt/opt.o \
  15. ccan/opt/parse.o \
  16. ccan/opt/usage.o \
  17. ccan/read_write_all/read_write_all.o \
  18. ccan/str/str.o ccan/str/debug.o \
  19. ccan/str_talloc/str_talloc.o \
  20. ccan/strmap/strmap.o \
  21. ccan/talloc/talloc.o \
  22. ccan/talloc_link/talloc_link.o \
  23. ccan/time/time.o \
  24. tools/ccanlint/async.o \
  25. tools/ccanlint/ccanlint.o \
  26. tools/ccanlint/file_analysis.o \
  27. tools/ccanlint/licenses.o \
  28. tools/compile.o \
  29. tools/depends.o \
  30. tools/doc_extract-core.o \
  31. tools/tools.o
  32. OBJS := $(CORE_OBJS) $(TEST_OBJS)
  33. # FIXME: write a trivial C program to do this
  34. tools/ccanlint/generated-testlist: $(TEST_CFILES)
  35. cat $^ | grep ^REGISTER_TEST > $@
  36. $(TEST_OBJS): tools/ccanlint/generated-testlist
  37. # Otherwise, ccanlint.c et al. may fail to build
  38. $(CORE_OBJS): tools/ccanlint/generated-testlist config.h
  39. tools/ccanlint/ccanlint: $(OBJS)
  40. ccanlint-clean:
  41. $(RM) tools/ccanlint/generated-testlist
  42. $(RM) tools/ccanlint/ccanlint