1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

COMP=msys2を指定できるようにした

This commit is contained in:
nodchip 2020-06-24 00:47:34 +09:00
parent 43e78187d7
commit 999f5ec446

View file

@ -229,7 +229,6 @@ ifeq ($(COMP),mingw)
CXXFLAGS += -Wextra -Wshadow
LDFLAGS += -static
endif
LDFLAGS += -static -Wl,-s
ifeq ($(COMP),icc)
comp=icc
@ -259,6 +258,28 @@ ifeq ($(COMP),clang)
endif
endif
ifeq ($(COMP),msys2)
comp=gcc
CXX=g++
CXXFLAGS += -pedantic -Wextra -Wshadow
ifeq ($(ARCH),armv7)
ifeq ($(OS),Android)
CXXFLAGS += -m$(bits)
LDFLAGS += -m$(bits)
endif
else
CXXFLAGS += -m$(bits)
LDFLAGS += -m$(bits)
endif
ifneq ($(KERNEL),Darwin)
LDFLAGS += -Wl,--no-as-needed
endif
LDFLAGS += -static -Wl,-s
endif
ifeq ($(comp),icc)
profile_make = icc-profile-make
profile_use = icc-profile-use
@ -357,7 +378,7 @@ endif
ifeq ($(avx2),yes)
CXXFLAGS += -DUSE_AVX2
ifeq ($(comp),$(filter $(comp),gcc clang mingw))
ifeq ($(comp),$(filter $(comp),gcc clang mingw msys2))
CXXFLAGS += -mavx2
endif
endif
@ -365,7 +386,7 @@ endif
### 3.7 pext
ifeq ($(pext),yes)
CXXFLAGS += -DUSE_PEXT
ifeq ($(comp),$(filter $(comp),gcc clang mingw))
ifeq ($(comp),$(filter $(comp),gcc clang mingw msys2))
CXXFLAGS += -mbmi2
endif
endif
@ -375,7 +396,7 @@ endif
### needs access to the optimization flags.
ifeq ($(optimize),yes)
ifeq ($(debug), no)
ifeq ($(comp),$(filter $(comp),gcc clang))
ifeq ($(comp),$(filter $(comp),gcc clang msys2))
CXXFLAGS += -flto
LDFLAGS += $(CXXFLAGS)
endif
@ -435,6 +456,7 @@ help:
@echo "mingw > Gnu compiler with MinGW under Windows"
@echo "clang > LLVM Clang compiler"
@echo "icc > Intel compiler"
@echo "msys2 > MSYS2"
@echo ""
@echo "Simple examples. If you don't know what to do, you likely want to run: "
@echo ""