2020-11-25 06:00:24 -05:00
|
|
|
CCPREFIX = i686-elf-
|
|
|
|
|
|
|
|
AR = $(CCPREFIX)ar
|
|
|
|
AS = $(CCPREFIX)as
|
|
|
|
CC = $(CCPREFIX)gcc
|
|
|
|
|
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 06:00:24 -05:00
|
|
|
$(CC) -T linker.ld -o $@ -ffreestanding -nostdlib -lgcc $^
|
|
|
|
|
2020-11-25 08:55:20 -05:00
|
|
|
start.o: start.c
|
|
|
|
$(CC) -c $< -o $@ $(CFLAGS)
|