From 8bdcef8d78dcff57acb037c2b713790d5effd13d Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Wed, 22 Jul 2009 20:44:31 +0200 Subject: [PATCH] Examples now use the toolchain installed libopenstm32 in default setting. (Uncomment TOOLCHAIN_* lines to use local one) --- examples/fancyblink/Makefile | 11 +++++++++-- examples/miniblink/Makefile | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/examples/fancyblink/Makefile b/examples/fancyblink/Makefile index b2790f63..09ec0ee9 100644 --- a/examples/fancyblink/Makefile +++ b/examples/fancyblink/Makefile @@ -25,9 +25,16 @@ CC = $(PREFIX)-gcc LD = $(PREFIX)-ld OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump -CFLAGS = -O0 -g -Wall -Wextra -I../../include -fno-common \ + +TOOLCHAIN_LIB_DIR = `dirname \`which $(CC)\``/../$(PREFIX)/lib +#TOOLCHAIN_LIB_DIR = ../../lib # uncomment for local directory builds + +TOOLCHAIN_INCLUDE_DIR = +#TOOLCHAIN_INCLUDE_DIR = ../../include # uncomment for local directory builds + +CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_INCLUDE_DIR) -fno-common \ -mcpu=cortex-m3 -mthumb -LDFLAGS = -L../../lib -T$(BINARY).ld -nostartfiles +LDFLAGS = -T$(BINARY).ld -nostartfiles -L$(TOOLCHAIN_LIB_DIR) OBJS = $(BINARY).o OPENOCD = openocd diff --git a/examples/miniblink/Makefile b/examples/miniblink/Makefile index 4ffcff8f..1b5bd890 100644 --- a/examples/miniblink/Makefile +++ b/examples/miniblink/Makefile @@ -25,9 +25,16 @@ CC = $(PREFIX)-gcc LD = $(PREFIX)-ld OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump -CFLAGS = -O0 -g -Wall -Wextra -I../../include -fno-common \ + +TOOLCHAIN_LIB_DIR = `dirname \`which $(CC)\``/../$(PREFIX)/lib +#TOOLCHAIN_LIB_DIR = ../../lib # uncomment for local directory builds + +TOOLCHAIN_INCLUDE_DIR = +#TOOLCHAIN_INCLUDE_DIR = ../../include # uncomment for local directory builds + +CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_INCLUDE_DIR) -fno-common \ -mcpu=cortex-m3 -mthumb -LDFLAGS = -L../../lib -T$(BINARY).ld -nostartfiles +LDFLAGS = -T$(BINARY).ld -nostartfiles -L$(TOOLCHAIN_LIB_DIR) OBJS = $(BINARY).o OPENOCD = openocd