Files
r/Makefile
T
retoor 14c40d5fa7 feat: add C extension for OpenAI chat and reset in rpylib.c and streamline Makefile
- Updated Makefile to simplify build targets for both main app and Python extension
- Implemented rpylib.c with chat and reset functions for OpenAI API communication
2025-03-20 03:13:26 +00: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