summaryrefslogtreecommitdiff
path: root/tests/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile')
-rw-r--r--tests/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
new file mode 100644
index 0000000..c48d0b0
--- /dev/null
+++ b/tests/Makefile
@@ -0,0 +1,25 @@
1CC=../x86_64-linux-musl-native/bin/gcc
2CFLAGS=-I../include/ -D_FORTIFY_SOURCE=3 -static -O2
3
4TARGETS=test_memcpy_static_write \
5 test_memcpy_dynamic_write \
6 test_memcpy_static_read \
7 test_memcpy_dynamic_read
8
9.SILENT:
10
11all: $(TARGETS) run
12
13$(TARGETS): %: %.c
14 $(CC) $(CFLAGS) -o $@ $<
15
16run: $(TARGETS)
17 $(foreach EXE, $(TARGETS), \
18 ./$(EXE) 1 2 3 4 5 6 7 8 9 0 >/dev/null && echo "$(EXE) OK" || echo "$(EXE) FAIL" ; \
19 )
20
21clean:
22 $(foreach EXE, $(TARGETS), \
23 rm -f ./$(EXE) \
24 )
25