chore: draft makefile to compile c++ code

This commit is contained in:
Prem Chaitanya Prathi 2024-02-16 14:16:12 +05:30
parent 5cc5cfe82e
commit d3463be25d
No known key found for this signature in database
1 changed files with 19 additions and 0 deletions

19
cpp/Makefile Normal file
View File

@ -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