mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 15:55:53 +00:00
test/zdtm: use separate compile/link
For compatibility with ccache (so it can cache the compilation results), let's compile and link separately. For this, we have to - disable the implicit make rules - write the explicit ones While at it, do use the "silent make" stuff that is already here FIXME: figure out if it helps to speed up ccache build Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
29f9e6e2f1
commit
5204a193e7
@@ -1,4 +1,5 @@
|
|||||||
include ../Makefile.inc
|
include ../Makefile.inc
|
||||||
|
.SUFFIXES: # No implicit rules
|
||||||
|
|
||||||
LIBDIR = ../lib
|
LIBDIR = ../lib
|
||||||
LIB = $(LIBDIR)/libzdtmtst.a
|
LIB = $(LIBDIR)/libzdtmtst.a
|
||||||
@@ -313,9 +314,15 @@ OUT = $(TST:%=%.out)
|
|||||||
STATE = $(TST_STATE:%=%.state)
|
STATE = $(TST_STATE:%=%.state)
|
||||||
STATE_OUT = $(TST_STATE:%=%.out)
|
STATE_OUT = $(TST_STATE:%=%.out)
|
||||||
|
|
||||||
%: %.c
|
%.o: %.c
|
||||||
$(Q)echo $@ >> .gitignore
|
@echo $@ >> .gitignore
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LOADLIBES) $^ $(LDLIBS) -o $@
|
$(E) " CC " $@
|
||||||
|
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
%: %.o
|
||||||
|
@echo $@ >> .gitignore
|
||||||
|
$(E) " LINK " $@
|
||||||
|
$(Q)$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||||
|
|
||||||
all: $(TST) criu-rtc.so
|
all: $(TST) criu-rtc.so
|
||||||
install: all
|
install: all
|
||||||
@@ -390,7 +397,7 @@ wait_stop:
|
|||||||
i=`expr $$i + 1`; \
|
i=`expr $$i + 1`; \
|
||||||
done
|
done
|
||||||
|
|
||||||
$(TST): $(LIB)
|
$(TST): | $(LIB)
|
||||||
|
|
||||||
aio00: override LDLIBS += -laio
|
aio00: override LDLIBS += -laio
|
||||||
different_creds: override LDLIBS += -lcap
|
different_creds: override LDLIBS += -lcap
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
include ../Makefile.inc
|
include ../Makefile.inc
|
||||||
|
.SUFFIXES: # No implicit rules
|
||||||
|
|
||||||
LIBDIR = ../lib
|
LIBDIR = ../lib
|
||||||
LIB = $(LIBDIR)/libzdtmtst.a
|
LIB = $(LIBDIR)/libzdtmtst.a
|
||||||
@@ -40,9 +41,15 @@ DEP = $(SRC:%.c=%.d)
|
|||||||
PID = $(TST:%=%.pid)
|
PID = $(TST:%=%.pid)
|
||||||
OUT = $(TST:%=%.out)
|
OUT = $(TST:%=%.out)
|
||||||
|
|
||||||
%: %.c
|
%.o: %.c
|
||||||
$(Q)echo $@ >> .gitignore
|
@echo $@ >> .gitignore
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LOADLIBES) $^ $(LDLIBS) -o $@
|
$(E) " CC " $@
|
||||||
|
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
%: %.o
|
||||||
|
@echo $@ >> .gitignore
|
||||||
|
$(E) " LINK " $@
|
||||||
|
$(Q)$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||||
|
|
||||||
all: $(TST)
|
all: $(TST)
|
||||||
install: all
|
install: all
|
||||||
@@ -74,7 +81,7 @@ wait_stop:
|
|||||||
sleep 1; \
|
sleep 1; \
|
||||||
done
|
done
|
||||||
|
|
||||||
$(TST): $(LIB)
|
$(TST): | $(LIB)
|
||||||
|
|
||||||
file_aio: override LDLIBS += -lrt -pthread
|
file_aio: override LDLIBS += -lrt -pthread
|
||||||
socket-tcp: override CFLAGS += -D STREAM
|
socket-tcp: override CFLAGS += -D STREAM
|
||||||
|
Reference in New Issue
Block a user