bootsector_c/Makefile

13 lines
289 B
Makefile
Raw Normal View History

2024-10-19 17:09:19 +00:00
SRCS = boot.c
LDFLAGS = -melf_i386 -nostdlib --oformat binary -T linker.ld
2024-10-19 17:24:11 +00:00
CFLAGS = -ffreestanding -fno-builtin -fno-pie -Wall -std=c2x -m16 -nostdlib -Os -nostartfiles
2024-10-19 17:09:19 +00:00
%.o: %.c
$(CC) $(CFLAGS) $^ -c -o $@
all: $(SRCS:.c=.o)
$(LD) $(LDFLAGS) -o bin $^
clean:
$(RM) $(SRCS:.c=.o) bin