build: do apply generated header dependencies
We did produce the depfiles, but no target would depend on it. Oh, well. Signed-off-by: Philippe Gerum <rpm@xenomai.org>
This commit is contained in:
parent
8f0a6f5d7a
commit
1ae1076d45
|
@ -21,7 +21,7 @@ override LDFLAGS := $(BENCH_LDFLAGS) $(LDFLAGS)
|
|||
|
||||
$(O_DIR)/latmus: override CFLAGS := -I zephyr/latmon/src $(CFLAGS)
|
||||
|
||||
all: output-Makefile $(TARGETS)
|
||||
all: output-Makefile $(DEPFILES) $(TARGETS)
|
||||
|
||||
install: all
|
||||
$(call inst-cmd,benchmarks,$(Q)for bin in $(BINARIES); do \
|
||||
|
@ -31,7 +31,7 @@ install: all
|
|||
clean clobber mrproper: output-Makefile
|
||||
$(Q)$(RM) -f $(TARGETS) $(DEPFILES)
|
||||
|
||||
$(O_DIR)/%: %.c
|
||||
$(O_DIR)/%: %.c $(O_DIR)/%.d
|
||||
$(call ccld-cmd,$@,$(Q)$(CC) -o $(@) $< $(CFLAGS) $(LDFLAGS))
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
|
|
@ -28,7 +28,7 @@ bindir ?= bin
|
|||
testdir ?= tests
|
||||
libexecdir ?= libexec
|
||||
|
||||
export ARCH CROSS_COMPILE CC LD AR UAPI CFLAGS LDFLAGS DESTDIR
|
||||
export ARCH CROSS_COMPILE CC CXX LD AR UAPI CFLAGS LDFLAGS DESTDIR
|
||||
|
||||
MAKEFLAGS += -rR
|
||||
|
||||
|
@ -100,6 +100,9 @@ $(TARGETS):
|
|||
$(O_DIR)/%.d: %.c
|
||||
$(call dep-cmd,$@,@$(CC) -MM $(CFLAGS) $< | sed 's$(comma)\($*\)\.o[ :]*$(comma)$(O_DIR)/\1.o $@: $(comma)g' > $@ || rm -f $@)
|
||||
|
||||
$(O_DIR)/%.d: %.cc
|
||||
$(call dep-cmd,$@,@$(CXX) -MM $(CXXFLAGS) $< | sed 's$(comma)\($*\)\.o[ :]*$(comma)$(O_DIR)/\1.o $@: $(comma)g' > $@ || rm -f $@)
|
||||
|
||||
define MAKEFLY =
|
||||
# Automatically generated: do not edit
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ override CFLAGS := $(LIB_CFLAGS) $(CFLAGS)
|
|||
|
||||
override LDFLAGS := $(LDFLAGS) -lpthread -lrt
|
||||
|
||||
all: output-Makefile $(TARGETS)
|
||||
all: output-Makefile $(DEPFILES) $(TARGETS)
|
||||
|
||||
install: all
|
||||
$(call inst-cmd,$(SOLIBNAME),$(INSTALL) -D $(O_DIR)/$(SOLIBNAME) -t $(DESTDIR)/$(libdir))
|
||||
|
@ -49,10 +49,10 @@ $(O_DIR)/$(ARLIBNAME): $(OBJFILES)
|
|||
$(O_DIR)/version-pic.o $(O_DIR)/version.o: override CFLAGS := $(CFLAGS) -DLIBSERIAL=\"$(EVL_SERIAL)\"
|
||||
version.c: $(O_DIR)/git-stamp.h
|
||||
|
||||
$(O_DIR)/%-pic.o: %.c
|
||||
$(O_DIR)/%-pic.o: %.c $(O_DIR)/%.d
|
||||
$(call cc-pic-cmd,$@,$(CC) $(CFLAGS) -fPIC -c -o $@ $<)
|
||||
|
||||
$(O_DIR)/%.o: %.c
|
||||
$(O_DIR)/%.o: %.c $(O_DIR)/%.d
|
||||
$(call cc-cmd,$@,$(CC) $(CFLAGS) -c -o $@ $<)
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
|
|
@ -27,7 +27,7 @@ override CFLAGS := $(LIB_CFLAGS) $(CFLAGS)
|
|||
|
||||
override LDFLAGS := $(LDFLAGS) -lpthread -lrt
|
||||
|
||||
all: output-Makefile $(TARGETS)
|
||||
all: output-Makefile $(DEPFILES) $(TARGETS)
|
||||
|
||||
install: all
|
||||
$(call inst-cmd,$(SOLIBNAME),$(INSTALL) -D $(O_DIR)/$(SOLIBNAME) -t $(DESTDIR)/$(libdir))
|
||||
|
@ -52,10 +52,10 @@ $(O_DIR)/syscall-pic.o $(O_DIR)/syscall.o: override CFLAGS := $(CFLAGS) -fomit-f
|
|||
$(O_DIR)/version-pic.o $(O_DIR)/version.o: override CFLAGS := $(CFLAGS) -DLIBSERIAL=\"$(EVL_SERIAL)\"
|
||||
version.c: $(O_DIR)/git-stamp.h
|
||||
|
||||
$(O_DIR)/%-pic.o: %.c
|
||||
$(O_DIR)/%-pic.o: %.c $(O_DIR)/%.d
|
||||
$(call cc-pic-cmd,$@,$(CC) $(CFLAGS) -fPIC -c -o $@ $<)
|
||||
|
||||
$(O_DIR)/%.o: %.c
|
||||
$(O_DIR)/%.o: %.c $(O_DIR)/%.d
|
||||
$(call cc-cmd,$@,$(CC) $(CFLAGS) -c -o $@ $<)
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
|
|
@ -33,7 +33,8 @@ ESHI_CPPFLAGS := $(BASE_CPPFLAGS) \
|
|||
-I$(O_DIR)/../include
|
||||
ESHI_CFLAGS := $(ESHI_CPPFLAGS) $(BASE_CFLAGS)
|
||||
|
||||
all: output-Makefile $(TARGETS)
|
||||
all: output-Makefile $(DEPFILES) $(TARGETS)
|
||||
$(Q)$(MAKE) -C compile-tests O=$(O_DIR)/compile-tests V=$(V) $@ || exit 1
|
||||
|
||||
$(TARGETS): $(HELPOBJ) $(HELPOBJ_ESHI)
|
||||
|
||||
|
@ -51,13 +52,13 @@ clean clobber mrproper:
|
|||
$(HELPOBJ_ESHI): $(HELPSRC)
|
||||
$(call cc-cmd,$@,$(Q)$(CC) -o $(@) $< -c $(ESHI_CFLAGS))
|
||||
|
||||
$(O_DIR)/%.o: %.c
|
||||
$(O_DIR)/%.o: %.c $(O_DIR)/%.d
|
||||
$(call cc-cmd,$@,$(Q)$(CC) -o $(@) $< -c $(CFLAGS))
|
||||
|
||||
$(O_DIR)/%: %.c
|
||||
$(O_DIR)/%: %.c $(O_DIR)/%.d
|
||||
$(call ccld-cmd,$@,$(Q)$(CC) -o $(@) $< $(HELPOBJ) $(TEST_CFLAGS) $(TEST_LDFLAGS))
|
||||
|
||||
$(O_DIR)/%.eshi: %.c
|
||||
$(O_DIR)/%.eshi: %.c $(O_DIR)/%.d
|
||||
$(call ccld-cmd,$@,$(Q)$(CC) -o $(@) $< $(HELPOBJ_ESHI) $(ESHI_CFLAGS) $(ESHI_LDFLAGS))
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
|
|
@ -25,7 +25,7 @@ override LDFLAGS := $(CMD_LDFLAGS) $(LDFLAGS)
|
|||
|
||||
$(TARGETS):
|
||||
|
||||
all: output-Makefile $(TARGETS)
|
||||
all: output-Makefile $(DEPFILES) $(TARGETS)
|
||||
|
||||
install: all
|
||||
$(call inst-cmd,utilities, \
|
||||
|
@ -40,7 +40,7 @@ install: all
|
|||
clean clobber mrproper: output-Makefile
|
||||
$(Q)$(RM) -f $(TARGETS) $(DEPFILES)
|
||||
|
||||
$(O_DIR)/%: %.c
|
||||
$(O_DIR)/%: %.c $(O_DIR)/%.d
|
||||
$(call ccld-cmd,$@,$(Q)$(CC) -o $(@) $< $(CFLAGS) $(LDFLAGS))
|
||||
|
||||
-include $(DEPFILES)
|
||||
|
|
Loading…
Reference in New Issue