Commit 5204a193 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

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: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 29f9e6e2
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
......
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment