Add 'test-install' rule. Allow 'prefix' variable to be overloaded. Signed-off-by: Radu Patriu Upstream-Status: Pending Index: numad/Makefile =================================================================== --- numad.orig/Makefile 2014-05-13 00:17:16.094991993 +0300 +++ numad/Makefile 2014-05-13 00:22:22.318986948 +0300 @@ -22,21 +22,23 @@ BENCH_CFLAGS += -ftree-vectorize endif -CLEANFILES := numad.o numad .depend .depend.X empty.c empty.o +CLEANFILES := numad.o numad .depend .depend.X empty.c empty.o test.o test -SOURCES := numad.c +SOURCES := numad.c test.c -prefix := /usr +prefix ?= /usr docdir := ${prefix}/share/doc all: numad numad: numad.o -lpthread -lrt +test: test.o -lnuma + AR ?= ar RANLIB ?= ranlib -.PHONY: install all clean html depend +.PHONY: install all clean html depend -lpthread -lrt -lnuma # BB_FIXME MANPAGES := numa.3 numactl.8 numastat.8 migratepages.8 migspeed.8 @@ -46,6 +48,11 @@ install -m 0755 numad ${prefix}/bin install -m 0644 numad.8 ${prefix}/share/man/man8 +TEST_DESTDIR ?= ${prefix}/lib/numad/ptest +test-install: test + install -d ${TEST_DESTDIR} + install test ${TEST_DESTDIR} + clean: rm -f ${CLEANFILES} @rm -rf html