Browse Source

[make] fix windows msys2 build

Signed-off-by: r4sas <r4sas@i2pmail.org>
pull/1949/merge
R4SAS 11 months ago
parent
commit
c2d7133174
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
  1. 2
      Makefile
  2. 26
      Makefile.mingw

2
Makefile

@ -121,7 +121,7 @@ obj/%.o: %.cpp | mk_obj_dir @@ -121,7 +121,7 @@ obj/%.o: %.cpp | mk_obj_dir
-include $(DEPS)
$(I2PD): $(DAEMON_OBJS) $(ARLIB) $(ARLIB_CLIENT) $(ARLIB_LANG)
$(CXX) -o $@ $(DEFINES) $(LDFLAGS) $^ $(LDLIBS)
$(CXX) $(DEFINES) $(LDFLAGS) -o $@ $^ $(LDLIBS)
$(SHLIB): $(LIB_OBJS)
ifneq ($(USE_STATIC),yes)

26
Makefile.mingw

@ -5,14 +5,11 @@ WINDRES = windres @@ -5,14 +5,11 @@ WINDRES = windres
CXXFLAGS := $(CXX_DEBUG) -fPIC -msse
INCFLAGS := -I$(DAEMON_SRC_DIR) -IWin32
LDFLAGS := ${LD_DEBUG} -static
LDFLAGS := ${LD_DEBUG} -static -fPIC -msse
NEEDED_CXXFLAGS += -std=c++17
DEFINES += -DWIN32_LEAN_AND_MEAN
# Boost libraries suffix
BOOST_SUFFIX = -mt
# UPNP Support
ifeq ($(USE_UPNP),yes)
DEFINES += -DUSE_UPNP -DMINIUPNP_STATICLIB
@ -20,20 +17,20 @@ ifeq ($(USE_UPNP),yes) @@ -20,20 +17,20 @@ ifeq ($(USE_UPNP),yes)
endif
LDLIBS += \
-lboost_system$(BOOST_SUFFIX) \
-lboost_date_time$(BOOST_SUFFIX) \
-lboost_filesystem$(BOOST_SUFFIX) \
-lboost_program_options$(BOOST_SUFFIX) \
-lssl \
-lcrypto \
-lz \
$(MINGW_PREFIX)/lib/libboost_system-mt.a \
$(MINGW_PREFIX)/lib/libboost_date_time-mt.a \
$(MINGW_PREFIX)/lib/libboost_filesystem-mt.a \
$(MINGW_PREFIX)/lib/libboost_program_options-mt.a \
$(MINGW_PREFIX)/lib/libssl.a \
$(MINGW_PREFIX)/lib/libcrypto.a \
$(MINGW_PREFIX)/lib/libz.a \
-lwsock32 \
-lws2_32 \
-lgdi32 \
-liphlpapi \
-lcrypt32 \
-lgdi32 \
-lole32 \
-luuid \
-lpthread
-luuid
ifeq ($(USE_WIN32_APP), yes)
DEFINES += -DWIN32_APP
@ -48,6 +45,7 @@ endif @@ -48,6 +45,7 @@ endif
ifeq ($(USE_AESNI),yes)
NEEDED_CXXFLAGS += -maes
LDFLAGS += -maes
DEFINES += -D__AES__
endif

Loading…
Cancel
Save