aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-06-05 14:52:17 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-06-13 23:18:58 -0400
commit9971f999b382ef51a3a3d1db4a3385b7cc23a3a0 (patch)
tree4950714f34dfbdfb0a04cd51763e142c104c93e7 /Makefile
parentff789058dfe5d3e5f34482f8410aaf0358e582e9 (diff)
downloadkutter-9971f999b382ef51a3a3d1db4a3385b7cc23a3a0.tar.gz
kutter-9971f999b382ef51a3a3d1db4a3385b7cc23a3a0.tar.xz
kutter-9971f999b382ef51a3a3d1db4a3385b7cc23a3a0.zip
generic: Create generic board infrastructure and move misc.h to it
Instead of creating a misc.h file in each board directory, create a generic board directory and declare misc.h there. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 160251c3..5fbf908f 100644
--- a/Makefile
+++ b/Makefile
@@ -26,13 +26,13 @@ PYTHON=python
# Source files
src-y=sched.c command.c stepper.c basecmd.c gpiocmds.c spicmds.c endstop.c
-DIRS=src src/avr src/simulator lib/pjrc_usb_serial
+DIRS=src src/avr src/simulator src/generic lib/pjrc_usb_serial
# Default compiler flags
cc-option=$(shell if test -z "`$(1) $(2) -S -o /dev/null -xc /dev/null 2>&1`" \
; then echo "$(2)"; else echo "$(3)"; fi ;)
-CFLAGS-y := -I$(OUT) -Isrc -Os -MD -g \
+CFLAGS-y := -I$(OUT) -Isrc -I$(OUT)board-generic/ -Os -MD -g \
-Wall -Wold-style-definition $(call cc-option,$(CC),-Wtype-limits,) \
-ffunction-sections -fdata-sections
CFLAGS-y += -flto -fwhole-program
@@ -72,6 +72,8 @@ $(OUT)board-link: $(KCONFIG_CONFIG)
@echo " Creating symbolic link $(OUT)board"
$(Q)touch $@
$(Q)ln -Tsf $(PWD)/src/$(CONFIG_BOARD_DIRECTORY) $(OUT)board
+ $(Q)mkdir -p $(OUT)board-generic
+ $(Q)ln -Tsf $(PWD)/src/generic $(OUT)board-generic/board
$(OUT)declfunc.lds: src/declfunc.lds.S
@echo " Precompiling $@"