1
0

Makefile 793 B

12345678910111213141516171819202122232425262728293031323334
  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. SRCS = \
  12. ../../../wolfcrypt/src/port/caam/caam_driver.c \
  13. ../../../wolfcrypt/src/port/caam/caam_error.c \
  14. ../../../wolfcrypt/src/port/caam/caam_qnx.c \
  15. OBJS = $(addprefix $(OUTPUT_DIR)/,$(addsuffix .o, $(basename $(SRCS))))
  16. $(OUTPUT_DIR)/%.o: %.c
  17. @mkdir -p $(dir $@)
  18. $(CC) -c -o $@ $(INCLUDES) $(CCFLAGS) $<
  19. $(TARGET):$(OBJS)
  20. $(LD) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBS)
  21. all: $(TARGET)
  22. clean:
  23. rm -rf $(OUTPUT_DIR) $(ARTIFACT)
  24. rebuild: clean all