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

This commit is contained in:
2026-08-08 16:00:39 +03:00
commit aec33ef3d8
18 changed files with 2005 additions and 0 deletions

33
Makefile.posix Normal file
View File

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