include $(CONFIG) CDIRS := syscall object CFILES := $(wildcard *.c) CFILES += $(foreach dir,$(CDIRS),$(wildcard $(dir)/*.c)) CFILES += $(wildcard arch/$(TARGET_MACHINE)/*.c) CFILES += $(foreach dir,$(CDIRS),$(wildcard arch/$(TARGET_MACHINE)/$(dir)/*.c)) OFILES := $(patsubst %.c,%.o,$(CFILES)) CFLAGS := -ffreestanding -nostdlib -Iinclude -g all: ${OFILES} ar rcs $(OUT)/libjove.a $(OFILES) clean: -rm $(OFILES) %.o:%.c $(CC) $(CFLAGS) -c $< -o $@