finix/libk/Makefile
Tyler Murphy fbf131b5c0 initial
2023-07-16 02:54:32 -04:00

20 lines
311 B
Makefile

include ../.env
SRC = $(shell find src -type f -name "*.c")
OBJ = $(patsubst %.c,bin/%.o, $(SRC))
CFLAGS += -Iinclude -Isrc -std=c99
.PHONY: all
all: bin/libk.a
$(OBJ): bin/%.o : %.c
@mkdir -p $(@D)
$(CC) -c $(CFLAGS) -o $@ $<
bin/libk.a: $(OBJ)
@mkdir -p $(@D)
$(AR) rcs $@ $(OBJ)
clean:
rm -fr bin