bootsector_c/Makefile
2024-10-20 16:53:40 +05:00

15 lines
287 B
Makefile

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
%.o: %.c
$(CC) $^ -o $@ $(CFLAGS)
bin: $(SRCS:.c=.o)
$(CC) $(LDFLAGS) -o bin $^
all: bin
clean:
$(RM) $(SRCS:.c=.o) bin