-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
34 lines (25 loc) · 790 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CC = g++
CFLAGS = -std=c++17 -Wall -Wextra -O3 -flto -DNDEBUG -DNULLMOVE -DASPIRATION_WINDOWS -DLMR -DFUTILITY_PRUNING
LINKER = g++ -o
LFLAGS = -L./libs/libataxx/build/src/ -pthread -lataxx_static
TARGET = tiktaxx
SRCDIR = src
OBJDIR = obj
BINDIR = bin
INCDIR = -I./libs/libataxx/src
SOURCES := $(wildcard $(SRCDIR)/*.cpp)
INCLUDES := $(wildcard $(SRCDIR)/*.hpp)
OBJECTS := $(SOURCES:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o)
$(BINDIR)/$(TARGET): $(BINDIR) $(OBJDIR) $(OBJECTS)
@$(LINKER) $@ $(OBJECTS) $(LFLAGS)
@echo "Linking complete!"
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.cpp
@$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
@echo "Compiled "$<" successfully!"
bin:
mkdir -p $(BINDIR)
obj:
mkdir -p $(OBJDIR)
clean:
rm -r $(OBJDIR)
.PHONY: clean