negentropy/cpp/Makefile

24 lines
612 B
Makefile
Raw Normal View History

# Build a shared library of negentropy
#TODO: Need to add compilation flags based on OS
2024-02-17 07:00:02 +05:30
INCS = -I./ -I/opt/homebrew/include/ -I./vendor/lmdbxx/include/
TARGET = libnegentropy.so
2024-02-16 15:15:59 +05:30
.PHONY: all clean install-deps
all: precompiled-header shared-lib
2024-02-16 15:15:59 +05:30
#TODO: Need to add compilation flags based on OS
install-deps:
brew install lmdb openssl
# Generate 'negentropy.h.gch'
precompiled-header:
2024-02-17 07:00:02 +05:30
g++ --std=c++20 -Wall -fexceptions -g negentropy.h $(INCS)
shared-lib: negentropy.h.gch
2024-02-17 07:00:02 +05:30
g++ --std=c++20 $(INCS) -shared -fPIC -o $(TARGET) negentropy_wrapper.c
clean:
rm -f $(TARGET) negentropy.h.gch libnegentropy.so