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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user