From 9d68fd3232eef34ef0a0be21e90a15a35bfc77ad Mon Sep 17 00:00:00 2001 From: yaneurao Date: Thu, 30 May 2024 06:36:35 +0900 Subject: [PATCH] =?UTF-8?q?-=20makefile=20macos=E5=AF=BE=E5=BF=9C=E3=80=82?= =?UTF-8?q?=20-=20evallearn=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=97=E3=81=A6Cl?= =?UTF-8?q?ang=E3=81=A7=E3=82=B3=E3=83=B3=E3=83=91=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=ABwarning=E3=81=8C?= =?UTF-8?q?=E5=87=BA=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=80=82=E3=81=9D=E3=81=AE2=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/Makefile | 23 ++++++++++++++++------- source/learn/learner.cpp | 2 +- source/testcmd/mate_test_cmd.cpp | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/source/Makefile b/source/Makefile index a0615e475..c7444944e 100644 --- a/source/Makefile +++ b/source/Makefile @@ -77,6 +77,11 @@ TARGET_CPU = AVX2 #TARGET_CPU = OTHER #TARGET_CPU = GRAVITON2 #TARGET_CPU = WASM +# -- macOSとか +#TARGET_CPU = APPLEM1 +#TARGET_CPU = APPLEM2 +#TARGET_CPU = APPLEM3 + # デバッガーを使用するか (debugger) @@ -103,15 +108,19 @@ COMPILER = clang++ # 標準的なコンパイルオプション (standard compile options) -CPPFLAGS = -std=c++17 -fno-exceptions -fno-rtti -Wextra -MMD -MP -fpermissive +CPPFLAGS = -std=c++17 -fno-exceptions -fno-rtti -Wextra -MMD -MP -fpermissive NVCC_CPPFLAGS = -std=c++17 -x cu -maxrregcount=0 --machine 64 --compile -cudart static -DNDEBUG -Xcompiler "-Ofast" -WCPPFLAGS = -LDFLAGS = $(EXTRA_LDFLAGS) -LIBS = -INCLUDE = # -I../include +WCPPFLAGS = +LDFLAGS = +LIBS = +INCLUDE = # -I../include -# makeするときにCPPFLAGSを追加で指定したいときはこれを用いる。 +# makeするときにCPPFLAGS,LDFLAGSを追加で指定したいときはこれを用いる。 EXTRA_CPPFLAGS = +EXTRA_LDFLAGS = + +CPPFLAGS += $(EXTRA_CPPFLAGS) +LDFLAGS += $(EXTRA_LDFLAGS) # YANEURAOU_EDITION = YANEURAOU_ENGINE_MATERIALのときに指定できる、評価関数の通し番号 # 1 : 普通の駒得のみの評価関数 @@ -612,7 +621,7 @@ else ifeq ($(TARGET_CPU),OTHER) endif # YANEURAOU_EDITION , CPUターゲット名 などのシンボルをコンパイル時に定義してやる。 -CPPFLAGS += -D$(YANEURAOU_EDITION) -DTARGET_CPU=\"$(TARGET_CPU)\" $(EXTRA_CPPFLAGS) +CPPFLAGS += -D$(YANEURAOU_EDITION) -DTARGET_CPU=\"$(TARGET_CPU)\" NVCC_CPPFLAGS += -D$(YANEURAOU_EDITION) -DTARGET_CPU=\"$(TARGET_CPU)\" OBJECTS = $(addprefix $(OBJDIR)/, $(SOURCES:.cpp=.o)) diff --git a/source/learn/learner.cpp b/source/learn/learner.cpp index 94b2a5f79..1d600ab71 100644 --- a/source/learn/learner.cpp +++ b/source/learn/learner.cpp @@ -3392,7 +3392,7 @@ namespace Learner { } // gensfen2019コマンド本体 - void gen_sfen2019(Position& pos, istringstream& is) + void gen_sfen2019([[maybe_unused]] Position& pos, [[maybe_unused]] istringstream& is) { // スレッド数(これは、USIのsetoptionで与えられる) u32 thread_num = (u32)Options["Threads"]; diff --git a/source/testcmd/mate_test_cmd.cpp b/source/testcmd/mate_test_cmd.cpp index 037a84514..40e8d39cb 100644 --- a/source/testcmd/mate_test_cmd.cpp +++ b/source/testcmd/mate_test_cmd.cpp @@ -534,7 +534,7 @@ namespace { #endif // MATE ENGINEのテスト。(ENGINEに対して局面図を送信する) - void mate_bench2([[maybe_unused]] Position& pos, std::istringstream& is) + void mate_bench2([[maybe_unused]] Position& pos, [[maybe_unused]] std::istringstream& is) { #if !defined (TANUKI_MATE_ENGINE) && !defined(YANEURAOU_MATE_ENGINE) cout << "Error! : define TANUKI_MATE_ENGINE or YANEURAOU_MATE_ENGINE" << endl;