aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple/rules.mk
diff options
context:
space:
mode:
Diffstat (limited to 'libmaple/rules.mk')
-rw-r--r--libmaple/rules.mk54
1 files changed, 23 insertions, 31 deletions
diff --git a/libmaple/rules.mk b/libmaple/rules.mk
index 1ee611d..71979f0 100644
--- a/libmaple/rules.mk
+++ b/libmaple/rules.mk
@@ -3,43 +3,35 @@ sp := $(sp).x
dirstack_$(sp) := $(d)
d := $(dir)
BUILDDIRS += $(BUILD_PATH)/$(d)
-BUILDDIRS += $(BUILD_PATH)/$(d)/usb
-BUILDDIRS += $(BUILD_PATH)/$(d)/usb/usb_lib
-LIBMAPLE_INCLUDES := -I$(LIBMAPLE_PATH) -I$(LIBMAPLE_PATH)/usb -I$(LIBMAPLE_PATH)/usb/usb_lib
+LIBMAPLE_INCLUDES := -I$(LIBMAPLE_PATH)/include -I$(LIBMAPLE_MODULE_SERIES)/include
+LIBMAPLE_PRIVATE_INCLUDES := -I$(LIBMAPLE_PATH)
# Local flags
-CFLAGS_$(d) = -I$(d) $(LIBMAPLE_INCLUDES) -Wall -Werror
+CFLAGS_$(d) = $(LIBMAPLE_PRIVATE_INCLUDES) $(LIBMAPLE_INCLUDES) -Wall -Werror
# Local rules and targets
-cSRCS_$(d) := adc.c \
- bkp.c \
- dac.c \
- dma.c \
- exti.c \
- flash.c \
- fsmc.c \
- gpio.c \
- iwdg.c \
- nvic.c \
- pwr.c \
- i2c.c \
- rcc.c \
- spi.c \
- syscalls.c \
- systick.c \
- timer.c \
- usart.c \
- util.c \
- usb/usb.c \
- usb/usb_reg_map.c \
- usb/usb_cdcacm.c \
- usb/usb_lib/usb_core.c \
- usb/usb_lib/usb_init.c \
- usb/usb_lib/usb_mem.c \
- usb/usb_lib/usb_regs.c
-
+cSRCS_$(d) := adc.c
+cSRCS_$(d) += dac.c
+cSRCS_$(d) += dma.c
+cSRCS_$(d) += exti.c
+cSRCS_$(d) += flash.c
+cSRCS_$(d) += gpio.c
+cSRCS_$(d) += iwdg.c
+cSRCS_$(d) += nvic.c
+cSRCS_$(d) += pwr.c
+cSRCS_$(d) += rcc.c
+cSRCS_$(d) += spi.c
+cSRCS_$(d) += systick.c
+cSRCS_$(d) += timer.c
+cSRCS_$(d) += usart.c
+cSRCS_$(d) += usart_private.c
+cSRCS_$(d) += util.c
sSRCS_$(d) := exc.S
+# I2C support must be ported to F2:
+ifeq ($(MCU_SERIES),stm32f1)
+cSRCS_$(d) += i2c.c
+endif
cFILES_$(d) := $(cSRCS_$(d):%=$(d)/%)
sFILES_$(d) := $(sSRCS_$(d):%=$(d)/%)