include $(CONFIG) CDIRS := stdio ctype string stdlib CFILES += $(foreach dir,$(CDIRS),$(wildcard $(dir)/*.c)) OFILES := $(patsubst %.c,%.o,$(CFILES)) CFLAGS := -ffreestanding -nostdlib all: ${OFILES} ar rcs $(OUT)/libc-jove.a $(OFILES) %.o:%.c $(CC) $(CFLAGS) -c $< -o $@