summaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorAndrew Scheller <github@loowis.durge.org>2014-04-16 22:10:33 +0100
committerAndrew Scheller <github@loowis.durge.org>2014-04-16 22:16:28 +0100
commit70a7d7a94397cbe01fd5457e34f3d3368300f2ac (patch)
tree50ffda62cc15f607d543e76aaf0c23a614dd5618 /stm
parenta1c67206c88fe0c0712c99d6181cff9b99b07b33 (diff)
build directory can now be renamed
The autogenerated header files have been moved about, and an extra include dir has been added, which means you can give a custom BUILD=newbuilddir option to make, and everything "just works" Also tidied up the way the different Makefiles build their include- directory flags
Diffstat (limited to 'stm')
-rw-r--r--stm/Makefile17
1 files changed, 12 insertions, 5 deletions
diff --git a/stm/Makefile b/stm/Makefile
index 25c79a27b..384ecd630 100644
--- a/stm/Makefile
+++ b/stm/Makefile
@@ -17,12 +17,19 @@ DFU=../tools/dfu.py
CROSS_COMPILE = arm-none-eabi-
+INC = -I.
+INC += -I$(PY_SRC)
+INC += -I$(BUILD)/includes
+INC += -I$(CMSIS_DIR)
+INC += -I$(STMPERIPH_DIR)
+INC += -I$(STMUSB_DIR)
+INC += -I$(STMUSBD_DIR)
+INC += -I$(STMUSBH_DIR)
+INC += -I$(FATFS_DIR)
+#INC += -I$(CC3K_DIR)
+
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
-CFLAGS = -I. -I$(PY_SRC) -I$(CMSIS_DIR) -I$(STMPERIPH_DIR) -I$(STMUSB_DIR) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT)
-CFLAGS += -I$(STMUSBD_DIR)
-CFLAGS += -I$(STMUSBH_DIR)
-CFLAGS += -I$(FATFS_DIR)
-#CFLAGS += -I$(CC3K_DIR)
+CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT)
BOARD ?= PYBOARD4
ifeq ($(wildcard boards/$(BOARD)/.),)