bootsector_c/Makefile

13 lines
273 B
Makefile

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