odyssey/tests/makefile

106 lines
3.6 KiB
Makefile
Raw Normal View History

2016-11-24 13:13:49 +00:00
CC = gcc
RM = rm
CFLAGS = -I. -Wall -g -O0 -I../src
LFLAGS_LIB = ../src/libmachinarium.a -pthread -lssl -lcrypto
LFLAGS = $(LFLAGS_LIB)
2016-11-25 09:56:41 +00:00
TESTS = test_new \
test_create \
test_sleep \
test_wait \
2017-02-01 12:58:28 +00:00
test_condition \
test_condition_2 \
benchmark \
2016-11-25 10:31:06 +00:00
test_io_new \
test_connect \
test_connect_timeout \
test_cancel_connect \
2017-04-12 12:34:50 +00:00
test_cancel_connect_2 \
2017-04-12 13:23:55 +00:00
test_write \
test_read \
test_read_timeout \
2017-04-13 18:51:14 +00:00
test_accept_timeout \
2017-04-13 18:55:57 +00:00
test_cancel_accept \
2017-04-13 18:51:14 +00:00
test_client_server \
test_client_server_ra
# test_getaddrinfo \
test_getaddrinfo_2 \
2017-01-13 09:19:58 +00:00
test_getaddrinfo_3 \
2016-11-25 09:56:41 +00:00
test_cancel_sleep \
test_cancel_sleep_2 \
test_cancel_getaddrinfo \
test_cancel_getaddrinfo_2 \
2016-11-25 11:41:42 +00:00
test_cancel_read \
test_tls_connect \
2016-11-25 11:41:42 +00:00
echo
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
2017-04-14 14:55:15 +00:00
test_sleep_2:
$(CC) $(CFLAGS) test_sleep_2.c $(LFLAGS) -o test_sleep_2
2016-11-25 09:56:41 +00:00
test_wait:
$(CC) $(CFLAGS) test_wait.c $(LFLAGS) -o test_wait
2017-02-01 12:58:28 +00:00
test_condition:
$(CC) $(CFLAGS) test_condition.c $(LFLAGS) -o test_condition
test_condition_2:
$(CC) $(CFLAGS) test_condition_2.c $(LFLAGS) -o test_condition_2
2016-11-25 10:31:06 +00:00
test_io_new:
$(CC) $(CFLAGS) test_io_new.c $(LFLAGS) -o test_io_new
2016-12-07 14:59:01 +00:00
test_getaddrinfo:
$(CC) $(CFLAGS) test_getaddrinfo.c $(LFLAGS) -o test_getaddrinfo
test_getaddrinfo_2:
$(CC) $(CFLAGS) test_getaddrinfo_2.c $(LFLAGS) -o test_getaddrinfo_2
2017-01-13 09:19:58 +00:00
test_getaddrinfo_3:
$(CC) $(CFLAGS) test_getaddrinfo_3.c $(LFLAGS) -o test_getaddrinfo_3
test_connect:
$(CC) $(CFLAGS) test_connect.c $(LFLAGS) -o test_connect
2017-04-12 12:34:50 +00:00
test_write:
$(CC) $(CFLAGS) test_write.c $(LFLAGS) -o test_write
2017-04-12 13:23:55 +00:00
test_read:
$(CC) $(CFLAGS) test_read.c $(LFLAGS) -o test_read
test_read_timeout:
$(CC) $(CFLAGS) test_read_timeout.c $(LFLAGS) -o test_read_timeout
2017-04-13 18:51:14 +00:00
test_accept_timeout:
$(CC) $(CFLAGS) test_accept_timeout.c $(LFLAGS) -o test_accept_timeout
test_connect_timeout:
$(CC) $(CFLAGS) test_connect_timeout.c $(LFLAGS) -o test_connect_timeout
2016-11-25 10:52:02 +00:00
test_client_server:
$(CC) $(CFLAGS) test_client_server.c $(LFLAGS) -o test_client_server
2016-11-30 13:13:49 +00:00
test_client_server_ra:
$(CC) $(CFLAGS) test_client_server_ra.c $(LFLAGS) -o test_client_server_ra
2016-11-25 09:56:41 +00:00
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_cancel_getaddrinfo:
$(CC) $(CFLAGS) test_cancel_getaddrinfo.c $(LFLAGS) -o test_cancel_getaddrinfo
test_cancel_getaddrinfo_2:
$(CC) $(CFLAGS) test_cancel_getaddrinfo_2.c $(LFLAGS) -o test_cancel_getaddrinfo_2
2016-11-25 10:31:06 +00:00
test_cancel_connect:
$(CC) $(CFLAGS) test_cancel_connect.c $(LFLAGS) -o test_cancel_connect
test_cancel_connect_2:
$(CC) $(CFLAGS) test_cancel_connect_2.c $(LFLAGS) -o test_cancel_connect_2
2016-11-25 11:41:42 +00:00
test_cancel_read:
$(CC) $(CFLAGS) test_cancel_read.c $(LFLAGS) -o test_cancel_read
2017-04-13 18:55:57 +00:00
test_cancel_accept:
$(CC) $(CFLAGS) test_cancel_accept.c $(LFLAGS) -o test_cancel_accept
test_tls_connect:
$(CC) $(CFLAGS) test_tls_connect.c $(LFLAGS) -o test_tls_connect
2016-11-25 11:41:42 +00:00
echo:
$(CC) $(CFLAGS) echo.c $(LFLAGS) -o echo
benchmark:
$(CC) $(CFLAGS) benchmark.c $(LFLAGS) -o benchmark
2016-11-24 13:13:49 +00:00
validate:
@if [ ! -f ../src/libmachinarium.a ]; then \
2016-11-24 13:13:49 +00:00
echo ""; \
2017-01-13 09:19:58 +00:00
echo "Please build the static library first."; \
2016-11-24 13:13:49 +00:00
echo ""; \
exit 1; \
fi
clean:
2016-11-24 13:25:40 +00:00
$(RM) -f $(TESTS)