Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (31 loc) · 1.38 KB
/
Copy pathMakefile
File metadata and controls
41 lines (31 loc) · 1.38 KB
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
CXX = g++
CXXFLAGS = -std=c++17 -Iinclude -Wall -Wextra -O2
SRC = $(wildcard src/*.cpp)
HDR = $(wildcard include/*.hpp)
MAINS = src/main.cpp src/lsta_main.cpp src/fastpnr_main.cpp
LIB_SRC = $(filter-out $(MAINS),$(SRC))
TARGET = FastASIC
LSTA = lsta
PNR = fastpnr
STA_CHECK = tests/sta_bruteforce
SAT_CHECK = tests/sat_fuzz
.PHONY: all test clean
all: $(TARGET) $(LSTA) $(PNR)
$(TARGET): src/main.cpp $(LIB_SRC) $(HDR)
$(CXX) $(CXXFLAGS) src/main.cpp $(LIB_SRC) -o $(TARGET)
# Standalone static timing analyser for gate-level netlists
$(LSTA): src/lsta_main.cpp $(LIB_SRC) $(HDR)
$(CXX) $(CXXFLAGS) src/lsta_main.cpp $(LIB_SRC) -o $(LSTA)
# Physical design: floorplan (DEF output); placement and routing come next
$(PNR): src/fastpnr_main.cpp $(LIB_SRC) $(HDR)
$(CXX) $(CXXFLAGS) src/fastpnr_main.cpp $(LIB_SRC) -o $(PNR)
# Independent brute-force check of the STA engine, used by the test suite
$(STA_CHECK): $(STA_CHECK).cpp $(LIB_SRC) $(HDR)
$(CXX) $(CXXFLAGS) $(STA_CHECK).cpp $(LIB_SRC) -o $(STA_CHECK)
# Independent fuzz test of the CDCL solver against brute force, used by the test suite
$(SAT_CHECK): $(SAT_CHECK).cpp src/cdcl_solver.cpp include/sat_solver.hpp
$(CXX) $(CXXFLAGS) $(SAT_CHECK).cpp src/cdcl_solver.cpp -o $(SAT_CHECK)
test: $(TARGET) $(LSTA) $(PNR) $(STA_CHECK) $(SAT_CHECK)
bash tests/run_tests.sh ./$(TARGET)
clean:
rm -f $(TARGET) $(LSTA) $(PNR) $(STA_CHECK) $(SAT_CHECK)