diff --git a/examples/Makefile b/examples/Makefile index d0f25f3d..4defad25 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,7 +1,7 @@ ## ## This file is part of the libopenstm32 project. ## -## Copyright (C) 2009 Uwe Hermann +## Copyright (C) 2010 Piotr Esden-Tempski ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -25,27 +25,15 @@ ifneq ($(V),1) Q := @ endif -all: miniblink fancyblink usart +all: STM32-H103 -miniblink: - @printf " BUILD miniblink\n" - $(Q)$(MAKE) -C miniblink - -fancyblink: - @printf " BUILD fancyblink\n" - $(Q)$(MAKE) -C fancyblink - -usart: - @printf " BUILD usart\n" - $(Q)$(MAKE) -C usart +STM32-H103: + @printf " BUILD STM32-H103 examples\n" + $(Q)$(MAKE) -C STM32-H103 clean: - @printf " CLEAN miniblink\n" - $(Q)$(MAKE) -C miniblink clean - @printf " CLEAN fancyblink\n" - $(Q)$(MAKE) -C fancyblink clean - @printf " CLEAN usart\n" - $(Q)$(MAKE) -C usart clean + @printf " CLEAN STM32-H103 examples\n" + $(Q)$(MAKE) -C STM32-H103 clean -.PHONY: miniblink fancyblink usart clean +.PHONY: STM32-H103 clean diff --git a/examples/STM32-H103/Makefile b/examples/STM32-H103/Makefile new file mode 100644 index 00000000..d0f25f3d --- /dev/null +++ b/examples/STM32-H103/Makefile @@ -0,0 +1,51 @@ +## +## This file is part of the libopenstm32 project. +## +## Copyright (C) 2009 Uwe Hermann +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . +## + +# Do not print "Entering directory ...". +## MAKEFLAGS += --no-print-directory + +# Be silent per default, but 'make V=1' will show all compiler calls. +ifneq ($(V),1) +Q := @ +endif + +all: miniblink fancyblink usart + +miniblink: + @printf " BUILD miniblink\n" + $(Q)$(MAKE) -C miniblink + +fancyblink: + @printf " BUILD fancyblink\n" + $(Q)$(MAKE) -C fancyblink + +usart: + @printf " BUILD usart\n" + $(Q)$(MAKE) -C usart + +clean: + @printf " CLEAN miniblink\n" + $(Q)$(MAKE) -C miniblink clean + @printf " CLEAN fancyblink\n" + $(Q)$(MAKE) -C fancyblink clean + @printf " CLEAN usart\n" + $(Q)$(MAKE) -C usart clean + +.PHONY: miniblink fancyblink usart clean + diff --git a/examples/fancyblink/Makefile b/examples/STM32-H103/fancyblink/Makefile similarity index 99% rename from examples/fancyblink/Makefile rename to examples/STM32-H103/fancyblink/Makefile index e2bc0db1..0d19fda0 100644 --- a/examples/fancyblink/Makefile +++ b/examples/STM32-H103/fancyblink/Makefile @@ -27,7 +27,7 @@ OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump # Uncomment this line if you want to use the installed (not local) library. # TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX) -TOOLCHAIN_DIR = ../.. +TOOLCHAIN_DIR = ../../.. CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb LDSCRIPT = $(BINARY).ld diff --git a/examples/fancyblink/README b/examples/STM32-H103/fancyblink/README similarity index 100% rename from examples/fancyblink/README rename to examples/STM32-H103/fancyblink/README diff --git a/examples/fancyblink/fancyblink.c b/examples/STM32-H103/fancyblink/fancyblink.c similarity index 100% rename from examples/fancyblink/fancyblink.c rename to examples/STM32-H103/fancyblink/fancyblink.c diff --git a/examples/fancyblink/fancyblink.ld b/examples/STM32-H103/fancyblink/fancyblink.ld similarity index 100% rename from examples/fancyblink/fancyblink.ld rename to examples/STM32-H103/fancyblink/fancyblink.ld diff --git a/examples/miniblink/Makefile b/examples/STM32-H103/miniblink/Makefile similarity index 99% rename from examples/miniblink/Makefile rename to examples/STM32-H103/miniblink/Makefile index 803b0071..db85a8ca 100644 --- a/examples/miniblink/Makefile +++ b/examples/STM32-H103/miniblink/Makefile @@ -27,7 +27,7 @@ OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump # Uncomment this line if you want to use the installed (not local) library. # TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX) -TOOLCHAIN_DIR = ../.. +TOOLCHAIN_DIR = ../../.. CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb LDSCRIPT = $(BINARY).ld diff --git a/examples/miniblink/README b/examples/STM32-H103/miniblink/README similarity index 100% rename from examples/miniblink/README rename to examples/STM32-H103/miniblink/README diff --git a/examples/miniblink/miniblink.c b/examples/STM32-H103/miniblink/miniblink.c similarity index 100% rename from examples/miniblink/miniblink.c rename to examples/STM32-H103/miniblink/miniblink.c diff --git a/examples/miniblink/miniblink.ld b/examples/STM32-H103/miniblink/miniblink.ld similarity index 100% rename from examples/miniblink/miniblink.ld rename to examples/STM32-H103/miniblink/miniblink.ld diff --git a/examples/usart/Makefile b/examples/STM32-H103/usart/Makefile similarity index 99% rename from examples/usart/Makefile rename to examples/STM32-H103/usart/Makefile index 85933996..432446d7 100644 --- a/examples/usart/Makefile +++ b/examples/STM32-H103/usart/Makefile @@ -27,7 +27,7 @@ OBJCOPY = $(PREFIX)-objcopy OBJDUMP = $(PREFIX)-objdump # Uncomment this line if you want to use the installed (not local) library. # TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX) -TOOLCHAIN_DIR = ../.. +TOOLCHAIN_DIR = ../../.. CFLAGS = -O0 -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \ -mcpu=cortex-m3 -mthumb LDSCRIPT = $(BINARY).ld diff --git a/examples/usart/README b/examples/STM32-H103/usart/README similarity index 100% rename from examples/usart/README rename to examples/STM32-H103/usart/README diff --git a/examples/usart/usart.c b/examples/STM32-H103/usart/usart.c similarity index 100% rename from examples/usart/usart.c rename to examples/STM32-H103/usart/usart.c diff --git a/examples/usart/usart.ld b/examples/STM32-H103/usart/usart.ld similarity index 100% rename from examples/usart/usart.ld rename to examples/STM32-H103/usart/usart.ld