Makefile 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. WOLF_ROOT = ../..
  2. MQX_ROOT = $(WOLF_ROOT)/../../../Freescale/Freescale_MQX_4_1/
  3. CC = arm-none-eabi-gcc
  4. AR = arm-none-eabi-ar
  5. WOLFLIB = ./libwolfssl.a
  6. MQXLIB =
  7. OPTIMIZE = -O2
  8. WORNING = \
  9. -Wno-int-to-pointer-cast\
  10. -Wno-incompatible-pointer-types\
  11. -Wno-discarded-qualifiers\
  12. -Wno-int-conversion\
  13. -Wno-implicit-function-declaration\
  14. -Wno-pointer-to-int-cast
  15. USER_SETTINGS_H = -I./ -DWOLFSSL_USER_SETTINGS
  16. CFLAGS = $(OPTIMIZE) -I$(WOLF_ROOT)/. $(USER_SETTINGS_H) $(MQX_INCLUDE) $(WORNING)
  17. MQX_INCLUDE = -I$(MQX_ROOT)/mqx/source/include\
  18. -I$(MQX_ROOT)/mqx/source/psp/cortex_m\
  19. -I$(MQX_ROOT)/mqx/source/psp/cortex_a/compiler/gcc_arm\
  20. -I$(MQX_ROOT)/mqx/source/psp/cortex_m/cpu\
  21. -I$(MQX_ROOT)/mfs/source/include\
  22. -I$(MQX_ROOT)/mqx/source/bsp/twrk70f120m\
  23. -I$(MQX_ROOT)/mqx/source/io/cm\
  24. -I$(MQX_ROOT)/mqx/source/io/lpm\
  25. -I$(MQX_ROOT)/mqx/source/io/serial\
  26. -I$(MQX_ROOT)/mqx/source/io/dma\
  27. -I$(MQX_ROOT)/mqx/source/io/spi\
  28. -I$(MQX_ROOT)/mqx/source/io/i2c\
  29. -I$(MQX_ROOT)/mqx/source/io/io_mem\
  30. -I$(MQX_ROOT)/mqx/source/io/io_null\
  31. -I$(MQX_ROOT)/mqx/source/io/enet\
  32. -I$(MQX_ROOT)/mqx/source/io/enet/macnet\
  33. -I$(MQX_ROOT)/mqx/source/io/lwgpio\
  34. -I$(MQX_ROOT)/mqx/source/io/gpio\
  35. -I$(MQX_ROOT)/mqx/source/io/gpio/kgpio\
  36. -I$(MQX_ROOT)/mqx/source/io/esdhc\
  37. -I$(MQX_ROOT)/mqx/source/io/sdcard\
  38. -I$(MQX_ROOT)/mqx/source/io/sdcard/sdcard_spi\
  39. -I$(MQX_ROOT)/mqx/source/io/sdcard/sdcard_esdhc\
  40. -I$(MQX_ROOT)/mqx/source/io/pccard\
  41. -I$(MQX_ROOT)/mqx/source/io/pcflash\
  42. -I$(MQX_ROOT)/mqx/source/io/adc/kadc\
  43. -I$(MQX_ROOT)/mqx/source/io/adc\
  44. -I$(MQX_ROOT)/mqx/source/io/lwadc\
  45. -I$(MQX_ROOT)/mqx/source/io/flashx\
  46. -I$(MQX_ROOT)/mqx/source/io/flashx/freescale\
  47. -I$(MQX_ROOT)/mqx/source/io/hwtimer\
  48. -I$(MQX_ROOT)/mqx/source/io/rtc\
  49. -I$(MQX_ROOT)/mqx/source/io/debug\
  50. -I$(MQX_ROOT)/mqx/source/io/tchres\
  51. -I$(MQX_ROOT)/mqx/source/io/nandflash\
  52. -I$(MQX_ROOT)/mqx/source/io/timer\
  53. -I$(MQX_ROOT)/mqx/source/io/usb\
  54. -I$(MQX_ROOT)/mqx/source/io/hmi\
  55. -I$(MQX_ROOT)/mqx/source/io/sai\
  56. -I$(MQX_ROOT)/mqx/source/io/rtcs\
  57. -I$(MQX_ROOT)/rtcs/source/include
  58. OBJ =\
  59. $(WOLF_ROOT)/src/crl.o\
  60. $(WOLF_ROOT)/src/internal.o\
  61. $(WOLF_ROOT)/src/keys.o\
  62. $(WOLF_ROOT)/src/ocsp.o\
  63. $(WOLF_ROOT)/src/sniffer.o\
  64. $(WOLF_ROOT)/src/ssl.o\
  65. $(WOLF_ROOT)/src/tls13.o\
  66. $(WOLF_ROOT)/src/tls.o\
  67. $(WOLF_ROOT)/src/wolfio.o\
  68. $(WOLF_ROOT)/wolfcrypt/src/aes.o\
  69. $(WOLF_ROOT)/wolfcrypt/src/arc4.o\
  70. $(WOLF_ROOT)/wolfcrypt/src/asm.o\
  71. $(WOLF_ROOT)/wolfcrypt/src/asn.o\
  72. $(WOLF_ROOT)/wolfcrypt/src/blake2b.o\
  73. $(WOLF_ROOT)/wolfcrypt/src/blake2s.o\
  74. $(WOLF_ROOT)/wolfcrypt/src/camellia.o\
  75. $(WOLF_ROOT)/wolfcrypt/src/chacha20_poly1305.o\
  76. $(WOLF_ROOT)/wolfcrypt/src/chacha.o\
  77. $(WOLF_ROOT)/wolfcrypt/src/cmac.o\
  78. $(WOLF_ROOT)/wolfcrypt/src/coding.o\
  79. $(WOLF_ROOT)/wolfcrypt/src/compress.o\
  80. $(WOLF_ROOT)/wolfcrypt/src/cpuid.o\
  81. $(WOLF_ROOT)/wolfcrypt/src/cryptocb.o\
  82. $(WOLF_ROOT)/wolfcrypt/src/curve25519.o\
  83. $(WOLF_ROOT)/wolfcrypt/src/des3.o\
  84. $(WOLF_ROOT)/wolfcrypt/src/dh.o\
  85. $(WOLF_ROOT)/wolfcrypt/src/dsa.o\
  86. $(WOLF_ROOT)/wolfcrypt/src/ecc.o\
  87. $(WOLF_ROOT)/wolfcrypt/src/ecc_fp.o\
  88. $(WOLF_ROOT)/wolfcrypt/src/ed25519.o\
  89. $(WOLF_ROOT)/wolfcrypt/src/error.o\
  90. $(WOLF_ROOT)/wolfcrypt/src/fe_low_mem.o\
  91. $(WOLF_ROOT)/wolfcrypt/src/fe_operations.o\
  92. $(WOLF_ROOT)/wolfcrypt/src/ge_low_mem.o\
  93. $(WOLF_ROOT)/wolfcrypt/src/ge_operations.o\
  94. $(WOLF_ROOT)/wolfcrypt/src/hash.o\
  95. $(WOLF_ROOT)/wolfcrypt/src/hmac.o\
  96. $(WOLF_ROOT)/wolfcrypt/src/integer.o\
  97. $(WOLF_ROOT)/wolfcrypt/src/logging.o\
  98. $(WOLF_ROOT)/wolfcrypt/src/md2.o\
  99. $(WOLF_ROOT)/wolfcrypt/src/md4.o\
  100. $(WOLF_ROOT)/wolfcrypt/src/md5.o\
  101. $(WOLF_ROOT)/wolfcrypt/src/memory.o\
  102. $(WOLF_ROOT)/wolfcrypt/src/pkcs12.o\
  103. $(WOLF_ROOT)/wolfcrypt/src/pkcs7.o\
  104. $(WOLF_ROOT)/wolfcrypt/src/poly1305.o\
  105. $(WOLF_ROOT)/wolfcrypt/src/pwdbased.o\
  106. $(WOLF_ROOT)/wolfcrypt/src/random.o\
  107. $(WOLF_ROOT)/wolfcrypt/src/ripemd.o\
  108. $(WOLF_ROOT)/wolfcrypt/src/rsa.o\
  109. $(WOLF_ROOT)/wolfcrypt/src/sha256.o\
  110. $(WOLF_ROOT)/wolfcrypt/src/sha3.o\
  111. $(WOLF_ROOT)/wolfcrypt/src/sha512.o\
  112. $(WOLF_ROOT)/wolfcrypt/src/sha.o\
  113. $(WOLF_ROOT)/wolfcrypt/src/signature.o\
  114. $(WOLF_ROOT)/wolfcrypt/src/sp_arm32.o\
  115. $(WOLF_ROOT)/wolfcrypt/src/sp_arm64.o\
  116. $(WOLF_ROOT)/wolfcrypt/src/sp_armthumb.o\
  117. $(WOLF_ROOT)/wolfcrypt/src/sp_c32.o\
  118. $(WOLF_ROOT)/wolfcrypt/src/sp_c64.o\
  119. $(WOLF_ROOT)/wolfcrypt/src/sp_cortexm.o\
  120. $(WOLF_ROOT)/wolfcrypt/src/sp_int.o\
  121. $(WOLF_ROOT)/wolfcrypt/src/sp_x86_64.o\
  122. $(WOLF_ROOT)/wolfcrypt/src/srp.o\
  123. $(WOLF_ROOT)/wolfcrypt/src/tfm.o\
  124. $(WOLF_ROOT)/wolfcrypt/src/wc_encrypt.o\
  125. $(WOLF_ROOT)/wolfcrypt/src/wc_pkcs11.o\
  126. $(WOLF_ROOT)/wolfcrypt/src/wc_port.o\
  127. $(WOLF_ROOT)/wolfcrypt/src/wolfevent.o\
  128. $(WOLF_ROOT)/wolfcrypt/src/wolfmath.o
  129. all : wolfssllib client server test benchmark
  130. wolfssllib : $(OBJ)
  131. $(AR) r $(WOLFLIB) $(OBJ)
  132. test : wolfssllib ./user_settings.h
  133. $(CC) -o test $(CFLAGS) $(WOLF_ROOT)/wolfcrypt/test/test.c $(WOLFLIB) $(MQXLIB)
  134. benchmark : wolfssllib ./user_settings.h
  135. $(CC) -o benchmark $(CFLAGS) $(WOLF_ROOT)/wolfcrypt/benchmark/benchmark.c $(WOLFLIB) $(WOLFLIB) $(MQXLIB)
  136. server : wolfssllib ./user_settings.h
  137. $(CC) -o server $(CFLAGS) $(WOLF_ROOT)/IDE/MQX/server-tls.c $(WOLFLIB) $(MQXLIB)
  138. client : wolfssllib ./user_settings.h
  139. $(CC) -o client $(CFLAGS) $(WOLF_ROOT)/IDE/MQX/client-tls.c $(WOLFLIB) $(MQXLIB)
  140. clean :
  141. rm $(OBJ) $(WOLFLIB)