mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-25 02:58:54 +00:00
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>
30 lines
493 B
Makefile
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 $@ $^
|