mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-06 03:20:33 +00:00
b7f0d87daf
Done with Vort's (https://github.com/Vort) cooperation Signed-off-by: R4SAS <r4sas@i2pmail.org>
60 lines
1.3 KiB
Makefile
60 lines
1.3 KiB
Makefile
# Build application with GUI (tray, main window)
|
|
USE_WIN32_APP := yes
|
|
|
|
WINDRES = windres
|
|
|
|
CXXFLAGS := $(CXX_DEBUG) -fPIC -msse
|
|
INCFLAGS := -I$(DAEMON_SRC_DIR) -IWin32
|
|
LDFLAGS := ${LD_DEBUG} -static
|
|
|
|
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
|
|
LDLIBS = -lminiupnpc
|
|
endif
|
|
|
|
LDLIBS += \
|
|
-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 \
|
|
-lole32 \
|
|
-luuid \
|
|
-lpthread
|
|
|
|
ifeq ($(USE_WIN32_APP), yes)
|
|
DEFINES += -DWIN32_APP
|
|
LDFLAGS += -mwindows
|
|
DAEMON_RC += Win32/Resource.rc
|
|
DAEMON_OBJS += $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
|
|
endif
|
|
|
|
ifeq ($(USE_WINXP_FLAGS), yes)
|
|
DEFINES += -DWINVER=0x0501 -D_WIN32_WINNT=0x0501
|
|
endif
|
|
|
|
ifeq ($(USE_AESNI),yes)
|
|
NEEDED_CXXFLAGS += -maes
|
|
DEFINES += -D__AES__
|
|
endif
|
|
|
|
ifeq ($(USE_ASLR),yes)
|
|
LDFLAGS += -Wl,--nxcompat -Wl,--high-entropy-va -Wl,--dynamicbase,--export-all-symbols
|
|
endif
|
|
|
|
obj/%.o : %.rc | mk_obj_dir
|
|
$(WINDRES) $(DEFINES) $(INCFLAGS) --preprocessor-arg=-MMD --preprocessor-arg=-MP --preprocessor-arg=-MF$@.d -i $< -o $@
|