Skip to content

Commit fb66b41

Browse files
authored
The first release (it didn't work well)
0 parents  commit fb66b41

File tree

15 files changed

+6252
-0
lines changed

15 files changed

+6252
-0
lines changed

Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Compiler and Flags
2+
CXX = g++
3+
CXXFLAGS = -march=native -mtune=native -msse4.2 -std=c++17 $(FLAGS)
4+
5+
# Source files and object files
6+
SRC = main.cpp eval.cpp search.cpp pieces.cpp pawns.cpp patterns.cpp
7+
OBJ = $(SRC:.cpp=.o)
8+
9+
# Output file
10+
EXEC = chess_engine
11+
12+
# Default target: build the project
13+
all: $(EXEC)
14+
15+
# Linking the object files into the executable
16+
$(EXEC): $(OBJ)
17+
$(CXX) $(CXXFLAGS) -o $(EXEC) $(OBJ)
18+
19+
# Rule to build object files from source files
20+
%.o: %.cpp
21+
$(CXX) $(CXXFLAGS) -c $< -o $@
22+
23+
# Clean up the compiled files
24+
clean:
25+
rm -f $(OBJ) $(EXEC)
26+
27+
# To run the program after compilation
28+
run: $(EXEC)
29+
./$(EXEC)
30+
31+
# Rebuild the project
32+
rebuild: clean all
33+

0 commit comments

Comments
 (0)