mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +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
|
||||
.SUFFIXES: # No implicit rules
|
||||
|
||||
LIBDIR = ../lib
|
||||
LIB = $(LIBDIR)/libzdtmtst.a
|
||||
@@ -313,9 +314,15 @@ OUT = $(TST:%=%.out)
|
||||
STATE = $(TST_STATE:%=%.state)
|
||||
STATE_OUT = $(TST_STATE:%=%.out)
|
||||
|
||||
%: %.c
|
||||
$(Q)echo $@ >> .gitignore
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LOADLIBES) $^ $(LDLIBS) -o $@
|
||||
%.o: %.c
|
||||
@echo $@ >> .gitignore
|
||||
$(E) " CC " $@
|
||||
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
%: %.o
|
||||
@echo $@ >> .gitignore
|
||||
$(E) " LINK " $@
|
||||
$(Q)$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
all: $(TST) criu-rtc.so
|
||||
install: all
|
||||
@@ -390,7 +397,7 @@ wait_stop:
|
||||
i=`expr $$i + 1`; \
|
||||
done
|
||||
|
||||
$(TST): $(LIB)
|
||||
$(TST): | $(LIB)
|
||||
|
||||
aio00: override LDLIBS += -laio
|
||||
different_creds: override LDLIBS += -lcap
|
||||
|
@@ -1,4 +1,5 @@
|
||||
include ../Makefile.inc
|
||||
.SUFFIXES: # No implicit rules
|
||||
|
||||
LIBDIR = ../lib
|
||||
LIB = $(LIBDIR)/libzdtmtst.a
|
||||
@@ -40,9 +41,15 @@ DEP = $(SRC:%.c=%.d)
|
||||
PID = $(TST:%=%.pid)
|
||||
OUT = $(TST:%=%.out)
|
||||
|
||||
%: %.c
|
||||
$(Q)echo $@ >> .gitignore
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LOADLIBES) $^ $(LDLIBS) -o $@
|
||||
%.o: %.c
|
||||
@echo $@ >> .gitignore
|
||||
$(E) " CC " $@
|
||||
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
%: %.o
|
||||
@echo $@ >> .gitignore
|
||||
$(E) " LINK " $@
|
||||
$(Q)$(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@
|
||||
|
||||
all: $(TST)
|
||||
install: all
|
||||
@@ -74,7 +81,7 @@ wait_stop:
|
||||
sleep 1; \
|
||||
done
|
||||
|
||||
$(TST): $(LIB)
|
||||
$(TST): | $(LIB)
|
||||
|
||||
file_aio: override LDLIBS += -lrt -pthread
|
||||
socket-tcp: override CFLAGS += -D STREAM
|
||||
|
Reference in New Issue
Block a user