summaryrefslogtreecommitdiff
path: root/tests/port/GNUmakefile
blob: 64e3fe6234850ae0b5f58d5ba22fe6ce5680d898 (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
51
52
53
54
55
56
57
58
59
TOPDIR = ../..

INCLUDE_DIRS = \
	-I$(TOPDIR)/include/wolf -I. -I$(TOPDIR)/src

INCLUDE_LIBS = \
	$(TOPDIR)/src/libwolf.a

TEST_BINS = \
	test_strdup$(EXE) \
	test_strerror_r$(EXE) \
	test_strcasecmp$(EXE) \
	test_strncasecmp$(EXE) \
	test_localtime_r$(EXE) \
	test_snprintf$(EXE) \
	test_strlcpy$(EXE) \
	test_strlcat$(EXE) \
	test_itoa$(EXE) \
	test_getaddrinfo$(EXE) \
	test_gai_strerror_r$(EXE)

-include $(TOPDIR)/makefiles/gmake/sub.mk

# snprintf has some quirks, mainly -Wfloat-equal doesn't allow the
# definition of ISNAN, ISINF, the C99 versions use math.h, ieee.h
# libmath and more, which is maybe not really acceptable for a core
# port (on the other hand so isn't NLS support!)
test_snprintf.o : test_snprintf.c $(TOPDIR)/include/wolf/port/stdio.h $(TOPDIR)/src/port/snprintf.h $(TOPDIR)/src/port/snprintf.c
	$(CC) $(STD99_COMPILE_FLAGS) -c -o $@ $(PLATFORM_COMPILE_FLAGS) $(INCLUDE_DIRS) $<

local_all:
	
local_clean:

local_distclean:

local_test:
	@echo "Testing strdup.."
	@./test_strdup >/dev/null
	@echo "Testing strerror_r..."
	@./test_strerror_r >/dev/null
	@echo "Testing strcasecmp.."
	@./test_strcasecmp >/dev/null
	@echo "Testing strncasecmp.."
	@./test_strncasecmp >/dev/null
	@echo "Testing localtime_r.."
	@./test_localtime_r >/dev/null
	@echo "Testing snprintf.."
	@./test_snprintf > /dev/null
	@echo "Testing strlcpy.."
	@./test_strlcpy > /dev/null
	@echo "Testing strlcat.."
	@./test_strlcat > /dev/null
	@echo "Testing itoa.."
	@./test_itoa > /dev/null
	@echo "Testing getaddrinfo.."
	@./test_getaddrinfo > /dev/null
	@echo "Testing gai_strerror_r.."
	@./test_gai_strerror_r > /dev/null