From e72088d79804e4f689196f4bc700fb9348c77209 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Sat, 24 Jan 2026 22:28:22 -0500 Subject: initial commit --- makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..6f80fb0 --- /dev/null +++ b/makefile @@ -0,0 +1,24 @@ +CC ?= cc +CFLAGS := -std=c23 -O3 -Wall -Werror -fPIC -c + +BUILD_DIR := build +TARGET := $(BUILD_DIR)/libsafec.a + +SRCS := $(wildcard *.c) +OBJS := $(patsubst %.c,$(BUILD_DIR)/%.o,$(SRCS)) + +.PHONY: all clean + +all: $(BUILD_DIR) $(TARGET) + +$(BUILD_DIR): + mkdir -p $(BUILD_DIR) + +$(TARGET): $(OBJS) + ar rcs $@ $^ + +$(BUILD_DIR)/%.o: %.c + $(CC) $(CFLAGS) $< -o $@ + +clean: + rm -rf $(BUILD_DIR) -- cgit v1.2.3