agama/rust/zypp-agama/zypp-agama-sys/c-layer/Makefile
Martin Vidner 293ff4c254 Let Clang formatting violations fail the CI build
- call make check in CI
- -Werror is needed for a failing exit code
2026-03-12 10:47:38 +01:00

24 lines
554 B
Makefile

AR=ar
CXX=g++
CXXFLAGS=-Wall -I./include -I./internal -Izypp -Wall -std=c++14 -lzypp -lsystemd -fPIE
DEPS = include/lib.h include/callbacks.h internal/callbacks.hxx
OBJ = lib.o callbacks.o
all: libagama-zypp.a
clean:
rm -vf *.o *.a
check:
git ls-files | grep -E '\.(c|h|cxx|hxx)$$' | \
xargs --verbose clang-format --style=llvm -Werror --dry-run
libagama-zypp.a: $(OBJ)
$(AR) -crs $@ $^
%.o: %.cxx $(DEPS)
$(CXX) -c -o $@ $< $(CXXFLAGS)
format:
git ls-files | grep -E '\.(c|h|cxx|hxx)$$' | \
xargs --verbose clang-format --style=llvm -i