-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
222 lines (182 loc) · 6.79 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
OS:=$(shell uname -s)
CC=gcc
CFLAGS=-B /usr/ -c
common_libs=-lm
linux_libs=-lgsl -lgslcblas
qnx_libs=-lsocket
INCLUDES=-I"/usr/include/" -I"../include/" -I"include/" -I"../tsg/include"
SOURCES=main.c _open_PLX9050.c _prog_conventions.c utils.c
OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=phasing_calibration
ATTEN_SOURCES=atten_calibration.c _open_PLX9050.c _prog_conventions.c utils.c
ATTEN_OBJECTS=$(ATTEN_SOURCES:.c=.o)
ATTEN_EXECUTABLE=atten_calibration
RF_SOURCES=rf_cal.c _open_PLX9050.c _prog_conventions.c utils.c
RF_OBJECTS=$(RF_SOURCES:.c=.o)
RF_EXECUTABLE=rf_calibration
CONVERT_SOURCES=time_delay.c
CONVERT_OBJECTS=$(CONVERT_SOURCES:.c=.o)
CONVERT_EXECUTABLE=time_delay
VERIFY_SOURCES=verifier.c
VERIFY_OBJECTS=$(VERIFY_SOURCES:.c=.o)
VERIFY_EXECUTABLE=verifier
ATTEN_VERIFY_SOURCES=atten_verifier.c
ATTEN_VERIFY_OBJECTS=$(ATTEN_VERIFY_SOURCES:.c=.o)
ATTEN_VERIFY_EXECUTABLE=atten_verifier
VERIFY_PROGRAMMED_SOURCES=verify_programmed_beamcodes.c _open_PLX9050.c _prog_conventions.c utils.c
VERIFY_PROGRAMMED_OBJECTS=$(VERIFY_PROGRAMMED_SOURCES:.c=.o)
VERIFY_PROGRAMMED_EXECUTABLE=verify_programmed_beamcodes
CHECK_PROGRAMMED_SOURCES=check_programmed_beamcodes.c _open_PLX9050.c _prog_conventions.c utils.c
CHECK_PROGRAMMED_OBJECTS=$(CHECK_PROGRAMMED_SOURCES:.c=.o)
CHECK_PROGRAMMED_EXECUTABLE=check_programmed_beamcodes
CHECK_RADAR_SOURCES=check_radar_settings.c _open_PLX9050.c _prog_conventions.c utils.c
CHECK_RADAR_OBJECTS=$(CHECK_RADAR_SOURCES:.c=.o)
CHECK_RADAR_EXECUTABLE=check_radar_settings
SELECT_BEAM_SOURCES=select_beam.c _open_PLX9050.c _prog_conventions.c utils.c
SELECT_BEAM_OBJECTS=$(SELECT_BEAM_SOURCES:.c=.o)
SELECT_BEAM_EXECUTABLE=select_beam
COMPARE_SOURCES=time_compare.c
COMPARE_OBJECTS=$(COMPARE_SOURCES:.c=.o)
COMPARE_EXECUTABLE=time_delay_compare
BEAM_SOURCES=beamcode_generator.c
BEAM_OBJECTS=$(BEAM_SOURCES:.c=.o)
BEAM_EXECUTABLE=beamcode_generator
SUMMARY_SOURCES=summary_generator.c
SUMMARY_OBJECTS=$(SUMMARY_SOURCES:.c=.o)
SUMMARY_EXECUTABLE=summary_generator
FINAL_SOURCES=write_final_beamcodes.c _open_PLX9050.c _prog_conventions.c utils.c
FINAL_OBJECTS=$(FINAL_SOURCES:.c=.o)
FINAL_EXECUTABLE=write_final_beamcodes
SELECT_SOURCES=select_final_beamcodes.c
SELECT_OBJECTS=$(SELECT_SOURCES:.c=.o)
SELECT_EXECUTABLE=select_final_beamcodes
DIO_OUTPUT_SOURCES=dio_output_test.c _open_PLX9050.c _prog_conventions.c utils.c
DIO_OUTPUT_OBJECTS=$(DIO_OUTPUT_SOURCES:.c=.o)
DIO_OUTPUT_EXECUTABLE=dio_output_test
ATTEN_TEST_SOURCES=attenuator_test.c _open_PLX9050.c _prog_conventions.c utils.c
ATTEN_TEST_OBJECTS=$(ATTEN_TEST_SOURCES:.c=.o)
ATTEN_TEST_EXECUTABLE=attenuator_test
all: $(SOURCES) $(EXECUTABLE) $(SUMMARY_SOURCES) $(SUMMARY_EXECUTABLE) $(CONVERT_SOURCES) $(CONVERT_EXECUTABLE) $(BEAM_SOURCES) $(BEAM_EXECUTABLE) $(FINAL_EXECUTABLE) $(RF_SOURCES) $(RF_EXECUTABLE) $(VERIFY_PROGRAMMED_SOURCES) $(VERIFY_PROGRAMMED_EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(OBJECTS) $(common_libs) $(qnx_libs)
endif
$(RF_EXECUTABLE): $(RF_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(RF_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(RF_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(VERIFY_EXECUTABLE): $(VERIFY_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(VERIFY_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(VERIFY_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(VERIFY_PROGRAMMED_EXECUTABLE): $(VERIFY_PROGRAMMED_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(VERIFY_PROGRAMMED_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(VERIFY_PROGRAMMED_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(CHECK_PROGRAMMED_EXECUTABLE): $(CHECK_PROGRAMMED_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(CHECK_PROGRAMMED_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(CHECK_PROGRAMMED_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(CHECK_RADAR_EXECUTABLE): $(CHECK_RADAR_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(CHECK_RADAR_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(CHECK_RADAR_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(SELECT_BEAM_EXECUTABLE): $(SELECT_BEAM_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(SELECT_BEAM_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(SELECT_BEAM_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(CONVERT_EXECUTABLE): $(CONVERT_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(CONVERT_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -L/usr/lib/ -o $@ $(CONVERT_OBJECTS) $(common_libs) $(qnx_libs) -lgsl -lgslcblas
endif
$(COMPARE_EXECUTABLE): $(COMPARE_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(COMPARE_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(COMPARE_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(BEAM_EXECUTABLE): $(BEAM_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(BEAM_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(BEAM_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(SUMMARY_EXECUTABLE): $(SUMMARY_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(SUMMARY_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(SUMMARY_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(FINAL_EXECUTABLE): $(FINAL_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(FINAL_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(FINAL_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(SELECT_EXECUTABLE): $(SELECT_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(SELECT_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(SELECT_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(DIO_OUTPUT_EXECUTABLE): $(DIO_OUTPUT_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(DIO_OUTPUT_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(DIO_OUTPUT_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(ATTEN_TEST_EXECUTABLE): $(ATTEN_TEST_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(ATTEN_TEST_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(ATTEN_TEST_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(ATTEN_EXECUTABLE): $(ATTEN_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(ATTEN_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(ATTEN_OBJECTS) $(common_libs) $(qnx_libs)
endif
$(ATTEN_VERIFY_EXECUTABLE): $(ATTEN_VERIFY_OBJECTS)
ifeq ($(OS),Linux)
$(CC) -o $@ $(ATTEN_VERIFY_OBJECTS) $(common_libs) $(linux_libs)
endif
ifeq ($(OS),QNX)
$(CC) -o $@ $(ATTEN_VERIFY_OBJECTS) $(common_libs) $(qnx_libs)
endif
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) $< -o $@
clean:
rm -rf $(OBJECTS) $(EXECUTABLE) $(SUMMARY_OBJECTS) $(SUMMARY_EXECUTABLE) $(VERIFY_PROGRAMMED_OBJECTS) $(VERIFY_PROGRAMMED_EXECUTABLE) $(VERIFY_OBJECTS) $(VERIFY_EXECUTABLE) $(CONVERT_OBJECTS) $(CONVERT_EXECUTABLE) $(BEAM_OBJECTS) $(BEAM_EXECUTABLE) $(RF_EXECUTABLE) $(RF_OBJECTS)