summaryrefslogtreecommitdiffstats
path: root/recipes-core/numad/numad-0.6/Makefile.patch
blob: f6a564d326bc27fd087669fc6a42f4469966c7a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Add 'test-install' rule.
Allow 'prefix' variable to be overloaded.

Signed-off-by: Radu Patriu <radu.patriu@enea.com>
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