Files
r/Makefile
T
retoor 71606a6c22 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.
2025-03-20 04:13:26 +01:00

18 lines
382 B
Makefile

all: build build_rpylib run
# Variables for compiler and flags
CC = gcc
CFLAGS = -Ofast -Werror -Wall -lreadline -lncurses -lcurl -lssl -lcrypto -ljson-c -lm
# Targets
build:
$(CC) main.c $(CFLAGS) -o r
publish r
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