Makefile 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. # Makefile
  2. #
  3. # Copyright (C) 2006-2022 wolfSSL Inc.
  4. #
  5. # This file is part of wolfSSL.
  6. #
  7. # wolfSSL is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # wolfSSL is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, write to the Free Software
  19. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  20. ENVI=UbuntuARM
  21. # default to Ubuntu Release build
  22. ifndef V
  23. V=UbuntuARM_Release_aarch64
  24. endif
  25. SUPPORTED_VS = $(default_VS)
  26. include $(HEXAGON_SDK_ROOT)/build/make.d/$(ENVI)_vs.min
  27. include $(HEXAGON_SDK_ROOT)/build/defines.min
  28. ifeq ($(CDSP_FLAG), 1)
  29. LIB_DSPRPC = libcdsprpc
  30. else ifeq ($(MDSP_FLAG), 1)
  31. LIB_DSPRPC = libmdsprpc
  32. else ifeq ($(SLPI_FLAG), 1)
  33. LIB_DSPRPC = libsdsprpc
  34. else
  35. LIB_DSPRPC = libadsprpc
  36. endif
  37. $(info ************ LIB=$(LIB_DSPRPC) ************)
  38. # include files
  39. CC_FLAGS += -I../../
  40. CC_FLAGS += -I./
  41. CC_FLAGS += -DWOLFSSL_USER_SETTINGS
  42. CC_FLAGS += -mcpu=generic+crypto
  43. #CC_FLAGS += -O3
  44. DEPENDENCIES = \
  45. ATOMIC \
  46. RPCMEM
  47. ATOMIC_DIR = $(HEXAGON_SDK_ROOT)/libs/common/atomic
  48. RPCMEM_DIR = $(HEXAGON_SDK_ROOT)/libs/common/rpcmem
  49. # stub library
  50. BUILD_DLLS += libwolfssl
  51. libwolfssl_QAICIDLS += DSP/wolfssl_dsp
  52. libwolfssl_C_SRCS += $V/wolfSSL_stub
  53. libwolfssl_DLLS += $(LIB_DSPRPC)
  54. libwolfssl_C_SRCS += ../../wolfcrypt/src/wc_dsp
  55. libwolfssl_LIBS += rpcmem
  56. libwolfssl_LD_FLAGS += -ldl
  57. # wolfSSL crypto source files
  58. libwolfssl_C_SRCS += \
  59. ../../wolfcrypt/src/aes \
  60. ../../wolfcrypt/src/md2 \
  61. ../../wolfcrypt/src/arc4 \
  62. ../../wolfcrypt/src/md4 \
  63. ../../wolfcrypt/src/asm \
  64. ../../wolfcrypt/src/md5 \
  65. ../../wolfcrypt/src/asn \
  66. ../../wolfcrypt/src/memory \
  67. ../../wolfcrypt/src/async \
  68. ../../wolfcrypt/src/blake2b \
  69. ../../wolfcrypt/src/pkcs12 \
  70. ../../wolfcrypt/src/blake2s \
  71. ../../wolfcrypt/src/pkcs7 \
  72. ../../wolfcrypt/src/camellia \
  73. ../../wolfcrypt/src/poly1305 \
  74. ../../wolfcrypt/src/chacha20_poly1305 \
  75. ../../wolfcrypt/src/pwdbased \
  76. ../../wolfcrypt/src/chacha \
  77. ../../wolfcrypt/src/cmac \
  78. ../../wolfcrypt/src/random \
  79. ../../wolfcrypt/src/coding \
  80. ../../wolfcrypt/src/ripemd \
  81. ../../wolfcrypt/src/compress \
  82. ../../wolfcrypt/src/rsa \
  83. ../../wolfcrypt/src/cpuid \
  84. ../../wolfcrypt/src/selftest \
  85. ../../wolfcrypt/src/cryptocb \
  86. ../../wolfcrypt/src/sha256 \
  87. ../../wolfcrypt/src/curve25519 \
  88. ../../wolfcrypt/src/sha3 \
  89. ../../wolfcrypt/src/des3 \
  90. ../../wolfcrypt/src/sha512 \
  91. ../../wolfcrypt/src/dh \
  92. ../../wolfcrypt/src/sha \
  93. ../../wolfcrypt/src/signature \
  94. ../../wolfcrypt/src/ecc \
  95. ../../wolfcrypt/src/ecc_fp \
  96. ../../wolfcrypt/src/ed25519 \
  97. ../../wolfcrypt/src/sp_armthumb \
  98. ../../wolfcrypt/src/error \
  99. ../../wolfcrypt/src/sp_int \
  100. ../../wolfcrypt/src/fe_low_mem \
  101. ../../wolfcrypt/src/sp_cortexm \
  102. ../../wolfcrypt/src/fe_operations \
  103. ../../wolfcrypt/src/fips \
  104. ../../wolfcrypt/src/sp_x86_64 \
  105. ../../wolfcrypt/src/fips_test \
  106. ../../wolfcrypt/src/srp \
  107. ../../wolfcrypt/src/ge_low_mem \
  108. ../../wolfcrypt/src/ge_operations \
  109. ../../wolfcrypt/src/wc_encrypt \
  110. ../../wolfcrypt/src/hash \
  111. ../../wolfcrypt/src/wc_pkcs11 \
  112. ../../wolfcrypt/src/wc_port \
  113. ../../wolfcrypt/src/hmac \
  114. ../../wolfcrypt/src/wolfcrypt_first \
  115. ../../wolfcrypt/src/wolfcrypt_last \
  116. ../../wolfcrypt/src/wolfevent \
  117. ../../wolfcrypt/src/logging \
  118. ../../wolfcrypt/src/sp_c32 \
  119. ../../wolfcrypt/src/sp_c64 \
  120. ../../wolfcrypt/src/sp_arm32 \
  121. ../../wolfcrypt/src/sp_arm64 \
  122. ../../wolfcrypt/src/wolfmath
  123. # wolfSSL TLS source files
  124. libwolfssl_C_SRCS += \
  125. ../../src/ocsp \
  126. ../../src/tls \
  127. ../../src/crl \
  128. ../../src/sniffer \
  129. ../../src/wolfio \
  130. ../../src/internal \
  131. ../../src/ssl \
  132. ../../src/keys \
  133. ../../src/tls13
  134. # build benchmark app
  135. BUILD_EXES += benchmark
  136. benchmark_C_SRCS += ../../wolfcrypt/benchmark/benchmark
  137. benchmark_LD_FLAGS += -ldl
  138. benchmark_LD_FLAGS += -lpthread
  139. benchmark_DLLS += libwolfssl
  140. benchmark_LIBS += rpcmem
  141. benchmark_DLLS += $(LIB_DSPRPC)
  142. # build test app
  143. BUILD_EXES += testwolfcrypt
  144. testwolfcrypt_C_SRCS += ../../wolfcrypt/test/test
  145. testwolfcrypt_DLLS += libwolfssl
  146. testwolfcrypt_LD_FLAGS += -ldl
  147. testwolfcrypt_LIBS += rpcmem
  148. testwolfcrypt_DLLS += $(LIB_DSPRPC)
  149. # build ecc verify test app
  150. BUILD_EXES += eccverify
  151. eccverify_C_SRCS += ecc-verify
  152. eccverify_DLLS += libwolfssl
  153. eccverify_LD_FLAGS += -ldl
  154. eccverify_LIBS += rpcmem
  155. eccverify_DLLS += $(LIB_DSPRPC)
  156. # build ecc verify test app
  157. BUILD_EXES += eccbenchmark
  158. eccbenchmark_C_SRCS += ecc-verify-benchmark
  159. eccbenchmark_DLLS += libwolfssl
  160. eccbenchmark_LD_FLAGS += -lpthread
  161. eccbenchmark_LD_FLAGS += -ldl
  162. eccbenchmark_LIBS += rpcmem
  163. eccbenchmark_DLLS += $(LIB_DSPRPC)
  164. BUILD_COPIES = \
  165. $(DLLS) \
  166. $(EXES) \
  167. $(LIBS) \
  168. $(SHIP_DIR)/ ;
  169. include $(RULES_MIN)