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.
 
 
 
 
 

35 lines
600 B

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