Makefile 803 B

123456789101112131415161718192021222324252627282930313233
  1. CC=gcc
  2. CFLAGS = -g -Wall
  3. headers = radix-tree.h ctree.h disk-io.h kerncompat.h print-tree.h list.h
  4. objects = ctree.o disk-io.o radix-tree.o mkfs.o extent-tree.o print-tree.o
  5. # if you don't have sparse installed, use ls instead
  6. CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
  7. -Wcontext -Wcast-truncate -Wuninitialized -Wshadow -Wundef
  8. check=sparse $(CHECKFLAGS)
  9. #check=ls
  10. .c.o:
  11. $(check) $<
  12. $(CC) $(CFLAGS) -c $<
  13. all: tester debug-tree quick-test
  14. debug-tree: $(objects) debug-tree.o
  15. gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o
  16. tester: $(objects) random-test.o
  17. gcc $(CFLAGS) -o tester $(objects) random-test.o
  18. quick-test: $(objects) quick-test.o
  19. gcc $(CFLAGS) -o quick-test $(objects) quick-test.o
  20. $(objects) : $(headers)
  21. clean :
  22. rm debug-tree tester *.o