summaryrefslogtreecommitdiffstats
path: root/lib/libjove/Makefile
blob: 024d4fe07219096aba766fb9fb36a46186f35e26 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 $@