Use make flags to help control where the library is installed
Where the library is installed has quite an affect on what -L and -I flags are used. If you install into the toolchain, you don't want to use them at all, but if you install out of tree (/opt/mycm3 for example) you need to specify the -L and -I flags. Update the documentation and the example makefiles to support this
This commit is contained in:
6
Makefile
6
Makefile
@@ -19,7 +19,13 @@
|
||||
|
||||
PREFIX ?= arm-none-eabi
|
||||
#PREFIX ?= arm-elf
|
||||
|
||||
ifeq ($(DETECT_TOOLCHAIN),)
|
||||
DESTDIR ?= /usr/local
|
||||
else
|
||||
DESTDIR ?= $(shell dirname $(shell readlink -f $(shell which $(PREFIX)-gcc)))/..
|
||||
endif
|
||||
|
||||
INCDIR = $(DESTDIR)/$(PREFIX)/include
|
||||
LIBDIR = $(DESTDIR)/$(PREFIX)/lib
|
||||
SHAREDIR = $(DESTDIR)/$(PREFIX)/share/libopencm3/scripts
|
||||
|
||||
Reference in New Issue
Block a user