2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

Always use ARCH_DIR

The top-level makefile defines an ARCH_DIR variable. Always use
it rather than referencing ARCH directly, since ARCH may be set
by the user on the command line and that raw input may not be
what needs to be used internally.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Christopher Covington 2014-02-07 12:04:37 -05:00 committed by Pavel Emelyanov
parent f287d29ebe
commit 89bb170a26
3 changed files with 12 additions and 12 deletions

View File

@ -101,8 +101,8 @@ else
endif
CFLAGS += $(WARNINGS) $(DEFINES)
SYSCALL-LIB := arch/$(ARCH)/syscalls.built-in.o
ARCH-LIB := arch/$(ARCH)/crtools.built-in.o
SYSCALL-LIB := $(ARCH_DIR)/syscalls.built-in.o
ARCH-LIB := $(ARCH_DIR)/crtools.built-in.o
CRIU-SO := libcriu
CRIU-LIB := lib/$(CRIU-SO).so
CRIU-INC := lib/criu.h include/criu-plugin.h include/criu-log.h protobuf/rpc.proto
@ -126,7 +126,7 @@ build-crtools := -r -R -f scripts/Makefile.build makefile=Makefile.crtools obj
PROGRAM := criu
.PHONY: all zdtm test rebuild clean distclean tags cscope \
docs help pie protobuf arch/$(ARCH) clean-built lib
docs help pie protobuf $(ARCH_DIR) clean-built lib
ifeq ($(GCOV),1)
%.o $(PROGRAM): override CFLAGS += --coverage
@ -140,14 +140,14 @@ protobuf/%::
protobuf:
$(Q) $(MAKE) $(build)=protobuf all
arch/$(ARCH)/%:: protobuf
$(Q) $(MAKE) $(build)=arch/$(ARCH) $@
arch/$(ARCH): protobuf
$(Q) $(MAKE) $(build)=arch/$(ARCH) all
$(ARCH_DIR)/%:: protobuf
$(Q) $(MAKE) $(build)=$(ARCH_DIR) $@
$(ARCH_DIR): protobuf
$(Q) $(MAKE) $(build)=$(ARCH_DIR) all
pie/%:: arch/$(ARCH)
pie/%:: $(ARCH_DIR)
$(Q) $(MAKE) $(build)=pie $@
pie: arch/$(ARCH)
pie: $(ARCH_DIR)
$(Q) $(MAKE) $(build)=pie all
%.o %.i %.s %.d: $(VERSION_HEADER) pie
@ -181,7 +181,7 @@ test: zdtm
clean-built:
$(Q) $(RM) $(VERSION_HEADER)
$(Q) $(MAKE) $(build)=arch/$(ARCH) clean
$(Q) $(MAKE) $(build)=$(ARCH_DIR) clean
$(Q) $(MAKE) $(build)=protobuf clean
$(Q) $(MAKE) $(build)=pie clean
$(Q) $(MAKE) $(build)=lib clean

View File

@ -57,7 +57,7 @@ obj-y += kerndat.o
obj-y += stats.o
obj-y += string.o
obj-y += sigframe.o
obj-y += arch/$(ARCH)/vdso.o
obj-y += $(ARCH_DIR)/vdso.o
obj-y += cr-service.o
obj-y += sd-daemon.o
obj-y += plugin.o

View File

@ -2,7 +2,7 @@ lib-so += $(CRIU-SO)
obj-y += criu.o
obj-ext-src-y += protobuf/rpc.pb-c.o
includes += -iquote $(obj)/../arch/$(ARCH)/include -iquote $(obj)/../include -iquote $(obj)/.. -iquote $(obj)/../protobuf
includes += -iquote $(obj)/../$(ARCH_DIR)/include -iquote $(obj)/../include -iquote $(obj)/.. -iquote $(obj)/../protobuf
cflags-y += $(includes) -fPIC -Wa,--noexecstack -fno-stack-protector
cflags-so += $(CFLAGS) -rdynamic -Wl,-soname,$(lib-so).so.$(VERSION_SO_MAJOR)
ldflags-so += -lprotobuf-c