# Makefile for C++ Rserve clients.

SRC = Rcgi.cc Rconnection.cc
OBJ = $(SRC:%.cc=%.o)
DST = Rcgi
CC=clang -arch x86_64
CXX=clang++ -arch x86_64 -std=gnu++20

LIBS= $(PKG_LIBS)
CPPFLAGS=-DHAVE_CONFIG_H -I. $(PKG_CPPFLAGS)
CFLAGS=-falign-functions=64 -Wall -g -O2
CXXFLAGS=-falign-functions=64 -Wall -g -O2

all: $(DST)

Rcgi: Rconnection.o Rcgi.o
	$(CXX) $^ -o $@ $(LIBS)

debug:
	$(MAKE) CXXFLAGS=-g all

clean:
	rm -rf *~ *.o \#* .\#* $(DST)
