Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. FILES= \
  2. test-hello \
  3. test-stackprotector-all \
  4. test-stackprotector \
  5. test-volatile-register-var \
  6. test-fortify-source \
  7. test-bionic \
  8. test-libelf \
  9. test-glibc \
  10. test-dwarf \
  11. test-libelf-mmap \
  12. test-libelf-getphdrnum \
  13. test-libunwind \
  14. test-libaudit \
  15. test-libslang \
  16. test-gtk2 \
  17. test-gtk2-infobar \
  18. test-libnuma
  19. CC := $(CC) -MD
  20. all: $(FILES)
  21. BUILD = $(CC) -o $(OUTPUT)$@ $@.c
  22. ###############################
  23. test-hello:
  24. $(BUILD)
  25. test-stackprotector-all:
  26. $(BUILD) -Werror -fstack-protector-all
  27. test-stackprotector:
  28. $(BUILD) -Werror -fstack-protector
  29. test-volatile-register-var:
  30. $(BUILD) -Werror -Wvolatile-register-var
  31. test-fortify-source:
  32. $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
  33. test-bionic:
  34. $(BUILD)
  35. test-libelf:
  36. $(BUILD) -lelf
  37. test-glibc:
  38. $(BUILD)
  39. test-dwarf:
  40. $(BUILD) -ldw
  41. test-libelf-mmap:
  42. $(BUILD) -lelf
  43. test-libelf-getphdrnum:
  44. $(BUILD) -lelf
  45. test-libnuma:
  46. $(BUILD) -lnuma
  47. test-libunwind:
  48. $(BUILD) -lunwind -lunwind-x86_64 -lelf
  49. test-libaudit:
  50. $(BUILD) -laudit
  51. test-libslang:
  52. $(BUILD) -I/usr/include/slang -lslang
  53. test-gtk2:
  54. $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
  55. test-gtk2-infobar:
  56. $(BUILD) $(shell pkg-config --libs --cflags gtk+-2.0 2>/dev/null)
  57. -include *.d */*.d
  58. ###############################
  59. clean:
  60. rm -f $(FILES) *.d