]> git.donarmstrong.com Git - tmk_firmware.git/blobdiff - rules.mk
Add USB HID(host) protocol.(not finished)
[tmk_firmware.git] / rules.mk
index e561eae631f03bc5da6db252bc8a31dfe5e94937..02f07fd6f7977cb90bc40f557ce58c4e5e912b4f 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -158,6 +158,10 @@ CPPFLAGS += -funsigned-bitfields
 CPPFLAGS += -fpack-struct
 CPPFLAGS += -fshort-enums
 CPPFLAGS += -fno-exceptions
+CPPFLAGS += -ffunction-sections
+CPPFLAGS += -fdata-sections
+# to supress "warning: only initialized variables can be placed into program memory area"
+CPPFLAGS += -w
 CPPFLAGS += -Wall
 CPPFLAGS += -Wundef
 #CPPFLAGS += -mshort-calls
@@ -541,6 +545,7 @@ $(OBJDIR)/%.o : %.c
 # Compile: create object files from C++ source files.
 $(OBJDIR)/%.o : %.cpp
        @echo
+       mkdir -p $(@D)
        @echo $(MSG_COMPILING_CPP) $<
        $(CC) -c $(ALL_CPPFLAGS) $< -o $@