Makefile 2.4 KB

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