cflags += -nostdinc \ -nostdlib \ -ffreestanding \ -fno-builtin \ -std=c11 \ -pedantic \ -pedantic-errors \ -Wall \ -Wextra ifeq ($(buildtype),debug) cflags += -O0 -g endif ifeq ($(buildtype),release) cflags += -ffunction-sections -fdata-sections -Oz endif cflags += -isystem ../include ldflags += --nostdlib \ --static ifeq ($(buildtype),release) ldflags += --gc-sections \ --strip-all \ -O3 endif