i2pd/Makefile.mingw

55 lines
1.2 KiB
Makefile
Raw Normal View History

2016-06-24 18:18:50 +00:00
USE_WIN32_APP=yes
CXX = g++
WINDRES = windres
CXXFLAGS := ${CXX_DEBUG} -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN
2016-06-24 18:18:50 +00:00
NEEDED_CXXFLAGS = -std=c++11
BOOST_SUFFIX = -mt
2017-11-13 01:46:19 +00:00
INCFLAGS = -Idaemon -I.
LDFLAGS := ${LD_DEBUG} -Wl,-Bstatic -static-libgcc -static-libstdc++
2016-06-24 18:18:50 +00:00
2017-04-21 10:48:57 +00:00
# UPNP Support
2016-07-26 15:22:53 +00:00
ifeq ($(USE_UPNP),yes)
2017-04-22 01:17:01 +00:00
CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB
LDLIBS = -lminiupnpc
2016-06-24 18:18:50 +00:00
endif
LDLIBS += \
2017-04-22 01:17:01 +00:00
-lboost_system$(BOOST_SUFFIX) \
-lboost_date_time$(BOOST_SUFFIX) \
-lboost_filesystem$(BOOST_SUFFIX) \
-lboost_program_options$(BOOST_SUFFIX) \
-lssl \
-lcrypto \
-lz \
-lwsock32 \
-lws2_32 \
-lgdi32 \
-liphlpapi \
-lstdc++ \
-lpthread
2016-06-24 18:18:50 +00:00
ifeq ($(USE_WIN32_APP), yes)
CXXFLAGS += -DWIN32_APP
2017-11-13 01:46:19 +00:00
LDFLAGS += -mwindows
2016-06-24 18:18:50 +00:00
DAEMON_RC += Win32/Resource.rc
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
endif
2016-10-09 18:57:15 +00:00
# don't change following line to ifeq ($(USE_AESNI),yes) !!!
2016-07-26 15:22:53 +00:00
ifeq ($(USE_AESNI),1)
CPU_FLAGS += -maes -DAESNI
2016-06-24 18:18:50 +00:00
else
2016-12-14 14:48:05 +00:00
CPU_FLAGS += -msse
endif
ifeq ($(USE_AVX),1)
CPU_FLAGS += -mavx
2016-06-24 18:18:50 +00:00
endif
2016-10-05 01:45:41 +00:00
ifeq ($(USE_ASLR),yes)
2017-10-12 10:52:36 +00:00
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va -Wl,--dynamicbase,--export-all-symbols
2016-10-05 01:45:41 +00:00
endif
2016-06-24 18:18:50 +00:00
obj/%.o : %.rc
$(WINDRES) -i $< -o $@