From d3463be25da1c939c35cfb06d8b39b501a42858f Mon Sep 17 00:00:00 2001 From: Prem Chaitanya Prathi Date: Fri, 16 Feb 2024 14:16:12 +0530 Subject: [PATCH] chore: draft makefile to compile c++ code --- cpp/Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cpp/Makefile diff --git a/cpp/Makefile b/cpp/Makefile new file mode 100644 index 0000000..d90464a --- /dev/null +++ b/cpp/Makefile @@ -0,0 +1,19 @@ +# Build a shared library of negentropy + +#TODO: Need to add compilation flags based on OS +INCS = -I./ -I/opt/homebrew/include/ +TARGET = libnegentropy.so + +.PHONY: all clean + +all: negentropy-cpp shared-lib + +shared-lib: negentropy.o + g++ -o $(TARGET) negentropy.o -shared + +negentropy-cpp: + g++ negentropy.h --std=c++20 -o negentropy.o $(INCS) + + +clean: + rm -f negentropy.o \ No newline at end of file