Makefile 903 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ARTIFACT = wolfCrypt
  2. #Build architecture/variant string, possible values: x86, armv7le, etc...
  3. PLATFORM = armv7le
  4. OUTPUT_DIR = build
  5. TARGET = $(ARTIFACT)
  6. CC ?= qcc -Vgcc_nto$(PLATFORM)
  7. CXX = qcc -lang-c++ -Vgcc_nto$(PLATFORM)
  8. LD = $(CC)
  9. INCLUDES += -I../../../ -I../../../wolfssl/wolfcrypt/port/caam/
  10. CCFLAGS += -O2 -Wall
  11. # For debugging print outs build with WOLFSSL_CAAM_PRINT defined
  12. #CCFLAGS += -DWOLFSSL_CAAM_PRINT -O2 -Wall
  13. SRCS = \
  14. ../../../wolfcrypt/src/port/caam/caam_driver.c \
  15. ../../../wolfcrypt/src/port/caam/caam_error.c \
  16. ../../../wolfcrypt/src/port/caam/caam_qnx.c \
  17. OBJS = $(addprefix $(OUTPUT_DIR)/,$(addsuffix .o, $(basename $(SRCS))))
  18. $(OUTPUT_DIR)/%.o: %.c
  19. @mkdir -p $(dir $@)
  20. $(CC) -c -o $@ $(INCLUDES) $(CCFLAGS) $<
  21. $(TARGET):$(OBJS)
  22. $(LD) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS)
  23. all: $(TARGET)
  24. clean:
  25. rm -rf $(OUTPUT_DIR) $(ARTIFACT)
  26. rebuild: clean all