.SUFFIXES: .c .o SRCS = boot.c LDFLAGS = -flto -T linker.ld -nostdlib -Os CFLAGS = -flto -ffreestanding -fno-builtin -fno-pie -Wall -std=c2x -m16 -nostdlib -Os -nostartfiles -r .c.o: $(CC) $< -o $@ $(CFLAGS) bin: $(SRCS:.c=.o) $(CC) $(LDFLAGS) -o bin $(SRCS:.c=.o) all: bin clean: rm -f $(SRCS:.c=.o) bin