Commit 7aee2619 authored by Pavel Emelyanov's avatar Pavel Emelyanov

test: Cleanup libcriu tests makefile

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 43e5d051
all: test_sub test_self test_notify
.PHONY: all
TESTS += test_sub
TESTS += test_self
TESTS += test_notify
all: $(TESTS)
run: all
./run.sh
test_sub: test_sub.o lib.o
gcc $^ -L ../../lib -lcriu -o $@
test_sub.o: test_sub.c
gcc -c $^ -I ../../lib -o $@
test_self: test_self.o lib.o
gcc $^ -L ../../lib -lcriu -o $@
define genb
$(1): $(1).o lib.o
gcc $$^ -L ../../lib -lcriu -o $$@
endef
test_self.o: test_self.c
gcc -c $^ -I ../../lib -o $@
$(foreach t, $(TESTS), $(eval $(call genb, $(t))))
test_notify: test_notify.o lib.o
gcc $^ -L ../../lib -lcriu -o $@
test_notify.o: test_notify.c
gcc -c $^ -I ../../lib -o $@
lib.o: lib.c
gcc -c $^ -I ../../lib -o $@
%.o: %.c
gcc -c $^ -I../../lib/ -o $@ -Werror
clean:
rm -rf test_sub test_sub.o test_self test_sub.o test_notify test_notify.o
rm -rf $(TESTS) $(TESTS:%=%.o) lib.o
.PHONY: clean
.PHONY: all
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