]> mj.ucw.cz Git - pciutils.git/commitdiff
Makefile: Additions to CFLAGS require an override
authorMartin Mares <mj@ucw.cz>
Sun, 18 Feb 2024 11:04:44 +0000 (12:04 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 18 Feb 2024 11:04:44 +0000 (12:04 +0100)
Otherwise, they are ignored when "make CFLAGS=something" is used.

Makefile

index 2f25691bcda9d58ba703c57b3e1c085d0f684218..cb98813091ba8607dea27a56bb92e79d64ae23ce 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -104,7 +104,7 @@ common.o: common.c pciutils.h $(PCIINC)
 compat/getopt.o: compat/getopt.c
 
 lspci$(EXEEXT): LDLIBS+=$(LIBKMOD_LIBS)
-ls-kernel.o: CFLAGS+=$(LIBKMOD_CFLAGS)
+ls-kernel.o: override CFLAGS+=$(LIBKMOD_CFLAGS)
 
 update-pciids: update-pciids.sh
        sed <$< >$@ "s@^DEST=.*@DEST=$(if $(IDSDIR),$(IDSDIR)/,)$(PCI_IDS)@;s@^PCI_COMPRESSED_IDS=.*@PCI_COMPRESSED_IDS=$(PCI_COMPRESSED_IDS)@;s@VERSION=.*@VERSION=$(VERSION)@"
@@ -114,7 +114,7 @@ update-pciids: update-pciids.sh
 example$(EXEEXT): example.o lib/$(PCIIMPLIB)
 example.o: example.c $(PCIINC)
 
-$(LMROBJS) pcilmr.o: CFLAGS+=-I .
+$(LMROBJS) pcilmr.o: override CFLAGS+=-I .
 $(LMROBJS): %.o: %.c $(LMRINC) $(PCIINC) pciutils.h
 
 pcilmr: pcilmr.o $(LMROBJS) $(COMMON) lib/$(PCIIMPLIB)