-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (32 loc) · 1.37 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
CXX=g++
CXXFLAGS=-std=c++17 -pthread -static -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -O3 -rdynamic
CXXFLAGS_DEV=-std=c++17 -pthread -Wall -O1
LDFLAGS=-g
LDLIBS=
TARGET=bin/bpe.exe
TARGET_LONG=bin/bpe.long.exe
TARGET_DEV=bin/bpe.dev.exe
TARGET_SLOW=bin/bpe.slow.exe
TARGET_FAST=bin/bpe.fast.exe
SRCS=nlohmann/json.hpp src/tokens.hpp src/tokens_model.hpp src/readers.hpp src/preprocess.hpp src/core.hpp src/output.hpp src/subcontainers.hpp src/container.hpp src/positions.hpp src/bpe.v3.cpp
SRCS_SLOW=nlohmann/json.hpp src/tokens.hpp src/tokens_model.hpp src/readers.hpp src/preprocess.hpp src/core.hpp src/output.hpp src/subcontainers.hpp src/container.hpp src/positions.hpp src/bpe.v2.cpp
all: $(TARGET) $(TARGET_DEV) #$(TARGET_SLOW)
long: $(TARGET_LONG)
prod: $(TARGET)
dev: $(TARGET_DEV)
# slow: $(TARGET_SLOW)
$(TARGET): $(SRCS)
$(CXX) $(CXXFLAGS) $(SRCS) $(LDLIBS) -o $(TARGET)
cp $(TARGET) $(TARGET_FAST)
$(TARGET_DEV): $(SRCS)
$(CXX) $(CXXFLAGS_DEV) $(SRCS) $(LDLIBS) -o $(TARGET_DEV) $(LDFLAGS)
$(TARGET_LONG): $(SRCS)
$(CXX) $(CXXFLAGS) $(SRCS) $(LDLIBS) -o $(TARGET_LONG)
# $(TARGET_SLOW): $(SRCS_SLOW)
# git checkout e351f3f
# $(CXX) $(CXXFLAGS_DEV) $(SRCS_SLOW) $(LDLIBS) -o $(TARGET_SLOW)
# git checkout master
.PHONY: all prod dev clean slow
clean:
rm -f $(TARGET) $(TARGET_DEV) $(TARGET_FAST)
# rm -f $(TARGET) $(TARGET_DEV) $(TARGET_FAST) $(TARGET_SLOW)