diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2017-05-28 20:33:43 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2017-05-28 20:33:43 +0100 |
commit | 9c5553fbd041724c09f5e602be4b37f5bc61b1d7 (patch) | |
tree | 4115d295e4043b5f17f72f16c29e20747e6568f9 /Makefile | |
parent | de1f8661e0900c6794279e758a141e31d8b506ae (diff) | |
download | fmk-9c5553fbd041724c09f5e602be4b37f5bc61b1d7.tar.gz fmk-9c5553fbd041724c09f5e602be4b37f5bc61b1d7.tar.xz fmk-9c5553fbd041724c09f5e602be4b37f5bc61b1d7.zip |
uart: Make the uart module optional
Making the uart module optional makes an -Os compile much smaller.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -17,12 +17,17 @@ CFLAGS = -std=c11 $(WARNINGS) -O2 -flto -MMD -MP -ffreestanding -nostdlib LDFLAGS = -T layout.ld -O2 -flto -ffreestanding -nostdlib ASFLAGS = $(TARGET_ARCH) -OBJ := vectors.o flashconf.o crt0.o setup.o fmk.o lib/le.o pit.o uart.o \ - usb/endpt0.o usb/endpt1.o usb/txhandler.o usb/usb.o +OBJ := vectors.o flashconf.o crt0.o setup.o fmk.o lib/le.o pit.o \ + usb/endpt0.o usb/endpt1.o usb/txhandler.o usb/usb.o weak.o include $(MK20DX256)/mk20dx256.mk CPPFLAGS += $(mk20dx256_CPPFLAGS) +ifeq ("$(WITH_UART)", "yes") + CPPFLAGS += -DWITH_UART + OBJ += uart.o +endif + %.bin: % $(OBJCOPY) -O binary $< $@ |