Makefile 873 B

123456789101112131415161718192021222324252627282930
  1. # Copyright © 2014 Kosma Moczek <kosma@cloudyourcar.com>
  2. # This program is free software. It comes without any warranty, to the extent
  3. # permitted by applicable law. You can redistribute it and/or modify it under
  4. # the terms of the Do What The Fuck You Want To Public License, Version 2, as
  5. # published by Sam Hocevar. See the COPYING file for more details.
  6. CFLAGS = -g -Wall -Wextra -Werror -std=c99
  7. CFLAGS += -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_DARWIN_C_SOURCE
  8. LDLIBS = -lcheck
  9. all: scan-build test example
  10. @echo "+++ All good."""
  11. test: tests
  12. @echo "+++ Running Check test suite..."
  13. ./tests
  14. scan-build: clean
  15. @echo "+++ Running Clang Static Analyzer..."
  16. scan-build $(MAKE) tests
  17. clean:
  18. $(RM) tests example *.o
  19. tests: tests.o minmea.o
  20. example: example.o minmea.o
  21. tests.o: tests.c minmea.h
  22. minmea.o: minmea.c minmea.h
  23. .PHONY: all test scan-build clean