From 660771a06be684f1d5162552476dd5c0e00664ae Mon Sep 17 00:00:00 2001 From: giomba Date: Sun, 30 Dec 2018 23:51:20 +0100 Subject: [PATCH] Makefile strip + toolchain Kernel binary optionally stripped for final distribution (and upload via slow serial cable) Custom cross-toolchain variables --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 33d23c7..981448f 100644 --- a/Makefile +++ b/Makefile @@ -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