bootsector_c/Makefile

17 lines
313 B
Makefile
Raw Normal View History

2024-12-29 08:07:39 +00:00
.SUFFIXES: .c .o
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
2024-12-29 08:07:39 +00:00
.c.o:
$(CC) $< -o $@ $(CFLAGS)
2024-10-19 17:09:19 +00:00
2024-10-20 11:53:40 +00:00
bin: $(SRCS:.c=.o)
2024-12-29 08:07:39 +00:00
$(CC) $(LDFLAGS) -o bin $(SRCS:.c=.o)
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:
2024-12-29 08:07:39 +00:00
rm -f $(SRCS:.c=.o) bin