-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
102 lines (83 loc) · 1.82 KB
/
Makefile
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
VPATH = src
BASE =\
error.c \
state_base.c
COMMON =\
line_common.c
SRCS =\
analysis.c \
clipboard.c \
editor.c \
editor_buffers.c \
editor_extra.c \
editor_tests.c \
editor_test_content.c \
ld_parse.c \
line_parse.c \
line_parse_common.c \
line_dump_common.c \
line_dump.c \
peer_unit.c \
peer_posix_screen.c \
peer_text_screen.c \
scratch.c \
state_dump.c \
state_parse.c \
test_content.c \
unittests.c
POSIX = \
peer_posix.c \
peer_file_posix.c \
peer_posix_screen.c \
peer_text_screen.c
SAIMPORT =\
ld_parse.c \
line_parse.c \
line_parse_common.c \
line_dump.c \
line_dump_common.c \
state_dump.c \
saimport.c \
scratch.c \
state_parse.c
SAEXPORT =\
line_dump.c \
line_dump_common.c \
state_dump.c \
saexport.c
SALINK =\
link_obj.c \
map.c \
queued_files.c \
salink.c \
expression.c
SAMAKE =\
samake.c
TEST_CONTENT_ZX =\
test_content.c \
test_content_zx.c
CFLAGS += -Wall -MMD -DUNITTESTS -Isrc
all: unittests saimport saexport salink samake
unittests: $(BASE:%.c=%.o) $(COMMON:%.c=%.o) $(SRCS:%.c=%.o)
$(CC) $(CFLAGS) -o $@ $^
saimport: $(BASE:%.c=%.o) $(COMMON:%.c=%.o) $(POSIX:%.c=%.o) $(SAIMPORT:%.c=%.o)
$(CC) $(CFLAGS) -o $@ $^
saexport: $(BASE:%.c=%.o) $(COMMON:%.c=%.o) $(POSIX:%.c=%.o) $(SAEXPORT:%.c=%.o)
$(CC) $(CFLAGS) -o $@ $^
salink: $(BASE:%.c=%.o) $(POSIX:%.c=%.o) $(SALINK:%.c=%.o)
$(CC) $(CFLAGS) -o $@ $^
test_content_zx: $(TEST_CONTENT_ZX:%.c=%.o)
$(CC) $(CFLAGS) -o $@ $^
samake: $(BASE:%.c=%.o) $(POSIX:%.c=%.o) $(SAMAKE:%.c=%.o)
$(CC) $(CFLAGS) -o $@ $^
clean:
- rm *.d *.o unittests saimport saexport salink samake
-include $(BASE:%.c=%.d)
-include $(COMMON:%.c=%.d)
-include $(SRCS:%.c=%.d)
-include $(POSIX:%.c=%.d)
-include $(SAIMPORT:%.c=%.d)
-include $(SAEXPORT:%.c=%.d)
-include $(SALINK:%.c=%.d)
-include $(SAMAKE:%.c=%.d)
-include $(TEST_CONTENT_ZX:%.c=%.d)