criu/compel/test/infect/Makefile
Kir Kolyshkin 2e9ae92784 compel cli: make -p optional
Yet another nail in the coffin of compel cli usage complexity.

Since commit cd1c9d9 ("compel: simplify usage wrt ids") landed,
it became obvious that the newly introduced -p option can be
made optional. First, prefix value is not very important;
second, it can be easily generated from the input (or output)
file name.

This is what this commit does, also trying to check that
the resulting prefix is adeqate for using in C code. In case
it is not (say, file names used are 1.po 1.h), an error
is printed, suggesting to use --prefix.

The commit also makes use of this functionality by removing
-p option from compel/test/infect and criu/pie Makefiles.

While at it, let's also remove -l 4 and the kludge of hiding it.
If the output generated by this is ever needed, one can easily
run "compel hgen -l4 ..." manually.

travis-ci: success for More polishing for compel cli
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-03-15 00:09:57 +03:00

28 lines
564 B
Makefile

CC := gcc
CFLAGS ?= -O2 -g -Wall -Werror
COMPEL := ../../../compel/compel-host
all: victim spy
clean:
rm -f victim
rm -f spy
rm -f parasite.h
rm -f parasite.po
rm -f parasite.o
victim: victim.c
$(CC) $(CFLAGS) -o $@ $^
spy: spy.c parasite.h
$(CC) $(CFLAGS) $(shell $(COMPEL) includes) -o $@ $< $(shell $(COMPEL) --static libs)
parasite.h: parasite.po
$(COMPEL) hgen -o $@ -f $<
parasite.po: parasite.o
ld $(shell $(COMPEL) ldflags) -o $@ $^ $(shell $(COMPEL) plugins)
parasite.o: parasite.c
$(CC) $(CFLAGS) -c $(shell $(COMPEL) cflags) -o $@ $^