diff --git a/Makefile.linux b/Makefile.linux index 75134e7f..3658587f 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -49,7 +49,7 @@ endif # UPNP Support (miniupnpc 1.5 and higher) ifeq ($(USE_UPNP),yes) - CXXFLAGS += -DUSE_UPNP + NEEDED_CXXFLAGS += -DUSE_UPNP ifeq ($(USE_STATIC),yes) LDLIBS += $(LIBDIR)/libminiupnpc.a else @@ -59,6 +59,6 @@ endif ifeq ($(USE_AESNI),yes) ifeq (, $(findstring arm, $(SYS))$(findstring aarch64, $(SYS))) # no arm and aarch64 in dumpmachine - CXXFLAGS += -D__AES__ + NEEDED_CXXFLAGS += -D__AES__ endif endif diff --git a/Makefile.mingw b/Makefile.mingw index 227a3626..ad75da2f 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -1,7 +1,7 @@ USE_WIN32_APP=yes CXX = g++ WINDRES = windres -CXXFLAGS := ${CXX_DEBUG} -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN +CXXFLAGS := ${CXX_DEBUG} -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN -fPIC INCFLAGS = -Idaemon -I. LDFLAGS := ${LD_DEBUG} -Wl,-Bstatic -static-libgcc -static-libstdc++ diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index c2794224..61366e68 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -13,7 +13,6 @@ endif() # configurale options option(WITH_AESNI "Use AES-NI instructions set" ON) -option(WITH_AVX "deprecated" OFF) option(WITH_HARDENING "Use hardening compiler flags" OFF) option(WITH_LIBRARY "Build library" ON) option(WITH_BINARY "Build binary" ON) @@ -190,8 +189,7 @@ if(UNIX) endif() if(WITH_AESNI) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -maes") - add_definitions(-DAESNI) + add_definitions(-D__AES__) endif() if(WITH_ADDRSANITIZER)