-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
51 lines (38 loc) · 1.71 KB
/
Makefile
File metadata and controls
51 lines (38 loc) · 1.71 KB
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
CC ?= gcc
CFLAGS := -std=c99 -Wall -Wextra -Wpedantic -I src
TESTS := test/test_midi2_msg \
test/test_midi2_proc \
test/test_midi2_ci \
test/test_midi2_conv \
test/test_midi2_dispatch \
test/test_midi2_ci_msg \
test/test_midi2_ci_dispatch \
test/test_midi2_amalgam
.PHONY: all test clean
all: test
test: $(TESTS)
@echo ""
@for t in $(TESTS); do \
echo "--- $$t ---"; \
./$$t || exit 1; \
done
@echo ""
@echo "All tests passed."
test/test_midi2_msg: test/test_midi2_msg.c src/midi2_msg.h
$(CC) $(CFLAGS) -o $@ $<
test/test_midi2_proc: test/test_midi2_proc.c src/midi2_proc.c src/midi2_proc.h src/midi2_msg.h
$(CC) $(CFLAGS) -o $@ test/test_midi2_proc.c src/midi2_proc.c
test/test_midi2_ci: test/test_midi2_ci.c src/midi2_ci.c src/midi2_ci.h src/midi2_proc.c src/midi2_proc.h src/midi2_msg.h
$(CC) $(CFLAGS) -o $@ test/test_midi2_ci.c src/midi2_proc.c src/midi2_ci.c
test/test_midi2_conv: test/test_midi2_conv.c src/midi2_conv.c src/midi2_conv.h src/midi2_msg.h
$(CC) $(CFLAGS) -o $@ test/test_midi2_conv.c src/midi2_conv.c
test/test_midi2_dispatch: test/test_midi2_dispatch.c src/midi2_dispatch.c src/midi2_dispatch.h src/midi2_msg.h
$(CC) $(CFLAGS) -o $@ test/test_midi2_dispatch.c src/midi2_dispatch.c
test/test_midi2_ci_msg: test/test_midi2_ci_msg.c src/midi2_ci_msg.h
$(CC) $(CFLAGS) -o $@ test/test_midi2_ci_msg.c
test/test_midi2_ci_dispatch: test/test_midi2_ci_dispatch.c src/midi2_ci_dispatch.c src/midi2_ci_dispatch.h src/midi2_ci_msg.h
$(CC) $(CFLAGS) -o $@ test/test_midi2_ci_dispatch.c src/midi2_ci_dispatch.c
test/test_midi2_amalgam: test/test_midi2_amalgam.c src/midi2.h
$(CC) $(CFLAGS) -o $@ $<
clean:
rm -f $(TESTS)