2016-11-24 13:13:49 +00:00
|
|
|
CC = gcc
|
|
|
|
RM = rm
|
|
|
|
CFLAGS = -I. -Wall -g -O0 -I../machinarium
|
|
|
|
LFLAGS_LIB = ../machinarium/libmachinarium.a
|
2016-11-24 13:50:43 +00:00
|
|
|
LFLAGS_LIB_UV = ~/temp/libuv/.libs/libuv.a -pthread
|
|
|
|
LFLAGS = $(LFLAGS_LIB) $(LFLAGS_LIB_UV)
|
2016-11-25 09:56:41 +00:00
|
|
|
TESTS = test_new \
|
|
|
|
test_create \
|
|
|
|
test_sleep \
|
|
|
|
test_wait \
|
|
|
|
test_cancel_sleep \
|
|
|
|
test_cancel_sleep_2 \
|
|
|
|
test_io_new
|
2016-11-24 13:25:40 +00:00
|
|
|
all: validate clean $(TESTS)
|
2016-11-25 09:56:41 +00:00
|
|
|
test_new:
|
|
|
|
$(CC) $(CFLAGS) test_new.c $(LFLAGS) -o test_new
|
|
|
|
test_create:
|
|
|
|
$(CC) $(CFLAGS) test_create.c $(LFLAGS) -o test_create
|
|
|
|
test_sleep:
|
|
|
|
$(CC) $(CFLAGS) test_sleep.c $(LFLAGS) -o test_sleep
|
|
|
|
test_wait:
|
|
|
|
$(CC) $(CFLAGS) test_wait.c $(LFLAGS) -o test_wait
|
|
|
|
test_cancel_sleep:
|
|
|
|
$(CC) $(CFLAGS) test_cancel_sleep.c $(LFLAGS) -o test_cancel_sleep
|
|
|
|
test_cancel_sleep_2:
|
|
|
|
$(CC) $(CFLAGS) test_cancel_sleep_2.c $(LFLAGS) -o test_cancel_sleep_2
|
|
|
|
test_io_new:
|
|
|
|
$(CC) $(CFLAGS) test_io_new.c $(LFLAGS) -o test_io_new
|
2016-11-24 13:13:49 +00:00
|
|
|
validate:
|
|
|
|
@if [ ! -f $(LFLAGS_LIB) ]; then \
|
|
|
|
echo ""; \
|
|
|
|
echo "Please build the library first."; \
|
|
|
|
echo ""; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
clean:
|
2016-11-24 13:25:40 +00:00
|
|
|
$(RM) -f $(TESTS)
|