Makefile.in 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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++0x
  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 ./ext/gtest/ clean
  70. $(MAKE) -C ./epid/common-testhelper/ clean
  71. $(MAKE) -C ./ext/dropt/ clean
  72. install:
  73. $(MAKE) -C ./ext/ipp/sources/ippcp install
  74. $(MAKE) -C ./ext/ipp/sources/ippcpepid install
  75. $(MAKE) -C ./epid/common/ install
  76. $(MAKE) -C ./epid/member/ install
  77. $(MAKE) -C ./epid/verifier/ install
  78. $(MAKE) -C ./example/ install
  79. $(MAKE) -C ./tools/ install
  80. $(MAKE) -C ./epid/common-testhelper/ install
  81. uninstall:
  82. rm -rf $(epidinstalldir)
  83. ipp:
  84. $(MAKE) -C ./ext/ipp/sources/ippcp all
  85. $(MAKE) -C ./ext/ipp/sources/ippcpepid all ARCH=$(ARCH)
  86. common:
  87. $(MAKE) -C ./epid/common/ all
  88. member:
  89. $(MAKE) -C ./epid/member/ all
  90. verifier:
  91. $(MAKE) -C ./epid/verifier/ all
  92. dropt:
  93. $(MAKE) -C ./ext/dropt/ all
  94. examples_util:
  95. $(MAKE) -C ./example/util/ all
  96. check:
  97. $(MAKE) -C ./ext/gtest/ all
  98. $(MAKE) -C ./epid/common-testhelper/ all
  99. $(MAKE) -C ./epid/common-testhelper/ check
  100. $(MAKE) -C ./epid/common/ check
  101. $(MAKE) -C ./epid/member/ check
  102. $(MAKE) -C ./epid/verifier/ check
  103. examples:
  104. $(MAKE) -C ./example/ all
  105. epid_tools:
  106. $(MAKE) -C ./tools/ all
  107. build: all check install