From 34d3bc03438bc91a84b3d0136dcd4df63653e43d Mon Sep 17 00:00:00 2001 From: R4SAS Date: Sat, 26 Aug 2017 23:35:55 +0300 Subject: [PATCH] static win build --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 099d46a..f2f7dda 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ +UNAME = $(shell uname -s) + I2PD_PATH = i2pd LIBI2PD_PATH = $(I2PD_PATH)/libi2pd LIBI2PD_CLIENT_PATH = $(I2PD_PATH)/libi2pd_client CXX = g++ FLAGS = -Wall -std=c++11 -Wno-misleading-indentation -UNAME = $(shell uname -s) ifeq ($(UNAME),Linux) FLAGS += -g else @@ -16,12 +17,14 @@ endif INCFLAGS = -I$(LIBI2PD_PATH) -I$(LIBI2PD_CLIENT_PATH) -I$(I2PD_PATH) CXXFLAGS = $(FLAGS) LDFLAGS = -Wl,-rpath,/usr/local/lib -LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lpthread -lz +LIBS = $(I2PD_PATH)/libi2pd.a -lboost_system$(BOOST_SUFFIX) -lboost_date_time$(BOOST_SUFFIX) -lboost_filesystem$(BOOST_SUFFIX) -lboost_program_options$(BOOST_SUFFIX) -lssl -lcrypto -lz ifeq ($(UNAME),Linux) - LIBS += -lrt + LIBS += -lrt -lpthread else - LIBS += -lws2_32 -lwsock32 -lstdc++ -liphlpapi +# Win32 + LIBS += -lws2_32 -lwsock32 -lgdi32 -liphlpapi -lstdc++ -lpthread + LDFLAGS += -Wl,-Bstatic -static-libgcc -static-libstdc++ endif SOURCES = $(wildcard *.cpp)