criu/test/zdtm/lib/Makefile
Valeriy Vdovin fa705e418b zdtm: Use safe helper function to initialize unix socket sockaddr structure
The helper function removes code duplication from tests that want to
initialize unix socket address to an absolute file path, derived from
current working directory of the test + relative filename of a resulting
socket. Because the former code used cwd = get_current_dir_name() as
part of absolute filename generation, the resulting filepath could later
cause failure of bind systcall due to unchecked permissions and
introduce confusing permission errors.

Signed-off-by: Valeriy Vdovin <valeriy.vdovin@virtuozzo.com>
2020-03-27 19:36:20 +03:00

30 lines
493 B
Makefile

LIBDIR := .
CFLAGS += $(USERCFLAGS)
LIB := libzdtmtst.a
LIBSRC := datagen.c msg.c parseargs.c test.c streamutil.c lock.c ns.c tcp.c unix.c fs.c sysctl.c
LIBOBJ := $(LIBSRC:%.c=%.o)
BIN := groups
SRC := $(LIBSRC) groups.c
DEP := $(SRC:%.c=%.d)
OBJ := $(SRC:%.c=%.o)
LDLIBS := $(LIB)
TARGETS := $(LIB) $(BIN)
include ../Makefile.inc
all: $(TARGETS)
.PHONY: all
clean-more:
$(RM) $(TARGETS)
.PHONY: clean-more
clean: clean-more
$(LIB): $(LIBOBJ)
$(E) " AR " $@
$(Q)ar rcs $@ $^