mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 10:16:41 +00:00
In case if CFLAGS is overriden from command line we don't see our headers anymore. So provide mandatory options in ccflags-y variable to fix that. https://bugzilla.openvz.org/show_bug.cgi?id=2521 Reported-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Tested-by: Alexander Kartashov <alekskartashov@parallels.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
51 lines
1.2 KiB
Makefile
51 lines
1.2 KiB
Makefile
targets += parasite
|
|
targets += restorer
|
|
|
|
obj-y += log-simple.o
|
|
obj-y += util-net.o
|
|
|
|
parasite-obj-y += parasite.o
|
|
parasite-asm-e += $(ARCH_DIR)/parasite-head.o
|
|
parasite-libs-e += $(SYSCALL-LIB)
|
|
|
|
restorer-obj-y += restorer.o
|
|
restorer-obj-e += $(ARCH_DIR)/restorer.o
|
|
restorer-libs-e += $(SYSCALL-LIB)
|
|
|
|
cflags-y += -fpie -Wa,--noexecstack -fno-strict-aliasing
|
|
ASMFLAGS += -D__ASSEMBLY__
|
|
|
|
GEN-OFFSETS := gen-offsets.sh
|
|
BLOBS := $(obj)/parasite-blob.h $(obj)/restorer-blob.h
|
|
|
|
PIELDS := pie.lds.S
|
|
|
|
.SECONDARY:
|
|
|
|
$(obj)/$(PIELDS): $(obj)/$(PIELDS).in
|
|
$(E) " GEN " $@
|
|
$(Q) $(SH) -c "echo 'OUTPUT_ARCH($(LDARCH))' > $(obj)/$(PIELDS)"
|
|
$(Q) $(SH) -c "cat $(obj)/$(PIELDS).in >> $(obj)/$(PIELDS)"
|
|
|
|
$(obj)/%.built-in.bin.o: $(obj)/%.built-in.o $(obj)/$(PIELDS)
|
|
$(E) " GEN " $@
|
|
$(Q) $(LD) -T $(obj)/$(PIELDS) -o $@ $<
|
|
|
|
$(obj)/%.built-in.bin: $(obj)/%.built-in.bin.o
|
|
$(E) " GEN " $@
|
|
$(Q) $(OBJCOPY) -O binary $^ $@
|
|
|
|
$(obj)/%-blob.h: $(obj)/%.built-in.bin $(obj)/$(GEN-OFFSETS)
|
|
$(E) " GEN " $@
|
|
$(Q) $(SH) $(obj)/$(GEN-OFFSETS) $(@:-blob.h=) $(notdir $(@:-blob.h=)) > $@
|
|
|
|
$(BLOBS): $(obj)/$(PIELDS)
|
|
_all += $(BLOBS)
|
|
|
|
cleanup-y += $(obj)/$(PIELDS)
|
|
cleanup-y += $(obj)/*.bin
|
|
cleanup-y += $(BLOBS)
|
|
|
|
ifneq ($(MAKECMDGOALS),clean)
|
|
incdeps := y
|
|
endif
|