a cow based x86_64 operating system, using limine and stivale2
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
600 B

8 months ago
8 months ago
.PHONY: all clean release debug
8 months ago
8 months ago
CC := x86_64-elf-gcc
8 months ago
LD := x86_64-elf-ld
CFLAGS := -O3 -fno-inline -mno-red-zone -mgeneral-regs-only \
8 months ago
-I../blib/include -fno-omit-frame-pointer -fno-pie
8 months ago
8 months ago
CFILES :=$(shell find -name "*.c")
EFILES := $(CFILES:.c=.elf)
7 months ago
BIN_DIR := ../disk_root/bin/
8 months ago
8 months ago
debug: CFLAGS += -g
debug: LDFLAGS += -g
debug: all
release: all
8 months ago
8 months ago
all: $(EFILES)
7 months ago
cp shell.elf $(BIN_DIR)/sh
cp ls.elf $(BIN_DIR)/ls
8 months ago
%.elf: %.c ../blib/blib.a
$(CC) $(CFLAGS) -c $< -o $@.o
8 months ago
# $(LD) -static -L../blib/ -lblib $@.o -o $@
$(LD) -static $@.o ../blib/blib.a -o $@
8 months ago
clean:
rm -rf *.s *.elf