mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
make: pie -- Add generation of dep files
Otherwise pie may not be re-built if headers are changed. https://bugzilla.openvz.org/show_bug.cgi?id=2465 Reported-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
96dd1d22d0
commit
e8ca542c6a
13
pie/Makefile
13
pie/Makefile
@@ -14,7 +14,9 @@ ASMFLAGS := -D__ASSEMBLY__
|
||||
|
||||
.DEFAULT_GOAL := pie
|
||||
|
||||
LIB-OBJS = log-simple.o blob-util-net.o $(SYSCALL-LIB)
|
||||
LIB-OBJS := log-simple.o blob-util-net.o
|
||||
DEPS := $(RESTORER-ARCH-OBJS:.o=.d) $(LIB-OBJS:.o=.d)
|
||||
LIB-OBJS += $(SYSCALL-LIB)
|
||||
|
||||
$(PARASITE): $(LIB-OBJS) $(PASM-OBJS) $(PIELDS)
|
||||
$(RESTORER): $(LIB-OBJS) $(RESTORER-ARCH-OBJS) $(PIELDS)
|
||||
@@ -24,6 +26,11 @@ $(PIELDS): $(PIELDS).in
|
||||
$(Q) $(SH) -c "echo 'OUTPUT_ARCH($(LDARCH))' > $(PIELDS)"
|
||||
$(Q) $(SH) -c "cat $(PIELDS).in >> $(PIELDS)"
|
||||
|
||||
blob-util-net.d: $(SRC_DIR)/util-net.c
|
||||
%.d: %.c
|
||||
$(E) " DEP " $@
|
||||
$(Q) $(CC) -M -MT $@ -MT $(patsubst %.d,%.o,$@) $(CFLAGS) $< -o $@
|
||||
|
||||
blob-util-net.o: $(SRC_DIR)/util-net.c
|
||||
$(E) " CC " $@
|
||||
$(Q) $(CC) $(CFLAGS) $< -o $@
|
||||
@@ -50,6 +57,10 @@ blob-util-net.o: $(SRC_DIR)/util-net.c
|
||||
|
||||
pie: $(BLOBS)
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
|
||||
clean:
|
||||
$(E) " CLEAN PIE"
|
||||
$(Q) $(RM) -f ./*-blob.h
|
||||
|
Reference in New Issue
Block a user