diff options
Diffstat (limited to 'tests/Makefile')
| -rw-r--r-- | tests/Makefile | 25 |
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 @@ | |||
| 1 | CC=../x86_64-linux-musl-native/bin/gcc | ||
| 2 | CFLAGS=-I../include/ -D_FORTIFY_SOURCE=3 -static -O2 | ||
| 3 | |||
| 4 | TARGETS=test_memcpy_static_write \ | ||
| 5 | test_memcpy_dynamic_write \ | ||
| 6 | test_memcpy_static_read \ | ||
| 7 | test_memcpy_dynamic_read | ||
| 8 | |||
| 9 | .SILENT: | ||
| 10 | |||
| 11 | all: $(TARGETS) run | ||
| 12 | |||
| 13 | $(TARGETS): %: %.c | ||
| 14 | $(CC) $(CFLAGS) -o $@ $< | ||
| 15 | |||
| 16 | run: $(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 | |||
| 21 | clean: | ||
| 22 | $(foreach EXE, $(TARGETS), \ | ||
| 23 | rm -f ./$(EXE) \ | ||
| 24 | ) | ||
| 25 | |||
