Initial commit
Some checks failed
CI / build-and-analyze (push) Failing after 33s

This commit is contained in:
2026-07-26 09:37:43 +03:00
commit 13a4452758
13 changed files with 965 additions and 0 deletions

33
Makefile.posix Normal file
View File

@@ -0,0 +1,33 @@
# POSIX Makefile for CgeFile
CC = gcc
AR = ar
CFLAGS = -std=c99 -O2 -Wall -Wextra -fPIC
ARFLAGS = rcs
TARGET = libCgeFile.a
SOURCES = posix/File.c
OBJECTS = $(SOURCES:.c=.o)
.PHONY: all clean install
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(AR) $(ARFLAGS) $@ $^
%.o: %.c CgeFile.h
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET)
install: $(TARGET)
cp $(TARGET) /usr/local/lib/
cp CgeFile.h /usr/local/include/
ldconfig || echo "Run ldconfig manually if needed"
uninstall:
rm -f /usr/local/lib/libCgeFile.a
rm -f /usr/local/include/CgeFile.h
ldconfig || true