We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
0 parents commit 8a3aa26Copy full SHA for 8a3aa26
Makefile
@@ -0,0 +1,32 @@
1
+# Compiler and Flags
2
+CXX = g++
3
+
4
+# Source files and object files
5
+SRC = main.cpp eval.cpp search.cpp
6
+OBJ = $(SRC:.cpp=.o)
7
8
+# Output file
9
+EXEC = chess_engine
10
11
+# Default target: build the project
12
+all: $(EXEC)
13
14
+# Linking the object files into the executable
15
+$(EXEC): $(OBJ)
16
+ $(CXX) $(CXXFLAGS) -std=c++17 -o $(EXEC) $(OBJ)
17
18
+# Rule to build object files from source files
19
+%.o: %.cpp
20
+ $(CXX) $(CXXFLAGS) -std=c++17 -c $< -o $@
21
22
+# Clean up the compiled files
23
+clean:
24
+ rm -f $(OBJ) $(EXEC)
25
26
+# To run the program after compilation
27
+run: $(EXEC)
28
+ ./$(EXEC)
29
30
+# Rebuild the project
31
+rebuild: clean all
32
0 commit comments