Makefile.in 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #!/usr/bin/make -f
  2. include ../../buildenv.mk
  3. #variables are set by configure
  4. prefix = @prefix@
  5. installdir = $(prefix)/
  6. epidinstalldir = $(installdir)/epid-sdk
  7. CFLAGS = @CFLAGS@
  8. #g++ flags
  9. CXX_FLAGS := $(CFLAGS) -O2 -Werror -Wall -Wextra -Wno-missing-braces \
  10. -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-unused-function \
  11. -fno-strict-aliasing -Wno-unused-but-set-variable -Wno-comment -DNDEBUG -fPIC
  12. #gcc flags
  13. CC_FLAGS := $(CXX_FLAGS) -D_IPP_v50_ -D_IPP_DEBUG
  14. #intel c++ compiler flags
  15. ICPC_FLAGS := $(CFLAGS) -O2 -Werror -Wall -Wextra -DNDEBUG
  16. #intel c compiler flags
  17. ICC_FLAGS := $(ICPC_FLAGS) -D_IPP_v50_ -D_IPP_DEBUG
  18. #check if architecture was specified
  19. #or take it by shell command
  20. ifeq ($(findstring -m32,$(CFLAGS)),-m32)
  21. ARCH = x86
  22. CXXFLAGS += -m32
  23. else ifeq ($(findstring -m64,$(CFLAGS)),-m64)
  24. ARCH = x86_64
  25. CXXFLAGS += -m64
  26. else
  27. ARCH := $(shell uname -m)
  28. endif
  29. #set tools and flags depending on specified compiler
  30. ifeq ($(CC),icc)
  31. CFLAGS := $(ICC_FLAGS)
  32. CXXFLAGS := $(ICPC_FLAGS)
  33. AR = xiar
  34. else ifeq ($(CC),cc)
  35. CFLAGS := $(CC_FLAGS)
  36. ifeq ($(ARCH),x86)
  37. CFLAGS += -m32
  38. endif
  39. else
  40. CFLAGS := $(CC_FLAGS)
  41. CXXFLAGS := $(CXX_FLAGS)
  42. ARCH = x86
  43. endif
  44. #set c++11 for all c++ compilers
  45. CXXFLAGS += -std=c++11
  46. #set flags for unit tests executables
  47. GTEST_FLAGS = --gtest_color=yes \
  48. --gtest_print_time=1 \
  49. --gtest_output=xml
  50. export CC AR LDFLAGS ARCH CFLAGS
  51. export CXX CXXFLAGS
  52. export epidinstalldir
  53. export GTEST_FLAGS
  54. #just output
  55. $(info $$ccompiler is [${CC}])
  56. $(info $$cxxcompiler is [${CXX}])
  57. $(info $$architecture is [${ARCH}])
  58. #targets part
  59. all: ipp common member verifier dropt
  60. clean:
  61. $(MAKE) -C ./ext/ipp/sources/ippcp clean
  62. $(MAKE) -C ./ext/ipp/sources/ippcpepid clean
  63. $(MAKE) -C ./epid/common/ clean
  64. $(MAKE) -C ./epid/member/ clean
  65. $(MAKE) -C ./epid/verifier/ clean
  66. $(MAKE) -C ./example/util/ clean
  67. $(MAKE) -C ./example/ clean
  68. $(MAKE) -C ./tools/ clean
  69. $(MAKE) -C ./epid/common-testhelper/ clean
  70. $(MAKE) -C ./ext/dropt/ clean
  71. install:
  72. $(MAKE) -C ./ext/ipp/sources/ippcp install
  73. $(MAKE) -C ./ext/ipp/sources/ippcpepid install
  74. $(MAKE) -C ./epid/common/ install
  75. $(MAKE) -C ./epid/member/ install
  76. $(MAKE) -C ./epid/verifier/ install
  77. $(MAKE) -C ./example/ install
  78. $(MAKE) -C ./tools/ install
  79. $(MAKE) -C ./epid/common-testhelper/ install
  80. uninstall:
  81. rm -rf $(epidinstalldir)
  82. ipp:
  83. $(MAKE) -C ./ext/ipp/sources/ippcp all
  84. $(MAKE) -C ./ext/ipp/sources/ippcpepid all ARCH=$(ARCH)
  85. common:
  86. $(MAKE) -C ./epid/common/ all
  87. member:
  88. $(MAKE) -C ./epid/member/ all
  89. verifier:
  90. $(MAKE) -C ./epid/verifier/ all
  91. dropt:
  92. $(MAKE) -C ./ext/dropt/ all
  93. examples_util:
  94. $(MAKE) -C ./example/util/ all
  95. check:
  96. $(MAKE) -C ./ext/gtest/ all
  97. $(MAKE) -C ./epid/common-testhelper/ all
  98. $(MAKE) -C ./epid/common-testhelper/ check
  99. $(MAKE) -C ./epid/common/ check
  100. $(MAKE) -C ./epid/member/ check
  101. $(MAKE) -C ./epid/verifier/ check
  102. examples:
  103. $(MAKE) -C ./example/ all
  104. epid_tools:
  105. $(MAKE) -C ./tools/ all
  106. build: all check install