mhddfs-respect-compiler-vars.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. --- Makefile.orig 2012-11-19 15:25:21.665692111 +0400
  2. +++ Makefile 2012-11-19 15:27:08.406691288 +0400
  3. @@ -22,13 +22,13 @@
  4. TARGET = mhddfs
  5. -CFLAGS = -Wall $(shell pkg-config fuse --cflags) \
  6. +CFLAGS += -Wall $(shell pkg-config fuse --cflags) \
  7. -DFUSE_USE_VERSION=26 -MMD
  8. ifdef WITHOUT_XATTR
  9. CFLAGS += -DWITHOUT_XATTR
  10. endif
  11. -LDFLAGS = $(shell pkg-config fuse --libs)
  12. +LIBS = $(shell pkg-config fuse --libs)
  13. FORTAR = src COPYING LICENSE README Makefile \
  14. README.ru.UTF-8 ChangeLog mhddfs.1 \
  15. @@ -64,14 +64,14 @@
  16. $(shell rpm --eval '%_rpmdir')/*/mhddfs-*$(VERSION)-$(RELEASE)* .
  17. $(TARGET): obj/obj-stamp $(OBJ)
  18. - gcc $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS)
  19. + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) $(LIBS) -o $@
  20. obj/obj-stamp:
  21. mkdir -p obj
  22. touch $@
  23. obj/%.o: src/%.c
  24. - gcc $(CFLAGS) -c $< -o $@
  25. + $(CC) $(CFLAGS) -c $< -o $@
  26. clean:
  27. rm -fr obj $(TARGET) pwrite_test statvfs rename
  28. @@ -79,7 +79,7 @@
  29. rm -fr rename-test/mnt
  30. rename: tests/rename.c
  31. - gcc -o $@ $<
  32. + $(CC) -o $@ $<
  33. release_svn_thread:
  34. @echo current version $(VERSION)
  35. @@ -94,10 +94,10 @@
  36. screen -t vim vim Makefile src/*.[ch] README* ChangeLog mhddfs.1
  37. pwrite_test: src/test/pwrite.c
  38. - gcc -o $@ $<
  39. + $(CC) -o $@ $<
  40. statvfs: src/test/statvfs.c
  41. - gcc -o $@ $<
  42. + $(CC) -o $@ $<
  43. images-mount: test1.img test2.img
  44. mount|grep -q `pwd`/test1 || sudo mount -o loop test1.img test1
  45. @@ -141,7 +141,7 @@
  46. while make test; do echo ok; echo; done
  47. ptest:
  48. - gcc -o $@ tests/plocks.c -l pthread
  49. + $(CC) -o $@ tests/plocks.c -l pthread
  50. -./$@
  51. rm -f $@