diff options
Diffstat (limited to 'tests/Makefile')
-rw-r--r-- | tests/Makefile | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/Makefile b/tests/Makefile index 11f7e2a..ffc80fa 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,12 +1,22 @@ CC?=gcc -CFLAGS?=-Wall -O2 -TARGETS=busy -LIBS?=-lpthread +CFLAGS?=-Wall -g +TARGETS=busy process_iterator_test +SRC=../src +SYSLIBS?=-lpthread +LIBS=$(SRC)/list.o $(SRC)/process_iterator.o $(SRC)/process_group.o +UNAME := $(shell uname) + +ifeq ($(UNAME), FreeBSD) +LIBS+=-lkvm +endif all:: $(TARGETS) -busy: busy.c $(LIBS) - $(CC) -o busy busy.c $(LIBS) $(CFLAGS) +busy: busy.c $(SYSLIBS) + $(CC) -o busy busy.c $(SYSLIBS) $(CFLAGS) + +process_iterator_test: process_iterator_test.c $(LIBS) + $(CC) -I$(SRC) -o process_iterator_test process_iterator_test.c $(LIBS) $(SYSLIBS) $(CFLAGS) clean: rm -f *~ *.o $(TARGETS) |