First commit

This commit is contained in:
2023-06-15 01:44:02 +03:00
commit 815cfbbcef
8 changed files with 425 additions and 0 deletions

23
Makefile Normal file
View File

@@ -0,0 +1,23 @@
TARGET_LIB ?= libqments.a
BD ?= build
SRC_DIRS ?= src
INCLUDE_DIRS ?= include
SRC_FILES := $(shell find $(SRC_DIRS) -name *.c)
OBJ_FILES := $(patsubst %.c,$(BD)/%.o,$(SRC_FILES))
$(BD)/$(TARGET_LIB): $(OBJ_FILES)
mkdir -p $(@D)
ar rcs $@ $(OBJ_FILES)
$(BD)/%.o: %.c
mkdir -p $(@D)
$(CC) $(CFLAGS) -c $< -o $@ -I $(INCLUDE_DIRS)
all: $(BD)/$(TARGET_LIB)
clean:
rm -rfI $(BD)/
.PHONY: all clean