mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-02-05 10:41:00 +08:00
* Fix gcc prefix and update libopencm3. See:7be50a5e75034dbf20ff* update luftboot * Update linker scripts. * Update deprecated function. * Update rcc_clock_scale structure. * Add compatibility defines.
57 lines
1.5 KiB
Makefile
57 lines
1.5 KiB
Makefile
# Hey Emacs, this is a -*- makefile -*-
|
|
|
|
#
|
|
# Copyright (C) 2012-2015 The Paparazzi Team
|
|
#
|
|
# Minimal makefile for arm-linux cross compiling toolchain.
|
|
# Assuming installed in default location.
|
|
#
|
|
# If HARD_FLOAT is defined try to find armhf cross compiler, otherwise default to softfloat
|
|
|
|
ifdef HARD_FLOAT
|
|
PREFIX ?= arm-linux-gnueabihf-
|
|
else
|
|
PREFIX ?= arm-linux-gnueabi-
|
|
endif
|
|
|
|
#
|
|
# if gcc can't be found in path, try the codesourcery toolchain in /usr/local/codesourcery
|
|
#
|
|
ifeq ($(shell which $(PREFIX)gcc),)
|
|
ifndef HARD_FLOAT
|
|
TOOLCHAIN=$(shell find -L /usr/local/codesourcery -maxdepth 2 -type d -name arm-none-linux-gnueabi 2>/dev/null | head -n 1)
|
|
ifneq ($(TOOLCHAIN),)
|
|
PREFIX=$(shell dirname $(TOOLCHAIN))/bin/arm-none-linux-gnueabi
|
|
endif
|
|
endif
|
|
endif
|
|
|
|
# if toolchain could not be found, print some useful info
|
|
ifeq ($(shell which $(PREFIX)gcc),)
|
|
# no suitable toolchain found...
|
|
ifdef HARD_FLOAT
|
|
$(error Error: arm-linux-gnueabihf-gcc cross-compiler not found! Please install the gcc-arm-linux-gnueabihf package.)
|
|
else
|
|
$(error Error: arm-linux-gnueabi-gcc cross-compiler not found! Please install the gcc-arm-linux-gnueabi package.)
|
|
endif
|
|
endif
|
|
|
|
CC = $(PREFIX)gcc
|
|
CXX = $(PREFIX)g++
|
|
LD = $(PREFIX)g++
|
|
AR = $(PREFIX)ar
|
|
CP = $(PREFIX)objcopy
|
|
DMP = $(PREFIX)objdump
|
|
NM = $(PREFIX)nm
|
|
SIZE = $(PREFIX)size
|
|
STRIP = $(PREFIX)strip
|
|
|
|
GDB = $(shell which $(PREFIX)gdb)
|
|
ifeq ($(GDB),)
|
|
GDB = $(shell which gdb-multiarch)
|
|
endif
|
|
|
|
|
|
# some general commands
|
|
RM = rm
|