Makefile 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. NAME = wolfssl
  2. DEVICE = -m5206e -gdwarf-2 -DMOD5441X -DMCF5441X
  3. OLEVEL = -O2
  4. NBHEADERS = -I"$(NBROOT)/include" -I"$(NBROOT)/MOD5441X/include"
  5. # location to put wolfssl.a created
  6. OUTPUT = $(NBROOT)/lib
  7. CSRCS := ../../wolfcrypt/src/rsa.c \
  8. ../../wolfcrypt/src/asn.c \
  9. ../../wolfcrypt/src/aes.c \
  10. ../../wolfcrypt/src/sha.c \
  11. ../../wolfcrypt/src/sha256.c \
  12. ../../wolfcrypt/src/sha512.c \
  13. ../../wolfcrypt/src/integer.c \
  14. ../../wolfcrypt/src/tfm.c \
  15. ../../wolfcrypt/src/random.c \
  16. ../../wolfcrypt/src/logging.c \
  17. ../../wolfcrypt/src/memory.c \
  18. ../../wolfcrypt/src/coding.c \
  19. ../../wolfcrypt/src/hash.c \
  20. ../../wolfcrypt/src/hmac.c \
  21. ../../wolfcrypt/src/md5.c \
  22. ../../wolfcrypt/src/wc_port.c \
  23. ../../wolfcrypt/src/wc_encrypt.c \
  24. ../../wolfcrypt/src/wolfmath.c \
  25. ../../wolfcrypt/src/sp_c32.c \
  26. ../../wolfcrypt/src/sp_int.c \
  27. ../../wolfcrypt/src/signature.c \
  28. ../../wolfcrypt/src/error.c \
  29. ../../src/wolfio.c \
  30. ../../src/ssl.c
  31. INC = -I"./" -I"../../"
  32. EXTRACFLAGS = -DWOLFSSL_USER_SETTINGS $(INC) $(DEVICE) $(OLEVEL)
  33. EXTRACFLAGS += -DNBMINGW -Wall -fno-rtti -fno-exceptions -falign-functions=4
  34. EXTRACFLAGS += $(NBHEADERS)
  35. EXTRACXXFLAGS = $(EXTRACFLAGS)
  36. #LDEXTRA =
  37. LIBOBJS = ./rsa.o \
  38. ./asn.o \
  39. ./aes.o \
  40. ./sha.o \
  41. ./sha256.o \
  42. ./sha512.o \
  43. ./integer.o \
  44. ./tfm.o \
  45. ./random.o \
  46. ./logging.o \
  47. ./memory.o \
  48. ./coding.o \
  49. ./hash.o \
  50. ./hmac.o \
  51. ./md5.o \
  52. ./wc_port.o \
  53. ./wc_encrypt.o \
  54. ./wolfmath.o \
  55. ./sp_c32.o \
  56. ./sp_int.o \
  57. ./signature.o \
  58. ./wolfio.o \
  59. ./ssl.o \
  60. ./error.o
  61. #include $(NBROOT)/make/libmain.mak
  62. all: compile link rmo
  63. # compiling using g++ compiler to avoid mangled name complications if linking
  64. # against other NetBurner libraries
  65. compile:
  66. m68k-elf-g++ $(EXTRACFLAGS) -c $(CSRCS)
  67. link:
  68. m68k-elf-ar -cr $(OUTPUT)/$(NAME).a $(LIBOBJS)
  69. rmo:
  70. rm -f *.o
  71. clean: rmo
  72. rm -f $(OUTPUT)/$(NAME).a
  73. help:
  74. @echo "all : exectue compile, link, rmo"
  75. @echo "compile : create .o files"
  76. @echo "link : create .a library from .o files"
  77. @echo "rmo : remove all .o files"
  78. @echo "clean : remove all .o files and .a library"