Makefile 1.2 KB

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