From 14f87034c7e606c07ce25fcfb633d03b50d334a0 Mon Sep 17 00:00:00 2001 From: timecop Date: Sat, 31 Mar 2012 06:07:50 +0000 Subject: [PATCH] Makefile fix by g1pete. now not trying to build stmloader by arm-eabi-gcc. git-svn-id: https://afrodevices.googlecode.com/svn/trunk/baseflight@139 7c89a4a9-59b9-e629-4cfe-3a2d53b20e61 --- Makefile | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 46f3ca1b5e..17de59c605 100644 --- a/Makefile +++ b/Makefile @@ -35,24 +35,20 @@ ASSEMBLER_FLAGS=-c $(OPT) -mcpu=cortex-m3 -mthumb -x assembler-with-cpp -Isrc -I COMPILER_FLAGS=-c -mcpu=cortex-m3 $(OPT) -Wall -ffunction-sections -fdata-sections -mthumb -DSTM32F10X_MD -DUSE_STDPERIPH_DRIVER -Isrc -Ilib/STM32F10x_StdPeriph_Driver/inc -Ilib/CMSIS/CM3/CoreSupport -Ilib/CMSIS/CM3/DeviceSupport/ST/STM32F10x # Define sources and objects -SRC := $(wildcard */*/*/*/*/*/*/*.c) \ - $(wildcard */*/*/*/*/*/*.c) \ - $(wildcard */*/*/*/*/*.c) \ - $(wildcard */*/*/*/*.c) \ - $(wildcard */*/*/*.c) \ - $(wildcard */*/*.c) \ - $(wildcard */*.c) -SRCSASM := $(wildcard */*/startup_stm32f10x_md_gcc.s) \ -#SRCSASM := $(wildcard */*/*/*/*/*/*/*/*.s) \ -# $(wildcard */*/*/*/*/*/*/*.s) \ -# $(wildcard */*/*/*/*/*/*.s) \ -# $(wildcard */*/*/*/*/*.s) \ -# $(wildcard */*/*/*/*.s) \ -# $(wildcard */*/*/*.s) \ -# $(wildcard */*/*.s) \ -# $(wildcard */*.s) +# +#condition more to eliminate support folder files to be included +#fixes build error reported by nicodh in post#1697 +SRC := $(wildcard lib/*/*/*/*/*/*.c) \ + $(wildcard lib/*/*/*/*/*.c) \ + $(wildcard lib/*/*/*/*.c) \ + $(wildcard lib/*/*/*.c) \ + $(wildcard lib/*/*.c) \ + $(wildcard src/*.c) + +SRCSASM := $(wildcard src/*/startup_stm32f10x_md_gcc.S) + OBJS := $(SRC:%.c=$(OBJECT_DIR)/%.o) $(SRCSASM:%.s=$(OBJECT_DIR)/%.o) -OBJS := $(OBJS:%.S=$(OBJECT_DIR)/%.o) +OBJS := $(OBJS:%.S=$(OBJECT_DIR)/%.o) all: buildelf $(OBJCOPY) -O ihex "$(BIN_DIR)/baseflight.elf" "$(BIN_DIR)/baseflight.hex"