Initial commit

This commit is contained in:
2026-06-14 22:51:45 +03:00
commit 78bf3c74b6
18 changed files with 4096 additions and 0 deletions

33
Makefile.posix Normal file
View File

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