Makefile.inc 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. LUATOS_DIR := $(LUATOS_SRC)
  2. CFLAGS_INC += -I $(LUATOS_DIR)/bsp/air302/include \
  3. -I $(LUATOS_DIR)/lua/include \
  4. -I $(LUATOS_DIR)/luat/include \
  5. -I $(LUATOS_DIR)/components/u8g2 \
  6. -I $(LUATOS_DIR)/components/minmea \
  7. -I $(LUATOS_DIR)/components/eink \
  8. -I $(LUATOS_DIR)/components/fonts \
  9. -I $(LUATOS_DIR)/components/epaper \
  10. -I $(LUATOS_DIR)/components/qrcode \
  11. -I $(LUATOS_DIR)/components/tjpgd \
  12. -I $(LUATOS_DIR)/components/fatfs \
  13. -I $(LUATOS_DIR)/components/lfs \
  14. -I $(LUATOS_DIR)/components/lcd \
  15. -I $(LUATOS_DIR)/components/fal/inc \
  16. -I $(LUATOS_DIR)/components/flashdb/inc \
  17. -I $(LUATOS_DIR)/components/sfd \
  18. -I $(LUATOS_DIR)/components/shell \
  19. -I $(LUATOS_DIR)/components/cmux \
  20. -I $(LUATOS_DIR)/components/ymodem \
  21. LUATOS_SRC_DIRS += $(LUATOS_DIR)/lua/src \
  22. $(LUATOS_DIR)/luat/modules \
  23. $(LUATOS_DIR)/luat/vfs \
  24. $(LUATOS_DIR)/luat/weak \
  25. $(LUATOS_DIR)/components/lua-cjson \
  26. $(LUATOS_DIR)/components/u8g2 \
  27. $(LUATOS_DIR)/components/minmea \
  28. $(LUATOS_DIR)/components/eink \
  29. $(LUATOS_DIR)/components/epaper \
  30. $(LUATOS_DIR)/components/fonts \
  31. $(LUATOS_DIR)/components/qrcode \
  32. $(LUATOS_DIR)/components/tjpgd \
  33. $(LUATOS_DIR)/components/fatfs \
  34. $(LUATOS_DIR)/components/lfs \
  35. $(LUATOS_DIR)/components/lcd \
  36. $(LUATOS_DIR)/components/fal/src \
  37. $(LUATOS_DIR)/components/flashdb/src \
  38. $(LUATOS_DIR)/components/sfd \
  39. $(LUATOS_DIR)/components/shell \
  40. $(LUATOS_DIR)/components/cmux \
  41. $(LUATOS_DIR)/components/ymodem \
  42. $(LUATOS_DIR)/bsp/air302/src
  43. LUATOS_CSRC = $(foreach dir, $(LUATOS_SRC_DIRS), $(wildcard $(dir)/*.c))
  44. LUATOS_CFILES = $(LUATOS_CSRC)
  45. LUATOS_COBJSTEMP := $(patsubst %.c, %.o, $(LUATOS_CFILES))
  46. LUATOS_COBJSTEMP :=$(subst $(LUATOS_DIR),LuatOS,$(LUATOS_COBJSTEMP))
  47. LUATOS_COBJS := $(addprefix $(BUILDDIR)/, $(LUATOS_COBJSTEMP))
  48. -include $(LUATOS_COBJS:.o=.d)
  49. CFLAGS += --c99 -DWITH_POSIX -DAIR302
  50. ifeq ($(USE_CHINESE_WQY12_FONT), y)
  51. CFLAGS += -DUSE_CHINESE_WQY12_FONT
  52. endif
  53. ifeq ($(TOOLCHAIN),GCC)
  54. CFLAGS_INC += -I $(TOP)/PLAT/os/freertos/portable/gcc
  55. CFLAGS_INC += -I $(GCCLIB_PATH)/arm-none-eabi/include
  56. lib-y += libluatos.a
  57. $(BUILDDIR)/lib/libluatos.a: $(LUATOS_COBJS)
  58. @mkdir -p $(dir $@)
  59. $(ECHO) AR $@
  60. $(Q)$(AR) -cr $@ $^
  61. endif
  62. ifeq ($(TOOLCHAIN),ARMCC)
  63. CFLAGS_INC += -I $(TOP)/PLAT/os/freertos/portable/keil
  64. lib-y += libluatos.lib
  65. $(BUILDDIR)/lib/libluatos.lib: $(LUATOS_COBJS)
  66. @mkdir -p $(dir $@)
  67. $(ECHO) AR $@
  68. $(Q)$(AR) $(ARFLAGS) $@ $^
  69. endif