2024-10-19 17:09:19 +00:00
|
|
|
SRCS = boot.c
|
2024-10-19 17:47:25 +00:00
|
|
|
LDFLAGS = -flto -T linker.ld -nostdlib
|
|
|
|
CFLAGS = -flto -ffreestanding -fno-builtin -fno-pie -Wall -std=c2x -m16 -nostdlib -Os -nostartfiles -r
|
2024-10-19 17:09:19 +00:00
|
|
|
|
|
|
|
%.o: %.c
|
2024-10-19 17:47:25 +00:00
|
|
|
$(CC) $^ -o $@ $(CFLAGS)
|
2024-10-19 17:09:19 +00:00
|
|
|
|
|
|
|
all: $(SRCS:.c=.o)
|
2024-10-19 17:47:25 +00:00
|
|
|
$(CC) $(LDFLAGS) -o bin $^
|
2024-10-19 17:09:19 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
$(RM) $(SRCS:.c=.o) bin
|