Files
mop3/kernel/generic/flags.mk
kamkow1 e077d322f4
All checks were successful
Build documentation / build-and-deploy (push) Successful in 35s
Rewrite init app in C, introduce MSL (MOP3 System Library)
2026-01-04 01:11:31 +01:00

39 lines
665 B
Makefile

cflags += -nostdinc \
-nostdlib \
-ffreestanding \
-fno-builtin \
-std=c11 \
-pedantic \
-Wall \
-Wextra \
-mcmodel=kernel
cflags += -isystem . -isystem ../include
cflags += -DPRINTF_INCLUDE_CONFIG_H=1 \
-D_ALLOC_SKIP_DEFINE
ifeq ($(buildtype),debug)
cflags += -O0 -g
endif
ifeq ($(buildtype),release)
cflags += -ffunction-sections -fdata-sections -Oz
endif
ldflags += -ffreestanding \
-nostdlib \
-fno-builtin \
-fuse-ld=lld \
-static
ifeq ($(buildtype),debug)
ldflags += -g
endif
ifeq ($(buildtype),release)
ldflags += -Wl,--gc-sections \
-Wl,--strip-all \
-flto
endif