i2pd/Makefile.mingw

57 lines
1.4 KiB
Makefile
Raw Normal View History

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