Files
CgeThread/Makefile.posix
Mikhail Romanko 04e02490b7
Some checks failed
CI / build-and-analyze (push) Failing after 1m18s
Initial commit
2026-08-09 12:55:16 +03:00

34 lines
723 B
Makefile

# POSIX Makefile for CgeThread
CC = gcc
AR = ar
CFLAGS = -std=c99 -O2 -Wall -Wextra -fPIC -pthread
ARFLAGS = rcs
TARGET = libCgeThread.a
SOURCES = posix/Mutex.c posix/Semaphore.c posix/Tss.c posix/Condition.c posix/Thread.c
OBJECTS = $(SOURCES:.c=.o)
.PHONY: all clean install
all: $(TARGET)
$(TARGET): $(OBJECTS)
$(AR) $(ARFLAGS) $@ $^
%.o: %.c CgeThread.h posix/Internal.h posix/Timespec.h posix/Codemap.h
$(CC) $(CFLAGS) -c $< -o $@
clean:
rm -f $(OBJECTS) $(TARGET)
install: $(TARGET)
cp $(TARGET) /usr/local/lib/
cp CgeThread.h /usr/local/include/
ldconfig || echo "Run ldconfig manually if needed"
uninstall:
rm -f /usr/local/lib/libCgeThread.a
rm -f /usr/local/include/CgeThread.h
ldconfig || true