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
|
2017-04-21 14:08:31 +03:00
|
|
|
INCFLAGS = -I/usr/include/ -I/usr/local/include/ -I. -Idaemon
|
2017-04-22 04:17:01 +03:00
|
|
|
LDFLAGS = -Wl,-rpath,/usr/local/lib -Wl,-Bstatic -static-libgcc -static-libstdc++ -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)
|
2017-04-22 04:17:01 +03:00
|
|
|
CXXFLAGS += -DUSE_UPNP -DMINIUPNP_STATICLIB
|
|
|
|
LDLIBS = -lminiupnpc
|
2016-06-24 21:18:50 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
LDLIBS += \
|
2017-04-22 04:17:01 +03: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 21:18:50 +03:00
|
|
|
|
|
|
|
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 \
|
2017-04-22 04:17:01 +03:00
|
|
|
-Wl,--dynamicbase,--export-all-symbols
|
2016-10-05 04:45:41 +03:00
|
|
|
endif
|
|
|
|
|
2016-06-24 21:18:50 +03:00
|
|
|
obj/%.o : %.rc
|
|
|
|
$(WINDRES) -i $< -o $@
|