-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (27 loc) · 843 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
35
36
37
38
39
40
41
42
43
44
45
46
BF = bf
TBF = tbf
CXX = g++
STD =c++11 -pedantic
COL=96
LOOPLIMIT=64
BFTAPE=512
TBFTAPE=8
CELL_T=char
BFFLAGS = -DLOOPLIMIT=$(LOOPLIMIT) -DBFTAPE=$(BFTAPE) -DCELL_T=$(CELL_T) -DEOF_DEFAULT -DBFPROG
TBFFLAGS = -DCOL=$(COL) -DTBFTAPE=$(TBFTAPE)
DEBUGFLAGS = -g -Wall -std=$(STD)
RELEASEFLAGS = -O2 -Wall -std=$(STD)
CXXFLAGS = $(DEBUGFLAGS)
.PHONY: all clean release
all: $(BF) $(TBF)
$(BF): bf.cpp bf.hpp
$(CXX) -o $(BF) $(CXXFLAGS) $(BFFLAGS) bf.cpp
$(TBF): tbf.cpp bf.hpp
$(CXX) -o $(TBF) $(CXXFLAGS) $(TBFFLAGS) tbf.cpp
release: $(BF)-r $(TBF)-r
$(BF)-r: bf.cpp bf.hpp
$(CXX) -o $(BF)-r $(RELEASEFLAGS) $(BFFLAGS) bf.cpp
$(TBF)-r: tbf.cpp bf.hpp
$(CXX) -o $(TBF)-r $(RELEASEFLAGS) $(TBFFLAGS) tbf.cpp
clean:
rm -rf *.exe *.o *.bf $(BF) $(TBF) $(BF)-r $(TBF)-r