fix clean target for example makefiles if the compiler is not in PATH
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
0c779512d6
commit
b7ebe6e705
@@ -24,14 +24,18 @@ CC = $(PREFIX)-gcc
|
||||
LD = $(PREFIX)-gcc
|
||||
OBJCOPY = $(PREFIX)-objcopy
|
||||
OBJDUMP = $(PREFIX)-objdump
|
||||
|
||||
TOOLCHAIN_DIR ?= ../../../..
|
||||
ifeq ($(wildcard ../../../../lib/libopencm3_lm3s.a),)
|
||||
ifneq ($(strip $(shell which $(CC))),)
|
||||
TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
|
||||
endif
|
||||
else
|
||||
ifeq ($(V),1)
|
||||
$(info We seem to be building the example in the source directory. Using local library!)
|
||||
endif
|
||||
TOOLCHAIN_DIR := ../../../..
|
||||
endif
|
||||
|
||||
CFLAGS += -O0 -g3 -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
|
||||
-mcpu=cortex-m3 -mthumb -MD
|
||||
LDSCRIPT ?= $(BINARY).ld
|
||||
|
||||
Reference in New Issue
Block a user