Makefile 964 B

1234567891011121314151617181920212223242526272829303132333435
  1. CC=gcc
  2. CFLAGS = -g -Wall -Werror
  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. root-tree.o dir-item.o hash.o file-item.o inode-item.o
  6. # if you don't have sparse installed, use ls instead
  7. CHECKFLAGS=-D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise \
  8. -Wcontext -Wcast-truncate -Wuninitialized -Wshadow -Wundef
  9. check=sparse $(CHECKFLAGS)
  10. #check=ls
  11. .c.o:
  12. $(check) $<
  13. $(CC) $(CFLAGS) -c $<
  14. all: tester debug-tree quick-test dir-test tags
  15. debug-tree: $(objects) debug-tree.o
  16. gcc $(CFLAGS) -o debug-tree $(objects) debug-tree.o
  17. tester: $(objects) random-test.o
  18. gcc $(CFLAGS) -o tester $(objects) random-test.o
  19. dir-test: $(objects) dir-test.o
  20. gcc $(CFLAGS) -o dir-test $(objects) dir-test.o
  21. quick-test: $(objects) quick-test.o
  22. gcc $(CFLAGS) -o quick-test $(objects) quick-test.o
  23. $(objects): $(headers)
  24. clean :
  25. rm debug-tree tester *.o