diff options
| author | Carson Fleming <[email protected]> | 2026-01-24 22:28:22 -0500 |
|---|---|---|
| committer | Carson Fleming <[email protected]> | 2026-01-24 22:28:22 -0500 |
| commit | e72088d79804e4f689196f4bc700fb9348c77209 (patch) | |
| tree | 195e8b20cf633a0b9fc2ef6754c08742a9ce30e1 /makefile | |
| download | safec-e72088d79804e4f689196f4bc700fb9348c77209.tar.gz | |
initial commit
Diffstat (limited to 'makefile')
| -rw-r--r-- | makefile | 24 |
1 files changed, 24 insertions, 0 deletions
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) |
