blob: 84244de738cb4e421ccac28074377422e0fa86a9 (
plain) (
tree)
|
|
include config.mk
CDIRS := boot device initrd klib memory task syscall
CDIRS += memory/alloc
CDIRS += boot/$(TARGET_BOOTLOADER)
CDIRS += arch/$(TARGET_MACHINE)
CFILES := $(wildcard *.c)
CFILES += $(foreach dir, $(CDIRS), $(wildcard $(dir)/*.c))
SFILES := $(wildcard *.S)
SFILES += $(foreach dir, $(CDIRS), $(wildcard $(dir)/*.S))
OBJFILES := $(patsubst %.c,%.o,$(CFILES))
OBJFILES += $(patsubst %.S,%.o,$(SFILES))
BIN := jove.elf
all: $(BIN)
.PHONY: clean
clean:
rm $(OBJFILES)
rm $(DFILES)
rm $(BIN)
$(BIN): ${OBJFILES}
$(LD) $(LDFLAGS) ${OBJFILES} -o $(BIN)
%.o:%.c
$(CC) $(CFLAGS) -c $< -o $@
%.o:%.S
$(AS) -g -c $< -o $@
|