Makefile: really make externally defined CFLAGS work

The fix in aed52a6cfb43ebea372328fd5837c1f341c3f0df does not
work (second line will be ignored on override), so expand the implicitly
defined rule and add them there.
master
Daniel Molkentin 2020-03-13 11:39:46 +01:00 committed by Harald Hoyer
parent c490ea8b2b
commit db44331dc4
1 changed files with 3 additions and 1 deletions

View File

@ -19,7 +19,6 @@ sysconfdir ?= ${prefix}/etc
bindir ?= ${prefix}/bin
mandir ?= ${prefix}/share/man
CFLAGS ?= -O2 -g -Wall -std=gnu99 -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
CFLAGS += $(KMOD_CFLAGS)
bashcompletiondir ?= ${datadir}/bash-completion/completions
pkgconfigdatadir ?= $(datadir)/pkgconfig

@ -50,6 +49,9 @@ manpages = $(man1pages) $(man5pages) $(man7pages) $(man8pages)

all: dracut-version.sh dracut.pc dracut-install skipcpio/skipcpio

%.o : %.c
$(CC) -c $(CFLAGS) $(CPPFLAGS) $(KMOD_CFLAGS) $< -o $@

DRACUT_INSTALL_OBJECTS = \
install/dracut-install.o \
install/hashmap.o\