Make it possible to build with libopencm3 installed in a nonstandard location

This commit is contained in:
Mike Smith 2011-12-05 23:01:24 -08:00
parent 61cfbf16c6
commit c9860e7716
1 changed files with 3 additions and 2 deletions

View File

@ -1,11 +1,12 @@
CROSS_COMPILE ?= arm-none-eabi-
CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy
LIBOPENCM3 ?= /usr/local/arm-none-eabi
CFLAGS += -Istm32/include -mcpu=cortex-m3 -mthumb -msoft-float -DSTM32F1
CFLAGS += -Istm32/include -mcpu=cortex-m3 -mthumb -msoft-float -DSTM32F1 -I$(LIBOPENCM3)/include
LDFLAGS_BOOT = -lopencm3_stm32f1 -Wl,--defsym,_stack=0x20005000 \
-Wl,-T,stm32/blackmagic.ld -nostartfiles -lc -lnosys -Wl,-Map=mapfile \
-mthumb -march=armv7 -mfix-cortex-m3-ldrd -msoft-float
-mthumb -march=armv7 -mcpu=cortex-m3 -mfix-cortex-m3-ldrd -msoft-float -L$(LIBOPENCM3)/lib/stm32/f1
LDFLAGS = $(LDFLAGS_BOOT) -Wl,-Ttext=0x8002000
SRC += cdcacm.c \