selftests/capabilities: clean up for Makefile
Clean up the following things: 1. Avoid the broken when use TARGETS in the command line, eg: $ make -C tools/testing/selftests TARGETS=capabilities make[1]: *** No rule to make target 'capabilities', needed by 'all'. Stop. Replace TARGETS with BINARIES. 2. User need to provide cap-ng.h and libcap-ng.so for cross compiling. Replace ':=' with '+=' for CFLAGS and introduce LDLIBS to archieve it. Delete useless EXTRA_CLAGS at the same time. 3. Delete the duplicated definition which is already defined by lib.mk. Suggested-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:
parent
8005c49d9a
commit
d3edeb47d8
1 changed files with 12 additions and 15 deletions
|
@ -1,18 +1,15 @@
|
|||
all:
|
||||
TEST_FILES := validate_cap
|
||||
TEST_PROGS := test_execve
|
||||
|
||||
BINARIES := $(TEST_FILES) $(TEST_PROGS)
|
||||
|
||||
CFLAGS += -O2 -g -std=gnu99 -Wall
|
||||
LDLIBS += -lcap-ng -lrt -ldl
|
||||
|
||||
all: $(BINARIES)
|
||||
|
||||
clean:
|
||||
$(RM) $(BINARIES)
|
||||
|
||||
include ../lib.mk
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
TARGETS := validate_cap test_execve
|
||||
TEST_PROGS := test_execve
|
||||
|
||||
CFLAGS := -O2 -g -std=gnu99 -Wall -lcap-ng
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
clean:
|
||||
$(RM) $(TARGETS)
|
||||
|
||||
$(TARGETS): %: %.c
|
||||
$(CC) -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl
|
||||
|
|
Loading…
Reference in a new issue