From 36cf1d4b56fbfd90807c8ae86b08b80aaecd04af Mon Sep 17 00:00:00 2001 From: Gabriel mermelstein Date: Fri, 20 Sep 2024 12:09:06 +0300 Subject: [PATCH] using static library only in linux --- cpp/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/Makefile b/cpp/Makefile index 66c1c5d..ef59f12 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -4,10 +4,10 @@ NEGENTROPY_ROOT := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) INCS = -I$(NEGENTROPY_ROOT) -I/opt/homebrew/include/ -I$(NEGENTROPY_ROOT)/vendor/lmdbxx/include/ -ifeq ($(OS),Windows_NT) - TARGET = libnegentropy.dll -else +ifeq ($(detected_OS),Linux) TARGET = libnegentropy.a +else + TARGET = libnegentropy.dll endif .PHONY: all clean install-deps precompiled-header build-lib @@ -23,11 +23,11 @@ precompiled-header: g++ -O0 --std=c++20 -Wall -fexceptions -g $(NEGENTROPY_ROOT)negentropy.h $(INCS) build-lib: -ifeq ($(OS),Windows_NT) - g++ -O0 -g -std=c++20 $(INCS) -shared -fPIC -o $(TARGET) $(NEGENTROPY_ROOT)negentropy_wrapper.cpp -lcrypto -lssl -L/opt/homebrew/lib/ -else +ifeq ($(detected_OS),Linux) g++ -O0 -g -std=c++20 $(INCS) -fPIC -c negentropy_wrapper.cpp ar rcs $(TARGET) negentropy_wrapper.o +else + g++ -O0 -g -std=c++20 $(INCS) -shared -fPIC -o $(TARGET) $(NEGENTROPY_ROOT)negentropy_wrapper.cpp -lcrypto -lssl -L/opt/homebrew/lib/ endif clean: