summaryrefslogtreecommitdiffstats
path: root/lib/libc-headless/Makefile
blob: 59de6c8f0113f3e435954d0355fe86c430ac4ee2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
include $(CONFIG)

CDIRS := stdio ctype string

CFILES += $(foreach dir,$(CDIRS),$(wildcard $(dir)/*.c))

OFILES := $(patsubst %.c,%.o,$(CFILES))

CFLAGS := -ffreestanding -nostdlib

all: ${OFILES}
	ar rcs $(OUT)/libc-headless.a $(OFILES)

%.o:%.c
	$(CC) $(CFLAGS) -c $< -o $@