28 lines
1.0 KiB
Makefile
28 lines
1.0 KiB
Makefile
# Seal tests. Run from taicpp/: make -f tests/seal.mk test
|
|
# Outputs stay under build/. Needs only sqlite3 (the store/session/config/plexer/repl sources are
|
|
# compiled in for Store and Boot::resolve_passphrase; seal itself needs nothing).
|
|
CXX ?= g++
|
|
CXXFLAGS ?= -std=c++23 -Wall -Wextra -O2
|
|
INC = -Isrc -Isrc/store -Isrc/session -Isrc/config -Isrc/plexer -Isrc/repl
|
|
SB = build/seal
|
|
SSRCS = $(wildcard src/store/*.cpp) $(wildcard src/session/*.cpp) $(wildcard src/config/*.cpp) $(wildcard src/plexer/*.cpp) $(wildcard src/repl/*.cpp) $(wildcard src/seal/*.cpp)
|
|
SOBJS = $(patsubst src/%.cpp,$(SB)/%.o,$(SSRCS))
|
|
LIBS = -lsqlite3 -pthread
|
|
|
|
.PHONY: all test
|
|
all: build/seal_test build/seal_probe
|
|
|
|
$(SB)/%.o: src/%.cpp
|
|
@mkdir -p $(dir $@)
|
|
$(CXX) $(CXXFLAGS) $(INC) -c $< -o $@
|
|
|
|
build/seal_test: tests/seal_test.cpp $(SOBJS)
|
|
$(CXX) $(CXXFLAGS) $(INC) $< $(SOBJS) $(LIBS) -o $@
|
|
|
|
build/seal_probe: tests/seal_probe.cpp $(SOBJS)
|
|
$(CXX) $(CXXFLAGS) $(INC) $< $(SOBJS) $(LIBS) -o $@
|
|
|
|
test: all
|
|
build/seal_test
|
|
python3 tests/seal_diff.py
|