aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile
diff options
context:
space:
mode:
authorAngelo Marletta <angelo.marletta@gmail.com>2012-06-07 16:42:46 +0100
committerAngelo Marletta <angelo.marletta@gmail.com>2012-06-07 16:42:46 +0100
commit10c2915dd464de44047f182ecae9c8b34e24e772 (patch)
tree63938b5a5ed16bfc9ad865fb1a809ac4f1ec738c /tests/Makefile
parentcedb83232379d80a9abd2ca72e60d64e5b50d92b (diff)
downloadcpulimit-10c2915dd464de44047f182ecae9c8b34e24e772.tar.gz
new cross-platform code to list processes. works on linux and freebsd
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 11f7e2a..7f1c8b4 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,13 +1,22 @@
CC?=gcc
CFLAGS?=-Wall -O2
-TARGETS=busy
+TARGETS=busy process_iterator_test
LIBS?=-lpthread
+UNAME := $(shell uname)
+
+ifeq ($(UNAME), FreeBSD)
+LIBS+=-lkvm
+endif
+
all:: $(TARGETS)
busy: busy.c $(LIBS)
$(CC) -o busy busy.c $(LIBS) $(CFLAGS)
+process_iterator_test: process_iterator_test.c $(LIBS)
+ $(CC) -I../src -o process_iterator_test process_iterator_test.c ../src/process_iterator.o $(LIBS) $(CFLAGS)
+
clean:
rm -f *~ *.o $(TARGETS)
Un proyecto texto-plano.xyz