2020-11-25 06:00:24 -05:00
|
|
|
CCPREFIX = i686-elf-
|
|
|
|
|
|
|
|
AS = $(CCPREFIX)as
|
|
|
|
CC = $(CCPREFIX)gcc
|
2020-11-25 13:10:00 -05:00
|
|
|
LD = $(CCPREFIX)ld
|
2020-11-25 06:00:24 -05:00
|
|
|
|
2020-11-25 04:50:29 -05:00
|
|
|
MEMGR = memgr
|
|
|
|
|
2020-11-25 08:55:20 -05:00
|
|
|
CFLAGS = -std=gnu99 -ffreestanding -nostdinc -fno-builtin -fno-stack-protector -Wall -Wextra
|
|
|
|
|
2020-11-25 06:00:24 -05:00
|
|
|
all: $(MEMGR)
|
2020-11-25 04:50:29 -05:00
|
|
|
|
|
|
|
clean:
|
2020-11-25 08:55:20 -05:00
|
|
|
rm -f $(MEMGR) start.o
|
2020-11-25 06:00:24 -05:00
|
|
|
|
2020-11-25 08:55:20 -05:00
|
|
|
$(MEMGR): start.o
|
2020-11-25 13:10:00 -05:00
|
|
|
$(LD) -o $@ -T linker.ld $^
|
2020-11-25 06:00:24 -05:00
|
|
|
|
2020-11-25 08:55:20 -05:00
|
|
|
start.o: start.c
|
|
|
|
$(CC) -c $< -o $@ $(CFLAGS)
|