This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
asyn.Makefile
346 lines (275 loc) · 10.9 KB
/
asyn.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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
#
# Copyright (c) 2017 - 2019 Jeong Han Lee
# Copyright (c) 2017 - 2019 European Spallation Source ERIC
#
# The program is free software: you can redistribute
# it and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 2 of the
# License, or any newer version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program. If not, see https://www.gnu.org/licenses/gpl-2.0.txt
#
# Author : Jeong Han Lee
# email : [email protected]
# Date : Wednesday, September 4 00:01:38 CEST 2019
# version : 0.1.6
LEGACY_RSET = YES
where_am_I := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
include $(E3_REQUIRE_TOOLS)/driver.makefile
include $(E3_REQUIRE_CONFIG)/DECOUPLE_FLAGS
USR_CFLAGS += -Wno-unused-variable
USR_CFLAGS += -Wno-unused-function
USR_CFLAGS += -Wno-unused-but-set-variable
USR_CPPFLAGS += -Wno-unused-variable
USR_CPPFLAGS += -Wno-unused-function
USR_CPPFLAGS += -Wno-unused-but-set-variable
ASYN = asyn
# Default Dependency order of the sources
# for the community epics makefile
#
DEVGPIB:=$(ASYN)/devGpib
VXI11:=$(ASYN)/vxi11
ASYNRECORD:=$(ASYN)/asynRecord
DEVEPICS:=$(ASYN)/devEpics
ASYNPORTCLIENT:=$(ASYN)/asynPortClient
ASYNPORTDRIVER:=$(ASYN)/asynPortDriver
MISCELLANEOUS:=$(ASYN)/miscellaneous
INTERFACES:=$(ASYN)/interfaces
DRVASYNSERIAL:=$(ASYN)/drvAsynSerial
ASYNGPIB:=$(ASYN)/asynGpib
ASYNDRIVER:=$(ASYN)/asynDriver
USR_INCLUDES += -I$(where_am_I)$(DEVGPIB)
USR_INCLUDES += -I$(where_am_I)$(VXI11)
USR_INCLUDES += -I$(where_am_I)$(ASYNRECORD)
USR_INCLUDES += -I$(where_am_I)$(DEVEPICS)
USR_INCLUDES += -I$(where_am_I)$(ASYNPORTDRIVER)
USR_INCLUDES += -I$(where_am_I)$(ASYNPORTDRIVER)/exceptions
USR_INCLUDES += -I$(where_am_I)$(MISCELLANEOUS)
USR_INCLUDES += -I$(where_am_I)$(INTERFACES)
USR_INCLUDES += -I$(where_am_I)$(DRVASYNSERIAL)
USR_INCLUDES += -I$(where_am_I)$(ASYNGPIB)
USR_INCLUDES += -I$(where_am_I)$(ASYNDRIVER)
#
HEADERS += $(ASYNDRIVER)/asynDriver.h
HEADERS += $(ASYNDRIVER)/epicsInterruptibleSyscall.h
SOURCES += $(ASYNDRIVER)/asynManager.c
SOURCES += $(ASYNDRIVER)/epicsInterruptibleSyscall.c
#
HEADERS += $(ASYNGPIB)/asynGpibDriver.h
SOURCES += $(ASYNGPIB)/asynGpib.c
#
HEADERS += $(DRVASYNSERIAL)/drvAsynSerialPort.h
SOURCES += $(DRVASYNSERIAL)/drvAsynSerialPort.c
DBDS += $(DRVASYNSERIAL)/drvAsynSerialPort.dbd
HEADERS += $(DRVASYNSERIAL)/drvAsynIPPort.h
SOURCES += $(DRVASYNSERIAL)/drvAsynIPPort.c
SOURCES += $(DRVASYNSERIAL)/drvAsynIPServerPort.c
DBDS += $(DRVASYNSERIAL)/drvAsynIPPort.dbd
HEADERS += $(DRVASYNSERIAL)/drvAsynIPServerPort.h
#
HEADERS += $(INTERFACES)/asynInt32.h
HEADERS += $(INTERFACES)/asynInt32SyncIO.h
HEADERS += $(INTERFACES)/asynUInt32Digital.h
HEADERS += $(INTERFACES)/asynUInt32DigitalSyncIO.h
HEADERS += $(INTERFACES)/asynFloat64.h
HEADERS += $(INTERFACES)/asynFloat64SyncIO.h
HEADERS += $(INTERFACES)/asynInt8Array.h
HEADERS += $(INTERFACES)/asynInt8ArraySyncIO.h
HEADERS += $(INTERFACES)/asynInt16Array.h
HEADERS += $(INTERFACES)/asynInt16ArraySyncIO.h
HEADERS += $(INTERFACES)/asynInt32Array.h
HEADERS += $(INTERFACES)/asynInt32ArraySyncIO.h
HEADERS += $(INTERFACES)/asynFloat32Array.h
HEADERS += $(INTERFACES)/asynFloat32ArraySyncIO.h
HEADERS += $(INTERFACES)/asynFloat64Array.h
HEADERS += $(INTERFACES)/asynFloat64ArraySyncIO.h
HEADERS += $(INTERFACES)/asynOctet.h
HEADERS += $(INTERFACES)/asynOctetSyncIO.h
HEADERS += $(INTERFACES)/asynGenericPointer.h
HEADERS += $(INTERFACES)/asynGenericPointerSyncIO.h
HEADERS += $(INTERFACES)/asynEnum.h
HEADERS += $(INTERFACES)/asynEnumSyncIO.h
HEADERS += $(INTERFACES)/asynCommonSyncIO.h
HEADERS += $(INTERFACES)/asynOption.h
HEADERS += $(INTERFACES)/asynOptionSyncIO.h
HEADERS += $(INTERFACES)/asynDrvUser.h
HEADERS += $(INTERFACES)/asynStandardInterfaces.h
SOURCES += $(INTERFACES)/asynInt32Base.c
SOURCES += $(INTERFACES)/asynInt32SyncIO.c
SOURCES += $(INTERFACES)/asynInt8ArrayBase.c
SOURCES += $(INTERFACES)/asynInt8ArraySyncIO.c
SOURCES += $(INTERFACES)/asynInt16ArrayBase.c
SOURCES += $(INTERFACES)/asynInt16ArraySyncIO.c
SOURCES += $(INTERFACES)/asynInt32ArrayBase.c
SOURCES += $(INTERFACES)/asynInt32ArraySyncIO.c
SOURCES += $(INTERFACES)/asynUInt32DigitalBase.c
SOURCES += $(INTERFACES)/asynUInt32DigitalSyncIO.c
SOURCES += $(INTERFACES)/asynFloat64Base.c
SOURCES += $(INTERFACES)/asynFloat64SyncIO.c
SOURCES += $(INTERFACES)/asynFloat32ArrayBase.c
SOURCES += $(INTERFACES)/asynFloat32ArraySyncIO.c
SOURCES += $(INTERFACES)/asynFloat64ArrayBase.c
SOURCES += $(INTERFACES)/asynFloat64ArraySyncIO.c
SOURCES += $(INTERFACES)/asynOctetBase.c
SOURCES += $(INTERFACES)/asynOctetSyncIO.c
SOURCES += $(INTERFACES)/asynGenericPointerBase.c
SOURCES += $(INTERFACES)/asynGenericPointerSyncIO.c
SOURCES += $(INTERFACES)/asynEnumBase.c
SOURCES += $(INTERFACES)/asynEnumSyncIO.c
SOURCES += $(INTERFACES)/asynCommonSyncIO.c
SOURCES += $(INTERFACES)/asynOptionSyncIO.c
SOURCES += $(INTERFACES)/asynStandardInterfacesBase.c
#
DBDS += $(MISCELLANEOUS)/asyn.dbd
HEADERS += $(MISCELLANEOUS)/asynShellCommands.h
HEADERS += $(MISCELLANEOUS)/asynInterposeCom.h
HEADERS += $(MISCELLANEOUS)/asynInterposeEos.h
HEADERS += $(MISCELLANEOUS)/asynInterposeFlush.h
SOURCES += $(MISCELLANEOUS)/asynShellCommands.c
SOURCES += $(MISCELLANEOUS)/asynInterposeCom.c
SOURCES += $(MISCELLANEOUS)/asynInterposeEos.c
SOURCES += $(MISCELLANEOUS)/asynInterposeFlush.c
# From R4-36 : show two new files such as
# SOURCES += $(MISCELLANEOUS)/asynInterposeDelay.c
# SOURCES += $(MISCELLANEOUS)/asynInterposeEcho.c
# We have to use the following tricks to keep the backward compatibility.
asynInterposeDelay_src += $(MISCELLANEOUS)/asynInterposeDelay.c
SOURCES += $(filter $(asynInterposeDelay_src), $(wildcard $(MISCELLANEOUS)/*.c))
asynInterposeEcho_src += $(MISCELLANEOUS)/asynInterposeEcho.c
SOURCES += $(filter $(asynInterposeEcho_src), $(wildcard $(MISCELLANEOUS)/*.c))
#
HEADERS += $(ASYNPORTDRIVER)/exceptions/ParamListInvalidIndex.h
HEADERS += $(ASYNPORTDRIVER)/exceptions/ParamListParamNotFound.h
HEADERS += $(ASYNPORTDRIVER)/exceptions/ParamValNotDefined.h
HEADERS += $(ASYNPORTDRIVER)/exceptions/ParamValStringSizeRequestTooBig.h
HEADERS += $(ASYNPORTDRIVER)/exceptions/ParamValWrongType.h
HEADERS += $(ASYNPORTDRIVER)/exceptions/ParamValValueNotChanged.h
SOURCES += $(ASYNPORTDRIVER)/exceptions/ParamListInvalidIndex.cpp
SOURCES += $(ASYNPORTDRIVER)/exceptions/ParamListParamNotFound.cpp
SOURCES += $(ASYNPORTDRIVER)/exceptions/ParamValNotDefined.cpp
SOURCES += $(ASYNPORTDRIVER)/exceptions/ParamValStringSizeRequestTooBig.cpp
SOURCES += $(ASYNPORTDRIVER)/exceptions/ParamValWrongType.cpp
SOURCES += $(ASYNPORTDRIVER)/exceptions/ParamValValueNotChanged.cpp
HEADERS += $(ASYNPORTDRIVER)/asynParamType.h
HEADERS += $(ASYNPORTDRIVER)/paramErrors.h
HEADERS += $(ASYNPORTDRIVER)/asynPortDriver.h
# paramVal.h is needed only for nds for LLRF
HEADERS += $(ASYNPORTDRIVER)/paramVal.h
SOURCES += $(ASYNPORTDRIVER)/paramVal.cpp
SOURCES += $(ASYNPORTDRIVER)/asynPortDriver.cpp
#
HEADERS += $(ASYNPORTCLIENT)/asynPortClient.h
SOURCES += $(ASYNPORTCLIENT)/asynPortClient.cpp
#
DBDS += $(DEVEPICS)/devAsynOctet.dbd
DBDS += $(DEVEPICS)/devAsynInt32.dbd
DBDS += $(DEVEPICS)/devAsynInt8Array.dbd
DBDS += $(DEVEPICS)/devAsynInt16Array.dbd
DBDS += $(DEVEPICS)/devAsynInt32Array.dbd
DBDS += $(DEVEPICS)/devAsynInt32TimeSeries.dbd
DBDS += $(DEVEPICS)/devAsynUInt32Digital.dbd
DBDS += $(DEVEPICS)/devAsynFloat64.dbd
DBDS += $(DEVEPICS)/devAsynFloat32Array.dbd
DBDS += $(DEVEPICS)/devAsynFloat64Array.dbd
DBDS += $(DEVEPICS)/devAsynFloat64TimeSeries.dbd
DBDS += $(DEVEPICS)/devEpics.dbd
TEMPLATES += $(DEVEPICS)/asynInt32TimeSeries.db
TEMPLATES += $(DEVEPICS)/asynFloat64TimeSeries.db
HEADERS += $(DEVEPICS)/asynEpicsUtils.h
SOURCES += $(DEVEPICS)/devAsynOctet.c
SOURCES += $(DEVEPICS)/asynEpicsUtils.c
SOURCES += $(DEVEPICS)/devAsynInt32.c
SOURCES += $(DEVEPICS)/devAsynInt8Array.c
SOURCES += $(DEVEPICS)/devAsynInt16Array.c
SOURCES += $(DEVEPICS)/devAsynInt32Array.c
SOURCES += $(DEVEPICS)/devAsynInt32TimeSeries.c
SOURCES += $(DEVEPICS)/devAsynUInt32Digital.c
SOURCES += $(DEVEPICS)/devAsynFloat64.c
SOURCES += $(DEVEPICS)/devAsynFloat32Array.c
SOURCES += $(DEVEPICS)/devAsynFloat64Array.c
SOURCES += $(DEVEPICS)/devAsynFloat64TimeSeries.c
DBDINC_SRCS += $(ASYNRECORD)/asynRecord.c
DBDINC_DBDS = $(subst .c,.dbd, $(DBDINC_SRCS:$(ASYNRECORD)/%=%))
DBDINC_HDRS = $(subst .c,.h, $(DBDINC_SRCS:$(ASYNRECORD)/%=%))
DBDINC_DEPS = $(subst .c,$(DEP), $(DBDINC_SRCS:$(ASYNRECORD)/%=%))
HEADERS += $(DBDINC_HDRS)
SOURCES += $(ASYNRECORD)/drvAsyn.c
SOURCES += $(DBDINC_SRCS)
DBDS += $(ASYNRECORD)/devAsynRecord.dbd
TEMPLATES += $(ASYNRECORD)/asynRecord.db
ifeq ($(TIRPC),YES)
LIB_SYS_LIBS += tirpc
ifeq ($(T_A),linux-x86_64)
USR_INCLUDES += -I/usr/include/tirpc
else
USR_INCLUDES += -I$(SDKTARGETSYSROOT)/usr/include/tirpc
endif
endif
#HEADERS += $(VXI11)/drvVxi11.h
#HEADERS += $(VXI11)/osiRpc.h
#HEADERS += $(VXI11)/vxi11core.h
#HEADERS += $(VXI11)/vxi11intr.h
#HEADERS += $(VXI11)/vxi11.h
##SOURCES += $(VXI11)/vxi11intr_xdr.c
SOURCES += $(VXI11)/vxi11core_xdr.c
SOURCES += $(VXI11)/drvVxi11.c
SOURCES += $(VXI11)/E5810Reboot.c
SOURCES += $(VXI11)/E2050Reboot.c
SOURCES += $(VXI11)/TDS3000Reboot.c
DBDS += $(VXI11)/drvVxi11.dbd
#
# driver.Makefile can add USR_INCLUDES and USR_LDFLAGS
# when we compile it.
# However, it doesn't include SOURCES and DBD file, thus
# we cannot use DBDS and SOURCES to add USBTMC.c and USBTMC.dbd.
# Try-and-Fail, found DBD_SRCS and SRCS
DRVASYNUSBTMC:=$(ASYN)/drvAsynUSBTMC
DRVASYNUSBTMC_SRC:=$(DRVASYNUSBTMC)/drvAsynUSBTMC.c
DRVASYNUSBTMC_DBD:= $(DRVASYNUSBTMC)/drvAsynUSBTMC.dbd
ifeq ($(DRV_USBTMC),YES)
ifeq ($(T_A),linux-x86_64)
USR_INCLUDES += -I/usr/include/libusb-1.0
USR_LDFLAGS += -lusb-1.0
DBD_SRCS += $(DRVASYNUSBTMC_DBD)
SRCS += $(DRVASYNUSBTMC_SRC)
endif
endif
#
HEADERS += $(DEVGPIB)/devGpib.h
HEADERS += $(DEVGPIB)/devSupportGpib.h
HEADERS += $(DEVGPIB)/devCommonGpib.h
SOURCES += $(DEVGPIB)/devCommonGpib.c
SOURCES += $(DEVGPIB)/devSupportGpib.c
SOURCES += $(DEVGPIB)/boSRQonOff.c
DBDS += $(DEVGPIB)/devGpib.dbd
SCRIPTS += $(wildcard ../iocsh/*.iocsh)
# For 3.14
#drvVxi11$(OBJ): ../$(VXI11)/vxi11intr.h
# For 3.15
drvVxi11$(DEP): ../$(VXI11)/vxi11intr.h ../$(VXI11)/vxi11core.h
vxi11core_xdr.c$(DEP): ../$(VXI11)/vxi11core.h
ifdef T_A
.SECONDARY: ../$(VXI11)/vxi11core_xdr.c ../$(VXI11)/vxi11intr_xdr.c
%.h %_xdr.c: %.rpcl
# @echo "@ $@"
# @echo "EPICS MSI $(MSI3_15)"
# @echo "EPICS PERL $(PERL)"
# @echo "$(DBTORECORDTYPEH)"
cp $< .
rpcgen $*.rpcl
endif
$(DBDINC_DEPS): $(DBDINC_HDRS)
.dbd.h:
$(DBTORECORDTYPEH) $(USR_DBDFLAGS) -o $@ $<
# db rule is the default in RULES_E3, so add the empty one
db:
#
vlibs:
#
.PHONY: vlibs db