Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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-libnuma
  17. CC := $(CC) -MD
  18. all: $(FILES)
  19. BUILD = $(CC) -o $(OUTPUT)$@ $@.c
  20. ###############################
  21. test-hello:
  22. $(BUILD)
  23. test-stackprotector-all:
  24. $(BUILD) -Werror -fstack-protector-all
  25. test-stackprotector:
  26. $(BUILD) -Werror -fstack-protector
  27. test-volatile-register-var:
  28. $(BUILD) -Werror -Wvolatile-register-var
  29. test-fortify-source:
  30. $(BUILD) -O2 -Werror -D_FORTIFY_SOURCE=2
  31. test-bionic:
  32. $(BUILD)
  33. test-libelf:
  34. $(BUILD) -lelf
  35. test-glibc:
  36. $(BUILD)
  37. test-dwarf:
  38. $(BUILD) -ldw
  39. test-libelf-mmap:
  40. $(BUILD) -lelf
  41. test-libelf-getphdrnum:
  42. $(BUILD) -lelf
  43. test-libnuma:
  44. $(BUILD) -lnuma
  45. test-libunwind:
  46. $(BUILD) -lunwind -lunwind-x86_64 -lelf
  47. test-libaudit:
  48. $(BUILD) -laudit
  49. test-libslang:
  50. $(BUILD) -I/usr/include/slang -lslang
  51. -include *.d */*.d
  52. ###############################
  53. clean:
  54. rm -f $(FILES) *.d