Enhance Makefile and rpylib.c:

- Updated Makefile to streamline build process for main application and Python extension.
- Implemented C extension in rpylib.c for OpenAI communication, including chat and reset functionalities.
This commit is contained in:
2025-03-20 04:13:26 +01:00
parent c645645155
commit 71606a6c22
2 changed files with 26 additions and 6 deletions
+2 -5
View File
@@ -1,4 +1,4 @@
all: build run
all: build build_rpylib run
# Variables for compiler and flags
CC = gcc
@@ -9,12 +9,9 @@ build:
$(CC) main.c $(CFLAGS) -o r
publish r
build_free:
$(CC) main.c -DFREE_VERSION $(CFLAGS) -o rf
publish rf
build_rpylib:
$(CC) -shared -o rpylib.so -fPIC rpylib.c -lpython3.12 `python3-config --includes` -I/usr/include/CL -ljson-c -lcurl
publish rpylib.so
run:
./r