summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index ea5d872..ef5ba35 100644
--- a/Makefile
+++ b/Makefile
@@ -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 $< $@