Makefile 699 B

123456789101112131415161718192021222324
  1. TEST_CFILES := $(wildcard tools/ccanlint/compulsory_tests/*.c) \
  2. $(wildcard tools/ccanlint/tests/*.c)
  3. TEST_OBJS := $(TEST_CFILES:.c=.o)
  4. CORE_OBJS := tools/ccanlint/ccanlint.o \
  5. tools/ccanlint/file_analysis.o \
  6. tools/doc_extract-core.o \
  7. ccan/str_talloc/str_talloc.o ccan/grab_file/grab_file.o \
  8. ccan/talloc/talloc.o ccan/noerr/noerr.o
  9. OBJS := $(CORE_OBJS) $(TEST_OBJS)
  10. # FIXME: write a trivial C program to do this
  11. tools/ccanlint/generated-init-tests: $(TEST_CFILES)
  12. cat $(TEST_CFILES) | grep ^REGISTER_TEST > $@
  13. $(TEST_OBJS): tools/ccanlint/generated-init-tests
  14. tools/ccanlint/ccanlint: $(OBJS)
  15. ccanlint-clean:
  16. $(RM) tools/ccanlint/generated-init-tests
  17. $(RM) tools/ccanlint/ccanlint