From e78ba80bc90fdb78f4ce47d12519280fe2e5981c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Sat, 25 Nov 2023 15:34:34 +0100 Subject: [PATCH] -MD. bookworm manpages.d.o link --- Makefile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index c95691d..466f4fc 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ PKGCONF_CFLAGS := $(shell pkg-config --cflags $(PKGS)) LDFLAGS += -Wl,--as-needed LDLIBS += -lrt -ltspi -lcrypto $(PKGCONF_LIBS) CXXFLAGS += -g -O3 -std=c++17 -fno-exceptions -fno-rtti -Wall -Wextra -pipe -fPIC $(PKGCONF_CFLAGS) -CPPFLAGS += -DTZPFMS_VERSION='$(TZPFMS_VERSION)' +CPPFLAGS += -MD -DTZPFMS_VERSION='$(TZPFMS_VERSION)' BINARY_SOURCES := $(sort $(wildcard src/bin/*.cpp src/bin/**/*.cpp)) COMMON_SOURCES := $(filter-out $(BINARY_SOURCES),$(sort $(wildcard src/*.cpp src/**/*.cpp src/**/**/*.cpp src/**/**/**/*.cpp))) MANPAGE_HEADERS := $(sort $(wildcard man/*.h)) @@ -46,10 +46,6 @@ endif ifneq "$(findstring clang,$(shell $(CXX) --version))" "" # GCC doesn't have this granularity CXXFLAGS += -flto=full -pedantic -Wno-gnu-statement-expression -Wno-gnu-include-next -Wno-gnu-conditional-omitted-operand -Wno-c++20-designator - ifeq "$(AR)" "ar" - # Need this because -flto=full produces objects FSF ranlib (ar s) can't index - override AR := llvm-ar - endif else CXXFLAGS += -flto endif @@ -57,7 +53,6 @@ endif .PHONY : all clean build shellcheck i-t dracut init.d-systemd manpages htmlpages -.SECONDARY: all : build manpages htmlpages shellcheck i-t init.d-systemd dracut @@ -104,7 +99,7 @@ $(OUTDIR)man/% : man/%.pp $(MANPAGE_HEADERS) $(OUTDIR)man/%.html : $(OUTDIR)man/% @mkdir -p $(dir $@) - ( cd $(OUTDIR)man/ && $(MANDOC) -Thtml -Ostyle="style.css",man="%N.%S.html;https://manpages.debian.org/bullseye/%N.%S" ) < $< | \ + ( cd $(OUTDIR)man/ && $(MANDOC) -Thtml -Ostyle="style.css",man="%N.%S.html;https://manpages.debian.org/bookworm/%N.%S" ) < $< | \ $(AWK) '/^

//g' -e 's#manpages.debian.org/[^/]*/ESYS_CONTEXT.3#mankier.com/3/ESYS_CONTEXT#g' > $@ @@ -112,11 +107,8 @@ $(OUTDIR)man/style.css : man/style.css @mkdir -p $(dir $@) cp $^ $@ -$(BLDDIR)libtzpfms.a : $(subst src/,$(BLDDIR)obj/,$(subst .cpp,.o,$(COMMON_SOURCES))) - $(AR) crs $@ $^ - -$(OUTDIR)% : $(BLDDIR)obj/bin/%.o $(BLDDIR)libtzpfms.a +$(OUTDIR)% : $(BLDDIR)obj/bin/%.o $(subst src/,$(BLDDIR)obj/,$(subst .cpp,.o,$(COMMON_SOURCES))) @mkdir -p $(dir $@) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) @@ -128,3 +120,6 @@ $(OUTDIR)dracut/usr/lib/dracut/modules.d/91tzpfms/% : initrd/dracut/% $(INITRD_H @mkdir -p $(dir $@) $(AWK) -f pp.awk $< > $@ chmod --reference $< $@ + + +include $(wildcard $(BLDDIR)*/*.d $(BLDDIR)*/*/*.d)