bootsector_c/Makefile

15 lines
287 B
Makefile
Raw Permalink Normal View History

2024-10-19 17:09:19 +00:00
SRCS = boot.c
2024-10-20 11:53:40 +00:00
LDFLAGS = -flto -T linker.ld -nostdlib -Os
2024-10-19 17:47:25 +00:00
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
2024-10-20 11:53:40 +00:00
bin: $(SRCS:.c=.o)
2024-10-19 17:47:25 +00:00
$(CC) $(LDFLAGS) -o bin $^
2024-10-19 17:09:19 +00:00
2024-10-20 11:53:40 +00:00
all: bin
2024-10-19 17:09:19 +00:00
clean:
$(RM) $(SRCS:.c=.o) bin