Makefile strip + toolchain

Kernel binary optionally stripped for final distribution (and upload via
slow serial cable)
Custom cross-toolchain variables
This commit is contained in:
giomba 2018-12-30 23:51:20 +01:00
parent c4bfb74eef
commit 660771a06b
1 changed files with 8 additions and 1 deletions

View File

@ -1,6 +1,10 @@
.POSIX:
CCX=arm-none-eabi-g++
TOOLCHAIN=arm-none-eabi-
CCX=$(TOOLCHAIN)g++
CCFLAGS=-c -Wall -fno-stack-protector -ffreestanding -fno-exceptions -march=armv7-a -mno-unaligned-access -nostdlib -Iinclude -g
STRIP=$(TOOLCHAIN)strip
C_HDR=$(wildcard include/*.h)
C_SRC=$(wildcard src/*.cpp)
@ -13,6 +17,9 @@ A_OBJ=$(patsubst src/%.s, obj/s_%.o, $(A_SRC))
all: environ bin/kernel.elf
strip: bin/kernel.elf
$(STRIP) -s bin/kernel.elf
environ:
mkdir -p bin
mkdir -p obj